keyword(package) ident(org)operator(.)ident(jruby)operator(;) directive(public) type(enum) ident(CompatVersion) operator({) ident(RUBY1_8)operator(,) ident(RUBY1_9)operator(,) ident(BOTH)operator(;) directive(public) directive(static) ident(CompatVersion) ident(getVersionFromString)operator(()pre_type(String) ident(compatString)operator(\)) operator({) keyword(if) operator(()ident(compatString)operator(.)ident(equalsIgnoreCase)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(compatString)operator(.)ident(equalsIgnoreCase)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(;) operator(}) keyword(else) operator({) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Damian Steer * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) comment(/** * An almost entirely useless interface for those objects that we _really_ want * to finalise. * * @author pldms * */) directive(public) type(interface) class(Finalizable) operator({) directive(public) type(void) ident(finalize)operator(()operator(\))operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002 Jan Arne Petersen * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) comment(/** * Error numbers. * @fixme * this interface is a big hack defining a bunch of arbitrary valor as system call error numbers * this is actually because I need them but will probably need to be changed to something smarter * sooner or later. * The purpose of this class it to help implement the Errno module which in turn in needed by rubicon. * @author Benoit Cerrina **/) directive(public) type(interface) class(IErrno) operator({) type(int) ident(EPERM) operator(=) integer(1)operator(;) type(int) ident(ENOENT) operator(=) integer(2)operator(;) type(int) ident(ESRCH) operator(=) integer(3)operator(;) type(int) ident(EINTR) operator(=) integer(4)operator(;) type(int) ident(EIO) operator(=) integer(5)operator(;) type(int) ident(ENXIO) operator(=) integer(6)operator(;) type(int) ident(E2BIG) operator(=) integer(7)operator(;) type(int) ident(ENOEXEC) operator(=) integer(8)operator(;) type(int) ident(EBADF) operator(=) integer(9)operator(;) type(int) ident(ECHILD) operator(=) integer(10)operator(;) type(int) ident(EDEADLK) operator(=) integer(11)operator(;) type(int) ident(ENOMEM) operator(=) integer(12)operator(;) type(int) ident(EACCES) operator(=) integer(13)operator(;) type(int) ident(EFAULT) operator(=) integer(14)operator(;) type(int) ident(ENOTBLK) operator(=) integer(15)operator(;) type(int) ident(EBUSY) operator(=) integer(16)operator(;) type(int) ident(EEXIST) operator(=) integer(17)operator(;) type(int) ident(EXDEV) operator(=) integer(18)operator(;) type(int) ident(ENODEV) operator(=) integer(19)operator(;) type(int) ident(ENOTDIR) operator(=) integer(20)operator(;) type(int) ident(EISDIR) operator(=) integer(21)operator(;) type(int) ident(EINVAL) operator(=) integer(22)operator(;) type(int) ident(ENFILE) operator(=) integer(23)operator(;) type(int) ident(EMFILE) operator(=) integer(24)operator(;) type(int) ident(ENOTTY) operator(=) integer(25)operator(;) type(int) ident(ETXTBSY) operator(=) integer(26)operator(;) type(int) ident(EFBIG) operator(=) integer(27)operator(;) type(int) ident(ENOSPC) operator(=) integer(28)operator(;) type(int) ident(ESPIPE) operator(=) integer(29)operator(;) type(int) ident(EROFS) operator(=) integer(30)operator(;) type(int) ident(EMLINK) operator(=) integer(31)operator(;) type(int) ident(EPIPE) operator(=) integer(32)operator(;) type(int) ident(EDOM) operator(=) integer(33)operator(;) type(int) ident(ERANGE) operator(=) integer(34)operator(;) type(int) ident(EWOULDBLOCK) operator(=) integer(35)operator(;) type(int) ident(EAGAIN) operator(=) integer(35)operator(;) type(int) ident(EINPROGRESS) operator(=) integer(36)operator(;) type(int) ident(EALREADY) operator(=) integer(37)operator(;) type(int) ident(ENOTSOCK) operator(=) integer(38)operator(;) type(int) ident(EDESTADDRREQ) operator(=) integer(39)operator(;) type(int) ident(EMSGSIZE) operator(=) integer(40)operator(;) type(int) ident(EPROTOTYPE) operator(=) integer(41)operator(;) type(int) ident(ENOPROTOOPT) operator(=) integer(42)operator(;) type(int) ident(EPROTONOSUPPORT) operator(=) integer(43)operator(;) type(int) ident(ESOCKTNOSUPPORT) operator(=) integer(44)operator(;) type(int) ident(EOPNOTSUPP) operator(=) integer(45)operator(;) type(int) ident(EPFNOSUPPORT) operator(=) integer(46)operator(;) type(int) ident(EAFNOSUPPORT) operator(=) integer(47)operator(;) type(int) ident(EADDRINUSE) operator(=) integer(48)operator(;) type(int) ident(EADDRNOTAVAIL) operator(=) integer(49)operator(;) type(int) ident(ENETDOWN) operator(=) integer(50)operator(;) type(int) ident(ENETUNREACH) operator(=) integer(51)operator(;) type(int) ident(ENETRESET) operator(=) integer(52)operator(;) type(int) ident(ECONNABORTED) operator(=) integer(53)operator(;) type(int) ident(ECONNRESET) operator(=) integer(54)operator(;) type(int) ident(ENOBUFS) operator(=) integer(55)operator(;) type(int) ident(EISCONN) operator(=) integer(56)operator(;) type(int) ident(ENOTCONN) operator(=) integer(57)operator(;) type(int) ident(ESHUTDOWN) operator(=) integer(58)operator(;) type(int) ident(ETOOMANYREFS) operator(=) integer(59)operator(;) type(int) ident(ETIMEDOUT) operator(=) integer(60)operator(;) type(int) ident(ECONNREFUSED) operator(=) integer(61)operator(;) type(int) ident(ELOOP) operator(=) integer(62)operator(;) type(int) ident(ENAMETOOLONG) operator(=) integer(63)operator(;) type(int) ident(EHOSTDOWN) operator(=) integer(64)operator(;) type(int) ident(EHOSTUNREACH) operator(=) integer(65)operator(;) type(int) ident(ENOTEMPTY) operator(=) integer(66)operator(;) type(int) ident(EUSERS) operator(=) integer(68)operator(;) type(int) ident(EDQUOT) operator(=) integer(69)operator(;) type(int) ident(ESTALE) operator(=) integer(70)operator(;) type(int) ident(EREMOTE) operator(=) integer(71)operator(;) type(int) ident(ENOLCK) operator(=) integer(77)operator(;) type(int) ident(ENOSYS) operator(=) integer(78)operator(;) type(int) ident(EOVERFLOW) operator(=) integer(84)operator(;) type(int) ident(EIDRM) operator(=) integer(90)operator(;) type(int) ident(ENOMSG) operator(=) integer(91)operator(;) type(int) ident(EILSEQ) operator(=) integer(92)operator(;) type(int) ident(EBADMSG) operator(=) integer(94)operator(;) type(int) ident(EMULTIHOP) operator(=) integer(95)operator(;) type(int) ident(ENODATA) operator(=) integer(96)operator(;) type(int) ident(ENOLINK) operator(=) integer(97)operator(;) type(int) ident(ENOSR) operator(=) integer(98)operator(;) type(int) ident(ENOSTR) operator(=) integer(99)operator(;) type(int) ident(EPROTO) operator(=) integer(100)operator(;) type(int) ident(ETIME) operator(=) integer(101)operator(;) type(int) ident(EOPNOTSUPP_DARWIN) operator(=) integer(102)operator(;) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004-2006 Thomas E Enebo * Copyright (C\) 2005 Charles O Nutter * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2007 William N Dortch * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) comment(/** * This class is used to provide an intermediate superclass for modules and classes that include * other modules. It inserts itself as the immediate superClass of the includer, but defers all * module methods to the actual superclass. Multiple of these intermediate superclasses can be * added for multiple included modules. * * This allows the normal superclass-based searches (searchMethod, getConstant, etc\) to traverse * the superclass ancestors as normal while the included modules do not actually show up in * direct inheritance traversal. * * @see org.jruby.RubyModule */) directive(public) directive(final) type(class) class(IncludedModuleWrapper) directive(extends) ident(RubyClass) operator({) directive(private) directive(final) ident(RubyModule) ident(delegate)operator(;) directive(public) ident(IncludedModuleWrapper)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(RubyModule) ident(delegate)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(superClass)operator(,) pre_constant(false)operator(\))operator(;) local_variable(this)operator(.)ident(delegate) operator(=) ident(delegate)operator(;) local_variable(this)operator(.)ident(metaClass) operator(=) ident(delegate)operator(.)ident(metaClass)operator(;) operator(}) comment(/** * Overridden newIncludeClass implementation to allow attaching future includes to the correct module * (i.e. the one to which this is attached\) * * @see org.jruby.RubyModule#newIncludeClass(RubyClass\) */) annotation(@Override) directive(public) ident(IncludedModuleWrapper) ident(newIncludeClass)operator(()ident(RubyClass) ident(superClass)operator(\)) operator({) ident(IncludedModuleWrapper) ident(includedModule) operator(=) keyword(new) ident(IncludedModuleWrapper)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(superClass)operator(,) ident(getNonIncludedClass)operator(()operator(\))operator(\))operator(;) comment(// include its parent (and in turn that module's parents\)) keyword(if) operator(()ident(getSuperClass)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(includedModule)operator(.)ident(includeModule)operator(()ident(getSuperClass)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(includedModule)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isModule)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isClass)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isIncluded)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) type(void) ident(setMetaClass)operator(()ident(RubyClass) ident(newRubyClass)operator(\)) operator({) keyword(throw) keyword(new) exception(UnsupportedOperationException)operator(()stringoperator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) ident(DynamicMethod)operator(>) ident(getMethods)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(getMethods)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(void) ident(addMethod)operator(()pre_type(String) ident(name)operator(,) ident(DynamicMethod) ident(method)operator(\)) operator({) keyword(throw) keyword(new) exception(UnsupportedOperationException)operator(()stringoperator(\))operator(;) operator(}) directive(public) type(void) ident(setMethods)operator(()pre_type(Map) ident(newMethods)operator(\)) operator({) keyword(throw) keyword(new) exception(UnsupportedOperationException)operator(()stringoperator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(String) ident(getName)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(getName)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(RubyModule) ident(getNonIncludedClass)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyClass) ident(getRealClass)operator(()operator(\)) operator({) keyword(return) ident(getSuperClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(boolean) ident(isSame)operator(()ident(RubyModule) ident(module)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(isSame)operator(()ident(module)operator(\))operator(;) operator(}) comment(/** * We don't want to reveal ourselves to Ruby code, so delegate this * operation. */) annotation(@Override) directive(public) ident(IRubyObject) ident(id)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(id)operator(()operator(\))operator(;) operator(}) comment(//) comment(// VARIABLE TABLE METHODS - pass to delegate) comment(//) annotation(@Override) directive(protected) type(boolean) ident(variableTableContains)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableContains)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(boolean) ident(variableTableFastContains)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableFetch)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableFastFetch)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableStore)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableFastStore)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableRemove)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(VariableTableEntry)type([]) ident(variableTableGetTable)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableGetTable)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(int) ident(variableTableGetSize)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableGetSize)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(void) ident(variableTableSync)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(vars)operator(\)) operator({) ident(delegate)operator(.)ident(variableTableSync)operator(()ident(vars)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableReadLocked)operator(()ident(VariableTableEntry) ident(entry)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableReadLocked)operator(()ident(entry)operator(\))operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Override) annotation(@Deprecated) comment(// born deprecated) directive(protected) pre_type(Map) ident(variableTableGetMap)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableGetMap)operator(()operator(\))operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Override) annotation(@Deprecated) comment(// born deprecated) directive(protected) pre_type(Map) ident(variableTableGetMap)operator(()pre_type(Map) ident(map)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(variableTableGetMap)operator(()ident(map)operator(\))operator(;) operator(}) comment(//) comment(// CONSTANT TABLE METHODS - pass to delegate) comment(//) annotation(@Override) directive(protected) type(boolean) ident(constantTableContains)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableContains)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(boolean) ident(constantTableFastContains)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(constantTableFetch)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(constantTableFastFetch)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(constantTableStore)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) comment(// FIXME: legal here? may want UnsupportedOperationException) keyword(return) ident(delegate)operator(.)ident(constantTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(constantTableFastStore)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) comment(// FIXME: legal here? may want UnsupportedOperationException) keyword(return) ident(delegate)operator(.)ident(constantTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(constantTableRemove)operator(()pre_type(String) ident(name)operator(\)) operator({) comment(// this _is_ legal (when removing an undef\)) keyword(return) ident(delegate)operator(.)ident(constantTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@Override) directive(protected) ident(ConstantTableEntry)type([]) ident(constantTableGetTable)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableGetTable)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(int) ident(constantTableGetSize)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableGetSize)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(protected) type(void) ident(constantTableSync)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(vars)operator(\)) operator({) comment(// FIXME: legal here? may want UnsupportedOperationException) ident(delegate)operator(.)ident(constantTableSync)operator(()ident(vars)operator(\))operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Override) annotation(@Deprecated) comment(// born deprecated) directive(protected) pre_type(Map) ident(constantTableGetMap)operator(()operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableGetMap)operator(()operator(\))operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Override) annotation(@Deprecated) comment(// born deprecated) directive(protected) pre_type(Map) ident(constantTableGetMap)operator(()pre_type(Map) ident(map)operator(\)) operator({) keyword(return) ident(delegate)operator(.)ident(constantTableGetMap)operator(()ident(map)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Charles Nutter * Copyright (C\) 2008 MenTaLguY * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.applet.Applet)operator(;) keyword(import) include(java.awt.BorderLayout)operator(;) keyword(import) include(java.awt.Color)operator(;) keyword(import) include(java.awt.Container)operator(;) keyword(import) include(java.awt.EventQueue)operator(;) keyword(import) include(java.awt.Font)operator(;) keyword(import) include(java.awt.Insets)operator(;) keyword(import) include(java.awt.Graphics)operator(;) keyword(import) include(java.awt.GraphicsConfiguration)operator(;) keyword(import) include(java.awt.GraphicsEnvironment)operator(;) keyword(import) include(java.awt.image.VolatileImage)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(java.net.URL)operator(;) keyword(import) include(java.util.Arrays)operator(;) keyword(import) include(java.lang.reflect.InvocationTargetException)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.demo.TextAreaReadline)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(javax.swing.JScrollPane)operator(;) keyword(import) include(javax.swing.JTextPane)operator(;) comment(/** * @author MenTaLguY * * The JRubyApplet class provides a simple way to write Java applets using * JRuby without needing to create a custom Java applet class. At applet * initialization time, JRubyApplet starts up a JRuby runtime, then evaluates * the scriptlet given as the "eval" applet parameter. * * The Java applet instance is available to the Ruby script as * JRUBY_APPLET; the script can define callbacks for applet start, stop, * and destroy by passing blocks to JRUBY_APPLET.on_start, * JRUBY_APPLET.on_stop, and JRUBY_APPLET.on_destroy, respectively. * * Ruby code can install a custom paint callback using JRUBY_APPLET.on_paint * (the Graphics2D object is passed as an argument to the callback\). By * default, JRubyApplet painting is double-buffered, but you can select * single-buffered painting via JRUBY_APPLET.double_buffered = false. * * The applet's background color can be set via JRUBY_APPLET.background_color=. * You may want to set it to nil if you're not using double-buffering, so that * no background color will be drawn (your own paint code is then responsible * for filling the area\). * * Beyond these things, you should be able to use JRuby's Java integration * to do whatever you would do in Java with the applet instance. * */) directive(public) type(class) class(JRubyApplet) directive(extends) pre_type(Applet) operator({) directive(private) ident(Ruby) ident(runtime)operator(;) directive(private) type(boolean) ident(doubleBuffered) operator(=) pre_constant(true)operator(;) directive(private) pre_type(Color) ident(backgroundColor) operator(=) pre_type(Color)operator(.)ident(WHITE)operator(;) directive(private) ident(RubyProc) ident(startProc)operator(;) directive(private) ident(RubyProc) ident(stopProc)operator(;) directive(private) ident(RubyProc) ident(destroyProc)operator(;) directive(private) ident(RubyProc) ident(paintProc)operator(;) directive(private) pre_type(Graphics) ident(priorGraphics)operator(;) directive(private) ident(IRubyObject) ident(wrappedGraphics)operator(;) directive(private) pre_type(VolatileImage) ident(backBuffer)operator(;) directive(private) pre_type(Graphics) ident(backBufferGraphics)operator(;) directive(private) ident(Facade) ident(facade)operator(;) directive(private) type(interface) class(Facade) operator({) directive(public) pre_type(InputStream) ident(getInputStream)operator(()operator(\))operator(;) directive(public) pre_type(PrintStream) ident(getOutputStream)operator(()operator(\))operator(;) directive(public) pre_type(PrintStream) ident(getErrorStream)operator(()operator(\))operator(;) directive(public) type(void) ident(attach)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Applet) ident(applet)operator(\))operator(;) directive(public) type(void) ident(destroy)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) ident(RubyProc) ident(blockToProc)operator(()ident(Ruby) ident(runtime)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(RubyProc) ident(proc) operator(=) ident(block)operator(.)ident(getProcObject)operator(()operator(\))operator(;) keyword(if) operator(()ident(proc) operator(==) pre_constant(null)operator(\)) operator({) ident(proc) operator(=) ident(RubyProc)operator(.)ident(newProc)operator(()ident(runtime)operator(,) ident(block)operator(,) ident(block)operator(.)ident(type)operator(\))operator(;) operator(}) keyword(return) ident(proc)operator(;) operator(}) keyword(else) operator({) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) directive(private) type(boolean) ident(getBooleanParameter)operator(()pre_type(String) ident(name)operator(,) type(boolean) ident(defaultValue)operator(\)) operator({) pre_type(String) ident(value) operator(=) ident(getParameter)operator(()ident(name)operator(\))operator(;) keyword(if) operator(() ident(value) operator(!=) pre_constant(null) operator(\)) operator({) keyword(return) ident(value)operator(.)ident(equals)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(defaultValue)operator(;) operator(}) operator(}) directive(private) pre_type(InputStream) ident(getCodeResourceAsStream)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if) operator(()ident(name) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) pre_constant(null)operator(;) operator(}) keyword(try) operator({) directive(final) pre_type(URL) ident(directURL) operator(=) keyword(new) pre_type(URL)operator(()ident(getCodeBase)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) keyword(return) ident(directURL)operator(.)ident(openStream)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) operator(}) keyword(return) ident(JRubyApplet)operator(.)ident(class)operator(.)ident(getClassLoader)operator(()operator(\))operator(.)ident(getResourceAsStream)operator(()ident(name)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(safeInvokeAndWait)operator(()pre_type(Runnable) ident(runnable)operator(\)) directive(throws) exception(InvocationTargetException)operator(,) exception(InterruptedException) operator({) keyword(if) operator(()pre_type(EventQueue)operator(.)ident(isDispatchThread)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(runnable)operator(.)ident(run)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(throw) keyword(new) exception(InvocationTargetException)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) pre_type(EventQueue)operator(.)ident(invokeAndWait)operator(()ident(runnable)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(RubyMethods) operator({) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(on_start)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(JRubyApplet) ident(applet) operator(=) operator(()ident(JRubyApplet)operator(\))ident(recv)operator(.)ident(dataGetStruct)operator(()operator(\))operator(;) directive(synchronized) operator(()ident(applet)operator(\)) operator({) ident(applet)operator(.)ident(startProc) operator(=) ident(blockToProc)operator(()ident(applet)operator(.)ident(runtime)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(on_stop)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(JRubyApplet) ident(applet) operator(=) operator(()ident(JRubyApplet)operator(\))ident(recv)operator(.)ident(dataGetStruct)operator(()operator(\))operator(;) directive(synchronized) operator(()ident(applet)operator(\)) operator({) ident(applet)operator(.)ident(stopProc) operator(=) ident(blockToProc)operator(()ident(applet)operator(.)ident(runtime)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(on_destroy)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(JRubyApplet) ident(applet) operator(=) operator(()ident(JRubyApplet)operator(\))ident(recv)operator(.)ident(dataGetStruct)operator(()operator(\))operator(;) directive(synchronized) operator(()ident(applet)operator(\)) operator({) ident(applet)operator(.)ident(destroyProc) operator(=) ident(blockToProc)operator(()ident(applet)operator(.)ident(runtime)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(on_paint)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(JRubyApplet) ident(applet) operator(=) operator(()ident(JRubyApplet)operator(\))ident(recv)operator(.)ident(dataGetStruct)operator(()operator(\))operator(;) directive(synchronized) operator(()ident(applet)operator(\)) operator({) ident(applet)operator(.)ident(paintProc) operator(=) ident(blockToProc)operator(()ident(applet)operator(.)ident(runtime)operator(,) ident(block)operator(\))operator(;) ident(applet)operator(.)ident(repaint)operator(()operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) operator(}) annotation(@Override) directive(public) type(void) ident(init)operator(()operator(\)) operator({) local_variable(super)operator(.)ident(init)operator(()operator(\))operator(;) keyword(if) operator(()ident(getBooleanParameter)operator(()stringoperator(,) pre_constant(false)operator(\))operator(\)) operator({) ident(facade) operator(=) keyword(new) ident(ConsoleFacade)operator(()ident(getParameter)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(facade) operator(=) keyword(new) ident(TrivialFacade)operator(()operator(\))operator(;) operator(}) directive(synchronized) operator(()local_variable(this)operator(\)) operator({) keyword(if) operator(()ident(runtime) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return)operator(;) operator(}) directive(final) ident(RubyInstanceConfig) ident(config) operator(=) keyword(new) ident(RubyInstanceConfig)operator(()operator(\)) operator({)operator({) ident(setInput)operator(()ident(facade)operator(.)ident(getInputStream)operator(()operator(\))operator(\))operator(;) ident(setOutput)operator(()ident(facade)operator(.)ident(getOutputStream)operator(()operator(\))operator(\))operator(;) ident(setError)operator(()ident(facade)operator(.)ident(getErrorStream)operator(()operator(\))operator(\))operator(;) ident(setObjectSpaceEnabled)operator(()ident(getBooleanParameter)operator(()stringoperator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(})operator(})operator(;) ident(Ruby)operator(.)ident(setSecurityRestricted)operator(()pre_constant(true)operator(\))operator(;) ident(runtime) operator(=) ident(Ruby)operator(.)ident(newInstance)operator(()ident(config)operator(\))operator(;) operator(}) directive(final) pre_type(String) ident(scriptName) operator(=) ident(getParameter)operator(()stringoperator(\))operator(;) directive(final) pre_type(InputStream) ident(scriptStream) operator(=) ident(getCodeResourceAsStream)operator(()ident(scriptName)operator(\))operator(;) directive(final) pre_type(String) ident(evalString) operator(=) ident(getParameter)operator(()stringoperator(\))operator(;) keyword(try) operator({) directive(final) ident(JRubyApplet) ident(applet) operator(=) local_variable(this)operator(;) ident(safeInvokeAndWait)operator(()keyword(new) pre_type(Runnable)operator(()operator(\)) operator({) directive(public) type(void) ident(run)operator(()operator(\)) operator({) ident(applet)operator(.)ident(setLayout)operator(()keyword(new) pre_type(BorderLayout)operator(()operator(\))operator(\))operator(;) ident(applet)operator(.)ident(facade)operator(.)ident(attach)operator(()ident(applet)operator(.)ident(runtime)operator(,) ident(applet)operator(\))operator(;) keyword(if) operator(()ident(scriptStream) operator(!=) pre_constant(null)operator(\)) operator({) ident(applet)operator(.)ident(runtime)operator(.)ident(runFromMain)operator(()ident(scriptStream)operator(,) ident(scriptName)operator(\))operator(;) operator(}) keyword(if) operator(()ident(evalString) operator(!=) pre_constant(null)operator(\)) operator({) ident(applet)operator(.)ident(runtime)operator(.)ident(evalScriptlet)operator(()ident(evalString)operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(e)operator(\)) operator({) operator(}) keyword(catch) operator(()exception(InvocationTargetException) ident(e)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(,) ident(e)operator(.)ident(getCause)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(invokeCallback)operator(()directive(final) ident(RubyProc) ident(proc)operator(,) directive(final) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(proc) operator(==) pre_constant(null)operator(\)) operator({) keyword(return)operator(;) operator(}) directive(final) ident(Ruby) ident(runtime) operator(=) local_variable(this)operator(.)ident(runtime)operator(;) keyword(try) operator({) ident(safeInvokeAndWait)operator(()keyword(new) pre_type(Runnable)operator(()operator(\)) operator({) directive(public) type(void) ident(run)operator(()operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(proc)operator(.)ident(call)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(e)operator(\)) operator({) operator(}) keyword(catch) operator(()exception(InvocationTargetException) ident(e)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(,) ident(e)operator(.)ident(getCause)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) directive(synchronized) type(void) ident(setBackgroundColor)operator(()pre_type(Color) ident(color)operator(\)) operator({) ident(backgroundColor) operator(=) ident(color)operator(;) ident(repaint)operator(()operator(\))operator(;) operator(}) directive(public) directive(synchronized) pre_type(Color) ident(getBackgroundColor)operator(()operator(\)) operator({) keyword(return) ident(backgroundColor)operator(;) operator(}) directive(public) directive(synchronized) type(boolean) ident(isDoubleBuffered)operator(()operator(\)) operator({) keyword(return) ident(doubleBuffered)operator(;) operator(}) directive(public) directive(synchronized) type(void) ident(setDoubleBuffered)operator(()type(boolean) ident(shouldBuffer)operator(\)) operator({) ident(doubleBuffered) operator(=) ident(shouldBuffer)operator(;) ident(repaint)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) directive(synchronized) type(void) ident(start)operator(()operator(\)) operator({) local_variable(super)operator(.)ident(start)operator(()operator(\))operator(;) ident(invokeCallback)operator(()ident(startProc)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)operator(})operator(\))operator(;) operator(}) annotation(@Override) directive(public) directive(synchronized) type(void) ident(stop)operator(()operator(\)) operator({) ident(invokeCallback)operator(()ident(stopProc)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)operator(})operator(\))operator(;) local_variable(super)operator(.)ident(stop)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) directive(synchronized) type(void) ident(destroy)operator(()operator(\)) operator({) keyword(try) operator({) ident(invokeCallback)operator(()ident(destroyProc)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)operator(})operator(\))operator(;) operator(}) keyword(finally) operator({) ident(facade)operator(.)ident(destroy)operator(()operator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) local_variable(this)operator(.)ident(runtime)operator(;) local_variable(this)operator(.)ident(runtime) operator(=) pre_constant(null)operator(;) ident(startProc) operator(=) pre_constant(null)operator(;) ident(stopProc) operator(=) pre_constant(null)operator(;) ident(destroyProc) operator(=) pre_constant(null)operator(;) ident(paintProc) operator(=) pre_constant(null)operator(;) ident(priorGraphics) operator(=) pre_constant(null)operator(;) ident(wrappedGraphics) operator(=) pre_constant(null)operator(;) ident(runtime)operator(.)ident(tearDown)operator(()operator(\))operator(;) local_variable(super)operator(.)ident(destroy)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(public) type(void) ident(update)operator(()pre_type(Graphics) ident(g)operator(\)) operator({) ident(paint)operator(()ident(g)operator(\))operator(;) operator(}) annotation(@Override) directive(public) directive(synchronized) type(void) ident(paint)operator(()pre_type(Graphics) ident(g)operator(\)) operator({) keyword(if) operator(()ident(doubleBuffered)operator(\)) operator({) ident(paintBuffered)operator(()ident(g)operator(\))operator(;) operator(}) keyword(else) operator({) ident(paintUnbuffered)operator(()ident(g)operator(\))operator(;) operator(}) operator(}) directive(private) directive(synchronized) type(void) ident(paintBuffered)operator(()pre_type(Graphics) ident(g)operator(\)) operator({) keyword(do) operator({) pre_type(GraphicsConfiguration) ident(config) operator(=) ident(getGraphicsConfiguration)operator(()operator(\))operator(;) type(int) ident(width) operator(=) ident(getWidth)operator(()operator(\))operator(;) type(int) ident(height) operator(=) ident(getHeight)operator(()operator(\))operator(;) keyword(if) operator(()ident(backBuffer) operator(==) pre_constant(null) operator(||) ident(width) operator(!=) ident(backBuffer)operator(.)ident(getWidth)operator(()operator(\)) operator(||) ident(height) operator(!=) ident(backBuffer)operator(.)ident(getHeight)operator(()operator(\)) operator(||) ident(backBuffer)operator(.)ident(validate)operator(()ident(config)operator(\)) operator(==) pre_type(VolatileImage)operator(.)ident(IMAGE_INCOMPATIBLE)operator(\)) operator({) keyword(if) operator(()ident(backBuffer) operator(!=) pre_constant(null)operator(\)) operator({) ident(backBufferGraphics)operator(.)ident(dispose)operator(()operator(\))operator(;) ident(backBufferGraphics) operator(=) pre_constant(null)operator(;) ident(backBuffer)operator(.)ident(flush)operator(()operator(\))operator(;) ident(backBuffer) operator(=) pre_constant(null)operator(;) operator(}) ident(backBuffer) operator(=) ident(config)operator(.)ident(createCompatibleVolatileImage)operator(()ident(width)operator(,) ident(height)operator(\))operator(;) ident(backBufferGraphics) operator(=) ident(backBuffer)operator(.)ident(createGraphics)operator(()operator(\))operator(;) operator(}) ident(backBufferGraphics)operator(.)ident(setClip)operator(()ident(g)operator(.)ident(getClip)operator(()operator(\))operator(\))operator(;) ident(paintUnbuffered)operator(()ident(backBufferGraphics)operator(\))operator(;) ident(g)operator(.)ident(drawImage)operator(()ident(backBuffer)operator(,) integer(0)operator(,) integer(0)operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(while) operator(()ident(backBuffer)operator(.)ident(contentsLost)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) directive(synchronized) type(void) ident(paintUnbuffered)operator(()pre_type(Graphics) ident(g)operator(\)) operator({) keyword(if) operator(()ident(backgroundColor) operator(!=) pre_constant(null)operator(\)) operator({) ident(g)operator(.)ident(setColor)operator(()ident(backgroundColor)operator(\))operator(;) ident(g)operator(.)ident(fillRect)operator(()integer(0)operator(,) integer(0)operator(,) ident(getWidth)operator(()operator(\))operator(,) ident(getHeight)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(paintProc) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(priorGraphics) operator(!=) ident(g)operator(\)) operator({) ident(wrappedGraphics) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToUsableRubyObject)operator(()ident(runtime)operator(,) ident(g)operator(\))operator(;) ident(priorGraphics) operator(=) ident(g)operator(;) operator(}) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(paintProc)operator(.)ident(call)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(wrappedGraphics)operator(})operator(\))operator(;) operator(}) local_variable(super)operator(.)ident(paint)operator(()ident(g)operator(\))operator(;) operator(}) directive(private) directive(static) type(class) class(TrivialFacade) directive(implements) ident(Facade) operator({) directive(public) ident(TrivialFacade)operator(()operator(\)) operator({)operator(}) directive(public) pre_type(InputStream) ident(getInputStream)operator(()operator(\)) operator({) keyword(return) pre_type(System)operator(.)ident(in)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getOutputStream)operator(()operator(\)) operator({) keyword(return) pre_type(System)operator(.)ident(out)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getErrorStream)operator(()operator(\)) operator({) keyword(return) pre_type(System)operator(.)ident(err)operator(;) operator(}) directive(public) type(void) ident(attach)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Applet) ident(applet)operator(\)) operator({) directive(final) ident(IRubyObject) ident(wrappedApplet) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToUsableRubyObject)operator(()ident(runtime)operator(,) ident(applet)operator(\))operator(;) ident(wrappedApplet)operator(.)ident(dataWrapStruct)operator(()ident(applet)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(wrappedApplet)operator(\))operator(;) ident(wrappedApplet)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyMethods)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(void) ident(destroy)operator(()operator(\)) operator({)operator(}) operator(}) directive(private) directive(static) type(class) class(ConsoleFacade) directive(implements) ident(Facade) operator({) directive(private) pre_type(JTextPane) ident(textPane)operator(;) directive(private) pre_type(JScrollPane) ident(scrollPane)operator(;) directive(private) ident(TextAreaReadline) ident(adaptor)operator(;) directive(private) pre_type(InputStream) ident(inputStream)operator(;) directive(private) pre_type(PrintStream) ident(outputStream)operator(;) directive(private) pre_type(PrintStream) ident(errorStream)operator(;) directive(public) ident(ConsoleFacade)operator(()pre_type(String) ident(bannerText)operator(\)) operator({) ident(textPane) operator(=) keyword(new) pre_type(JTextPane)operator(()operator(\))operator(;) ident(textPane)operator(.)ident(setMargin)operator(()keyword(new) pre_type(Insets)operator(()integer(4)operator(,) integer(4)operator(,) integer(0)operator(,) integer(4)operator(\))operator(\))operator(;) ident(textPane)operator(.)ident(setCaretColor)operator(()keyword(new) pre_type(Color)operator(()hex(0xa4)operator(,) hex(0x00)operator(,) hex(0x00)operator(\))operator(\))operator(;) ident(textPane)operator(.)ident(setBackground)operator(()keyword(new) pre_type(Color)operator(()hex(0xf2)operator(,) hex(0xf2)operator(,) hex(0xf2)operator(\))operator(\))operator(;) ident(textPane)operator(.)ident(setForeground)operator(()keyword(new) pre_type(Color)operator(()hex(0xa4)operator(,) hex(0x00)operator(,) hex(0x00)operator(\))operator(\))operator(;) pre_type(Font) ident(font) operator(=) ident(findFont)operator(()stringoperator(,) pre_type(Font)operator(.)ident(PLAIN)operator(,) integer(14)operator(,) keyword(new) pre_type(String)type([]) operator({)stringoperator(,) stringoperator(})operator(\))operator(;) ident(textPane)operator(.)ident(setFont)operator(()ident(font)operator(\))operator(;) ident(scrollPane) operator(=) keyword(new) pre_type(JScrollPane)operator(()ident(textPane)operator(\))operator(;) ident(scrollPane)operator(.)ident(setDoubleBuffered)operator(()pre_constant(true)operator(\))operator(;) keyword(if) operator(() ident(bannerText) operator(!=) pre_constant(null) operator(\)) operator({) ident(bannerText) operator(=) string operator(+) ident(bannerText) operator(+) stringoperator(;) operator(}) ident(adaptor) operator(=) keyword(new) ident(TextAreaReadline)operator(()ident(textPane)operator(,) ident(bannerText)operator(\))operator(;) ident(inputStream) operator(=) ident(adaptor)operator(.)ident(getInputStream)operator(()operator(\))operator(;) ident(outputStream) operator(=) keyword(new) pre_type(PrintStream)operator(()ident(adaptor)operator(.)ident(getOutputStream)operator(()operator(\))operator(\))operator(;) ident(errorStream) operator(=) keyword(new) pre_type(PrintStream)operator(()ident(adaptor)operator(.)ident(getOutputStream)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(InputStream) ident(getInputStream)operator(()operator(\)) operator({) keyword(return) ident(inputStream)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getOutputStream)operator(()operator(\)) operator({) keyword(return) ident(outputStream)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getErrorStream)operator(()operator(\)) operator({) keyword(return) ident(errorStream)operator(;) operator(}) directive(public) type(void) ident(attach)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Applet) ident(applet)operator(\)) operator({) ident(adaptor)operator(.)ident(hookIntoRuntime)operator(()ident(runtime)operator(\))operator(;) ident(applet)operator(.)ident(add)operator(()ident(scrollPane)operator(\))operator(;) ident(applet)operator(.)ident(validate)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(destroy)operator(()operator(\)) operator({) pre_type(Container) ident(parent) operator(=) ident(scrollPane)operator(.)ident(getParent)operator(()operator(\))operator(;) ident(adaptor)operator(.)ident(shutdown)operator(()operator(\))operator(;) keyword(if) operator(()ident(parent) operator(!=) pre_constant(null)operator(\)) operator({) ident(parent)operator(.)ident(remove)operator(()ident(scrollPane)operator(\))operator(;) operator(}) operator(}) directive(private) pre_type(Font) ident(findFont)operator(()pre_type(String) ident(otherwise)operator(,) type(int) ident(style)operator(,) type(int) ident(size)operator(,) pre_type(String)type([]) ident(families)operator(\)) operator({) pre_type(String)type([]) ident(fonts) operator(=) pre_type(GraphicsEnvironment)operator(.)ident(getLocalGraphicsEnvironment)operator(()operator(\))operator(.)ident(getAvailableFontFamilyNames)operator(()operator(\))operator(;) pre_type(Arrays)operator(.)ident(sort)operator(()ident(fonts)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(families)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()pre_type(Arrays)operator(.)ident(binarySearch)operator(()ident(fonts)operator(,) ident(families)operator([)ident(i)operator(])operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(return) keyword(new) pre_type(Font)operator(()ident(families)operator([)ident(i)operator(])operator(,) ident(style)operator(,) ident(size)operator(\))operator(;) operator(}) operator(}) keyword(return) keyword(new) pre_type(Font)operator(()ident(otherwise)operator(,) ident(style)operator(,) ident(size)operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.BufferedWriter)operator(;) keyword(import) include(java.io.OutputStreamWriter)operator(;) keyword(import) include(java.net.InetAddress)operator(;) keyword(import) include(java.net.Socket)operator(;) comment(/** * @author Ola Bini */) directive(public) type(class) class(JRubyClient) directive(extends) ident(JRubyService) operator({) directive(public) ident(JRubyClient)operator(()pre_type(String)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) pre_type(Configuration) ident(conf) operator(=) keyword(new) pre_type(Configuration)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(conf)operator(.)ident(getPort)operator(()operator(\)) operator(+) string operator(+) ident(conf)operator(.)ident(getKey)operator(()operator(\)) operator(+) string operator(+) ident(conf)operator(.)ident(getCommand)operator(()operator(\))operator(\))operator(;) operator(}) pre_type(Socket) ident(socket) operator(=) keyword(new) pre_type(Socket)operator(()pre_type(InetAddress)operator(.)ident(getLocalHost)operator(()operator(\))operator(,) ident(conf)operator(.)ident(getPort)operator(()operator(\))operator(\))operator(;) pre_type(BufferedWriter) ident(writer) operator(=) keyword(new) pre_type(BufferedWriter)operator(()keyword(new) pre_type(OutputStreamWriter)operator(()ident(socket)operator(.)ident(getOutputStream)operator(()operator(\))operator(\))operator(\))operator(;) keyword(if)operator(()ident(conf)operator(.)ident(terminate)operator(()operator(\))operator(\)) operator({) ident(writer)operator(.)ident(write)operator(()ident(CMD_TERM) operator(+) string operator(+) ident(conf)operator(.)ident(getKey)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(conf)operator(.)ident(noMore)operator(()operator(\))operator(\)) operator({) ident(writer)operator(.)ident(write)operator(()ident(CMD_NO_MORE) operator(+) string operator(+) ident(conf)operator(.)ident(getKey)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(writer)operator(.)ident(write)operator(()ident(CMD_START) operator(+) string operator(+) ident(conf)operator(.)ident(getKey)operator(()operator(\)) operator(+) string operator(+) ident(conf)operator(.)ident(getCommand)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(writer)operator(.)ident(flush)operator(()operator(\))operator(;) ident(writer)operator(.)ident(close)operator(()operator(\))operator(;) ident(socket)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(main)operator(()pre_type(String)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) keyword(new) ident(JRubyClient)operator(()ident(args)operator(\))operator(;) operator(}) operator(})comment(// JRubyClient) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.BufferedReader)operator(;) keyword(import) include(java.io.InputStreamReader)operator(;) keyword(import) include(java.net.InetAddress)operator(;) keyword(import) include(java.net.InetSocketAddress)operator(;) keyword(import) include(java.net.ServerSocket)operator(;) keyword(import) include(java.net.Socket)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.ArrayList)operator(;) comment(/** * @author Ola Bini */) directive(public) type(class) class(JRubyServer) directive(extends) ident(JRubyService) operator({) directive(private) pre_type(Configuration) ident(conf)operator(;) directive(private) type(boolean) ident(stillStarting) operator(=) pre_constant(true)operator(;) directive(private) ident(JRubyServer)operator(()pre_type(String)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(conf) operator(=) keyword(new) pre_type(Configuration)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(conf)operator(.)ident(getPort)operator(()operator(\)) operator(+) string operator(+) ident(conf)operator(.)ident(getKey)operator(()operator(\))operator(\))operator(;) operator(}) pre_type(ServerSocket) ident(server) operator(=) keyword(new) pre_type(ServerSocket)operator(()operator(\))operator(;) ident(server)operator(.)ident(bind)operator(()keyword(new) pre_type(InetSocketAddress)operator(()pre_type(InetAddress)operator(.)ident(getLocalHost)operator(()operator(\))operator(,)ident(conf)operator(.)ident(getPort)operator(()operator(\))operator(\))operator(\))operator(;) keyword(while)operator(()pre_constant(true)operator(\)) operator({) pre_type(Thread) ident(t1) operator(=) keyword(new) pre_type(Thread)operator(()keyword(new) pre_type(Handler)operator(()ident(server)operator(.)ident(accept)operator(()operator(\))operator(\))operator(\))operator(;) ident(t1)operator(.)ident(setDaemon)operator(()pre_constant(true)operator(\))operator(;) ident(t1)operator(.)ident(start)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) type(class) class(Handler) directive(implements) pre_type(Runnable) operator({) directive(private) pre_type(Socket) ident(socket)operator(;) directive(public) pre_type(Handler)operator(()pre_type(Socket) ident(socket)operator(\)) operator({) local_variable(this)operator(.)ident(socket) operator(=) ident(socket)operator(;) operator(}) directive(public) type(void) ident(run)operator(()operator(\)) operator({) keyword(try) operator({) pre_type(BufferedReader) ident(rr) operator(=) keyword(new) pre_type(BufferedReader)operator(()keyword(new) pre_type(InputStreamReader)operator(()local_variable(this)operator(.)ident(socket)operator(.)ident(getInputStream)operator(()operator(\))operator(\))operator(\))operator(;) pre_type(String) ident(command) operator(=) ident(rr)operator(.)ident(readLine)operator(()operator(\))operator(;) ident(rr)operator(.)ident(close)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(socket)operator(.)ident(close)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(socket) operator(=) pre_constant(null)operator(;) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(command)operator(\))operator(;) operator(}) pre_type(String)type([]) ident(cmds) operator(=) ident(command)operator(.)ident(split)operator(()stringoperator(,) integer(3)operator(\))operator(;) keyword(if)operator(()ident(cmds)operator([)integer(1)operator(])operator(.)ident(equals)operator(()ident(conf)operator(.)ident(getKey)operator(()operator(\))operator(\))operator(\)) operator({) keyword(if)operator(()ident(cmds)operator([)integer(0)operator(])operator(.)ident(equals)operator(()ident(CMD_TERM)operator(\))operator(\)) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) pre_type(System)operator(.)ident(exit)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(cmds)operator([)integer(0)operator(])operator(.)ident(equals)operator(()ident(CMD_NO_MORE)operator(\))operator(\)) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) ident(stillStarting) operator(=) pre_constant(false)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(cmds)operator([)integer(0)operator(])operator(.)ident(equals)operator(()ident(CMD_START)operator(\))operator(\)) operator({) keyword(if)operator(()ident(stillStarting)operator(\)) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(cmds)operator([)integer(2)operator(])operator(\))operator(;) operator(}) keyword(new) ident(Main)operator(()operator(\))operator(.)ident(run)operator(()ident(intoCommandArguments)operator(()ident(cmds)operator([)integer(2)operator(])operator(.)ident(trim)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) keyword(if)operator(()ident(conf)operator(.)ident(isDebug)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) operator(}) operator(}) directive(protected) directive(static) pre_type(String)type([]) ident(intoCommandArguments)operator(()pre_type(String) ident(str)operator(\)) operator({) pre_type(List)operator(<)pre_type(String)operator(>) ident(args) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) type(boolean) ident(inSingle) operator(=) pre_constant(false)operator(;) type(int) ident(contentStart) operator(=) operator(-)integer(1)operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(,)ident(j)operator(=)ident(str)operator(.)ident(length)operator(()operator(\))operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) keyword(if)operator(()ident(str)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) string operator(&&) operator(!)ident(inSingle) operator(&&) ident(contentStart) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(args)operator(.)ident(add)operator(()ident(str)operator(.)ident(substring)operator(()ident(contentStart)operator(,)ident(i)operator(\))operator(\))operator(;) ident(contentStart) operator(=) operator(-)integer(1)operator(;) keyword(continue)operator(;) operator(}) keyword(if)operator(()ident(str)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) stringoperator(\)) operator({) keyword(continue)operator(;) operator(}) keyword(if)operator(()ident(str)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) string operator(&&) operator(!)ident(inSingle)operator(\)) operator({) ident(inSingle) operator(=) pre_constant(true)operator(;) ident(contentStart) operator(=) ident(i)operator(+)integer(1)operator(;) keyword(continue)operator(;) operator(}) keyword(if)operator(()ident(str)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) stringoperator(\)) operator({) ident(inSingle) operator(=) pre_constant(false)operator(;) ident(args)operator(.)ident(add)operator(()ident(str)operator(.)ident(substring)operator(()ident(contentStart)operator(,)ident(i)operator(\))operator(\))operator(;) ident(contentStart) operator(=) operator(-)integer(1)operator(;) keyword(continue)operator(;) operator(}) keyword(if)operator(()ident(contentStart) operator(==) operator(-)integer(1)operator(\)) operator({) ident(contentStart) operator(=) ident(i)operator(;) operator(}) operator(}) keyword(if)operator(()ident(contentStart) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(args)operator(.)ident(add)operator(()ident(str)operator(.)ident(substring)operator(()ident(contentStart)operator(\))operator(\))operator(;) operator(}) keyword(return) operator(()pre_type(String)type([])operator(\))ident(args)operator(.)ident(toArray)operator(()keyword(new) pre_type(String)operator([)integer(0)operator(])operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(main)operator(()pre_type(String)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) keyword(new) ident(JRubyServer)operator(()ident(args)operator(\))operator(;) operator(}) operator(})comment(// JRubyServer) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) comment(/** * @author Ola Bini */) directive(public) directive(abstract) type(class) class(JRubyService) operator({) directive(protected) directive(static) type(class) class(Configuration) operator({) directive(private) directive(final) directive(static) type(int) ident(DEFAULT_PORT) operator(=) integer(19222)operator(;) directive(private) pre_type(String) ident(key)operator(;) directive(private) type(int) ident(port) operator(=) ident(DEFAULT_PORT)operator(;) directive(private) type(boolean) ident(terminate)operator(;) directive(private) type(boolean) ident(noMore)operator(;) directive(private) type(boolean) ident(debug)operator(;) directive(private) pre_type(String) ident(command)operator(;) directive(public) pre_type(Configuration)operator(()pre_type(String) ident(args)operator(\)) operator({) type(int) ident(i)operator(=)integer(0)operator(;) type(int) ident(stop)operator(;) ident(loop)operator(:) keyword(for)operator(()type(int) ident(j)operator(=)ident(args)operator(.)ident(length)operator(()operator(\))operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) keyword(if)operator(()ident(args)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) string operator(&&) ident(i)operator(+)integer(1) operator(<) ident(j)operator(\)) operator({) keyword(switch)operator(()ident(args)operator(.)ident(charAt)operator(()operator(++)ident(i)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) ident(stop) operator(=) ident(args)operator(.)ident(indexOf)operator(()stringoperator(,) operator(()operator(++)ident(i)operator(\)) operator(+) integer(1)operator(\))operator(;) keyword(if)operator(()ident(stop) operator(==) operator(-)integer(1)operator(\)) operator({) ident(stop) operator(=) ident(args)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(key) operator(=) ident(args)operator(.)ident(substring)operator(()ident(i)operator(,) ident(stop)operator(\))operator(.)ident(trim)operator(()operator(\))operator(;) ident(i) operator(=) ident(stop)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(stop) operator(=) ident(args)operator(.)ident(indexOf)operator(()stringoperator(,) operator(()operator(++)ident(i)operator(\)) operator(+) integer(1)operator(\))operator(;) keyword(if)operator(()ident(stop) operator(==) operator(-)integer(1)operator(\)) operator({) ident(stop) operator(=) ident(args)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(port) operator(=) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(args)operator(.)ident(substring)operator(()ident(i)operator(,) ident(stop)operator(\))operator(.)ident(trim)operator(()operator(\))operator(\))operator(;) ident(i) operator(=) ident(stop)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(terminate) operator(=) pre_constant(true)operator(;) ident(i)operator(++)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(noMore) operator(=) pre_constant(true)operator(;) ident(i)operator(++)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(debug) operator(=) pre_constant(true)operator(;) ident(i)operator(++)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// handle everything after -- as arguments to the jruby process) ident(i)operator(++)operator(;) keyword(break) ident(loop)operator(;) keyword(default)operator(:) ident(i)operator(--)operator(;) keyword(break) ident(loop)operator(;) operator(}) operator(}) keyword(else) keyword(if)operator(()ident(args)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(!=) stringoperator(\)) operator({) keyword(break) ident(loop)operator(;) operator(}) operator(}) keyword(if)operator(()ident(i)operator(<)ident(args)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(command) operator(=) ident(args)operator(.)ident(substring)operator(()ident(i)operator(\))operator(.)ident(trim)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) pre_type(String) ident(getKey)operator(()operator(\)) operator({) keyword(return) ident(key)operator(;) operator(}) directive(public) type(int) ident(getPort)operator(()operator(\)) operator({) keyword(return) ident(port)operator(;) operator(}) directive(public) type(boolean) ident(terminate)operator(()operator(\)) operator({) keyword(return) ident(terminate)operator(;) operator(}) directive(public) type(boolean) ident(noMore)operator(()operator(\)) operator({) keyword(return) ident(noMore)operator(;) operator(}) directive(public) type(boolean) ident(isDebug)operator(()operator(\)) operator({) keyword(return) ident(debug)operator(;) operator(}) directive(public) pre_type(String) ident(getCommand)operator(()operator(\)) operator({) keyword(return) ident(command)operator(;) operator(}) operator(}) directive(public) directive(static) directive(final) pre_type(String) ident(CMD_START) operator(=) stringoperator(;) directive(public) directive(static) directive(final) pre_type(String) ident(CMD_NO_MORE) operator(=) stringoperator(;) directive(public) directive(static) directive(final) pre_type(String) ident(CMD_TERM) operator(=) stringoperator(;) operator(})comment(// JRubyService) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004-2006 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Kiel Hodges * Copyright (C\) 2005 Jason Voegele * Copyright (C\) 2005 Tim Azzopardi * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(org.jruby.exceptions.MainExitException)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.exceptions.ThreadKill)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.SafePropertyAccessor)operator(;) keyword(import) include(org.jruby.util.SimpleSampler)operator(;) comment(/** * Class used to launch the interpreter. * This is the main class as defined in the jruby.mf manifest. * It is very basic and does not support yet the same array of switches * as the C interpreter. * Usage: java -jar jruby.jar [switches] [rubyfile.rb] [arguments] * -e 'command' one line of script. Several -e's allowed. Omit [programfile] * @author jpetersen */) directive(public) type(class) class(Main) operator({) directive(private) type(boolean) ident(hasPrintedUsage) operator(=) pre_constant(false)operator(;) directive(private) directive(final) ident(RubyInstanceConfig) ident(config)operator(;) directive(public) ident(Main)operator(()ident(RubyInstanceConfig) ident(config)operator(\)) operator({) local_variable(this)operator(.)ident(config) operator(=) ident(config)operator(;) operator(}) directive(public) ident(Main)operator(()directive(final) pre_type(InputStream) ident(in)operator(,) directive(final) pre_type(PrintStream) ident(out)operator(,) directive(final) pre_type(PrintStream) ident(err)operator(\)) operator({) local_variable(this)operator(()keyword(new) ident(RubyInstanceConfig)operator(()operator(\))operator({)operator({) ident(setInput)operator(()ident(in)operator(\))operator(;) ident(setOutput)operator(()ident(out)operator(\))operator(;) ident(setError)operator(()ident(err)operator(\))operator(;) operator(})operator(})operator(\))operator(;) operator(}) directive(public) ident(Main)operator(()operator(\)) operator({) local_variable(this)operator(()keyword(new) ident(RubyInstanceConfig)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(main)operator(()pre_type(String)type([]) ident(args)operator(\)) operator({) ident(Main) ident(main) operator(=) keyword(new) ident(Main)operator(()operator(\))operator(;) keyword(try) operator({) type(int) ident(status) operator(=) ident(main)operator(.)ident(run)operator(()ident(args)operator(\))operator(;) keyword(if) operator(()ident(status) operator(!=) integer(0)operator(\)) operator({) pre_type(System)operator(.)ident(exit)operator(()ident(status)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(RaiseException) ident(re)operator(\)) operator({) keyword(throw) ident(re)operator(;) operator(}) keyword(catch) operator(()pre_type(Throwable) ident(t)operator(\)) operator({) comment(// print out as a nice Ruby backtrace) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()ident(ThreadContext)operator(.)ident(createRawBacktraceStringFromThrowable)operator(()ident(t)operator(\))operator(\))operator(;) pre_type(System)operator(.)ident(exit)operator(()integer(1)operator(\))operator(;) operator(}) operator(}) directive(public) type(int) ident(run)operator(()pre_type(String)type([]) ident(args)operator(\)) operator({) keyword(try) operator({) ident(config)operator(.)ident(processArguments)operator(()ident(args)operator(\))operator(;) keyword(return) ident(run)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(MainExitException) ident(mee)operator(\)) operator({) keyword(if) operator(()operator(!)ident(mee)operator(.)ident(isAborted)operator(()operator(\))operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(println)operator(()ident(mee)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(mee)operator(.)ident(isUsageError)operator(()operator(\))operator(\)) operator({) ident(printUsage)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(mee)operator(.)ident(getStatus)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(OutOfMemoryError) ident(oome)operator(\)) operator({) comment(// produce a nicer error since Rubyists aren't used to seeing this) pre_type(System)operator(.)ident(gc)operator(()operator(\))operator(;) pre_type(String) ident(memoryMax) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) pre_type(String) ident(message) operator(=) stringoperator(;) keyword(if) operator(()ident(memoryMax) operator(!=) pre_constant(null)operator(\)) operator({) ident(message) operator(=) string operator(+) ident(memoryMax)operator(;) operator(}) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(message) operator(+) stringoperator(\))operator(;) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(getVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(oome)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) keyword(return) integer(1)operator(;) operator(}) keyword(catch) operator(()exception(StackOverflowError) ident(soe)operator(\)) operator({) comment(// produce a nicer error since Rubyists aren't used to seeing this) pre_type(System)operator(.)ident(gc)operator(()operator(\))operator(;) pre_type(String) ident(stackMax) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) pre_type(String) ident(message) operator(=) stringoperator(;) keyword(if) operator(()ident(stackMax) operator(!=) pre_constant(null)operator(\)) operator({) ident(message) operator(=) string operator(+) ident(stackMax)operator(;) operator(}) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(message) operator(+) stringoperator(\))operator(;) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(getVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(soe)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) keyword(return) integer(1)operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedClassVersionError) ident(ucve)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(getVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(ucve)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) keyword(return) integer(1)operator(;) operator(}) keyword(catch) operator(()ident(ThreadKill) ident(kill)operator(\)) operator({) keyword(return) integer(0)operator(;) operator(}) operator(}) directive(public) type(int) ident(run)operator(()operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isShowVersion)operator(()operator(\))operator(\)) operator({) ident(showVersion)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(isShowCopyright)operator(()operator(\))operator(\)) operator({) ident(showCopyright)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(config)operator(.)ident(shouldRunInterpreter)operator(()operator(\)) operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(shouldPrintUsage)operator(()operator(\))operator(\)) operator({) ident(printUsage)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(shouldPrintProperties)operator(()operator(\))operator(\)) operator({) ident(printProperties)operator(()operator(\))operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) pre_type(InputStream) ident(in) operator(=) ident(config)operator(.)ident(getScriptSource)operator(()operator(\))operator(;) pre_type(String) ident(filename) operator(=) ident(config)operator(.)ident(displayedFileName)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(Ruby)operator(.)ident(newInstance)operator(()ident(config)operator(\))operator(;) comment(// set thread context JRuby classloader here, for the main thread) keyword(try) operator({) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\))operator(.)ident(setContextClassLoader)operator(()ident(runtime)operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(SecurityException) ident(se)operator(\)) operator({) comment(// can't set TC classloader) keyword(if) operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(in) operator(==) pre_constant(null)operator(\)) operator({) comment(// no script to run, return success below) operator(}) keyword(else) keyword(if) operator(()ident(config)operator(.)ident(isShouldCheckSyntax)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(parseFromMain)operator(()ident(in)operator(,) ident(filename)operator(\))operator(;) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) type(long) ident(now) operator(=) operator(-)integer(1)operator(;) keyword(try) operator({) keyword(if) operator(()ident(config)operator(.)ident(isBenchmarking)operator(()operator(\))operator(\)) operator({) ident(now) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(isSamplingEnabled)operator(()operator(\))operator(\)) operator({) ident(SimpleSampler)operator(.)ident(startSampleThread)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) ident(runtime)operator(.)ident(runFromMain)operator(()ident(in)operator(,) ident(filename)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(tearDown)operator(()operator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(isBenchmarking)operator(()operator(\))operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(println)operator(()string operator(+) operator(()pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(-) ident(now)operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(isSamplingEnabled)operator(()operator(\))operator(\)) operator({) ident(org)operator(.)ident(jruby)operator(.)ident(util)operator(.)ident(SimpleSampler)operator(.)ident(report)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) keyword(catch) operator(()ident(RaiseException) ident(rj)operator(\)) operator({) ident(RubyException) ident(raisedException) operator(=) ident(rj)operator(.)ident(getException)operator(()operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSystemExit)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(raisedException)operator(\))operator(\)) operator({) ident(IRubyObject) ident(status) operator(=) ident(raisedException)operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(status) operator(!=) pre_constant(null) operator(&&) operator(!)ident(status)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(status)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(printError)operator(()ident(raisedException)operator(\))operator(;) keyword(return) integer(1)operator(;) operator(}) operator(}) operator(}) keyword(return) integer(0)operator(;) operator(}) directive(private) type(void) ident(showVersion)operator(()operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(print)operator(()ident(config)operator(.)ident(getVersionString)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) type(void) ident(showCopyright)operator(()operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(print)operator(()ident(config)operator(.)ident(getCopyrightString)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(printUsage)operator(()operator(\)) operator({) keyword(if) operator(()operator(!)ident(hasPrintedUsage)operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(print)operator(()ident(config)operator(.)ident(getBasicUsageHelp)operator(()operator(\))operator(\))operator(;) ident(hasPrintedUsage) operator(=) pre_constant(true)operator(;) operator(}) operator(}) directive(public) type(void) ident(printProperties)operator(()operator(\)) operator({) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(.)ident(print)operator(()ident(config)operator(.)ident(getPropertyHelp)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004-2006 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.ref.SoftReference)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) directive(public) directive(final) type(class) class(MetaClass) directive(extends) ident(RubyClass) operator({) directive(private) pre_type(SoftReference)operator(<)ident(IRubyObject)operator(>) ident(attached) operator(=) keyword(new) pre_type(SoftReference)operator(<)ident(IRubyObject)operator(>)operator(()pre_constant(null)operator(\))operator(;) comment(/** NEWOBJ (in RubyObject#getSingletonClassClone(\)\) * */) directive(public) ident(MetaClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) pre_constant(null)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_class_boot (for MetaClasses\) (in makeMetaClass(RubyClass\)\) * */) directive(public) ident(MetaClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(superClass)operator(,) pre_constant(false)operator(\))operator(;) ident(index) operator(=) ident(superClass)operator(.)ident(index)operator(;) comment(// use same ClassIndex as metaclass, since we're technically still of that type) operator(}) directive(public) type(boolean) ident(isSingleton)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) comment(/** * If an object uses an anonymous class 'class << obj', then this grabs the original * metaclass and not the one that get injected as a result of 'class << obj'. */) directive(public) ident(RubyClass) ident(getRealClass)operator(()operator(\)) operator({) keyword(return) ident(superClass)operator(.)ident(getRealClass)operator(()operator(\))operator(;) operator(}) directive(public) directive(final) ident(IRubyObject) ident(allocate)operator(()operator(\))operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(getAttached)operator(()operator(\)) operator({) keyword(return) ident(attached)operator(.)ident(get)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(setAttached)operator(()ident(IRubyObject) ident(attached)operator(\)) operator({) local_variable(this)operator(.)ident(attached) operator(=) keyword(new) pre_type(SoftReference)operator(<)ident(IRubyObject)operator(>)operator(()ident(attached)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2005 David Corbin * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.javasupport.Java)operator(;) keyword(import) include(org.jruby.javasupport.JavaObject)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyClass)operator(()ident(name) operator(=) stringoperator(,) ident(parent) operator(=) stringoperator(\)) directive(public) type(class) class(NativeException) directive(extends) ident(RubyException) operator({) directive(private) directive(final) pre_type(Throwable) ident(cause)operator(;) directive(public) directive(static) directive(final) pre_type(String) ident(CLASS_NAME) operator(=) stringoperator(;) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(public) ident(NativeException)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(Throwable) ident(cause)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) ident(cause)operator(.)ident(getClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(cause)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) local_variable(this)operator(.)ident(cause) operator(=) ident(cause)operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(baseClass)operator(\)) operator({) comment(// FIXME: If NativeException is expected to be used from Ruby code, it should provide) comment(// a real allocator to be used. Otherwise Class.new will fail, as will marshalling. JRUBY-415) ident(RubyClass) ident(exceptionClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()ident(CLASS_NAME)operator(,) ident(baseClass)operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(exceptionClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(NativeException)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(exceptionClass)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(cause)operator(()ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(Java)operator(.)ident(wrap)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(cause)operator(\))operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(backtrace)operator(()operator(\)) operator({) ident(IRubyObject) ident(rubyTrace) operator(=) local_variable(super)operator(.)ident(backtrace)operator(()operator(\))operator(;) keyword(if) operator(()ident(rubyTrace)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(rubyTrace)operator(;) operator(}) ident(RubyArray) ident(array) operator(=) operator(()ident(RubyArray)operator(\)) ident(rubyTrace)operator(.)ident(dup)operator(()operator(\))operator(;) pre_type(StackTraceElement)type([]) ident(stackTrace) operator(=) ident(cause)operator(.)ident(getStackTrace)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(stackTrace)operator(.)ident(length) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) pre_type(StackTraceElement) ident(element) operator(=) ident(stackTrace)operator([)ident(i)operator(])operator(;) pre_type(String) ident(className) operator(=) ident(element)operator(.)ident(getClassName)operator(()operator(\))operator(;) pre_type(String) ident(line) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(element)operator(.)ident(getFileName)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(line) operator(=) ident(className) operator(+) string operator(+) ident(element)operator(.)ident(getLineNumber)operator(()operator(\)) operator(+) string operator(+) ident(element)operator(.)ident(getMethodName)operator(()operator(\)) operator(+) stringoperator(;) operator(}) keyword(else) operator({) type(int) ident(index) operator(=) ident(className)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) pre_type(String) ident(packageName) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(index) operator(==) operator(-)integer(1)operator(\)) operator({) ident(packageName) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(packageName) operator(=) ident(className)operator(.)ident(substring)operator(()integer(0)operator(,) ident(index)operator(\)) operator(+) stringoperator(;) operator(}) ident(line) operator(=) ident(packageName)operator(.)ident(replace)operator(()stringoperator(,) stringoperator(\)) operator(+) ident(element)operator(.)ident(getFileName)operator(()operator(\)) operator(+) string operator(+) ident(element)operator(.)ident(getLineNumber)operator(()operator(\)) operator(+) string operator(+) ident(element)operator(.)ident(getMethodName)operator(()operator(\)) operator(+) stringoperator(;) operator(}) ident(RubyString) ident(string) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(line)operator(\))operator(;) ident(array)operator(.)ident(unshift)operator(()ident(string)operator(\))operator(;) operator(}) keyword(return) ident(array)operator(;) operator(}) directive(public) type(void) ident(printBacktrace)operator(()pre_type(PrintStream) ident(errorStream)operator(\)) operator({) local_variable(super)operator(.)ident(printBacktrace)operator(()ident(errorStream)operator(\))operator(;) ident(errorStream)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(cause)operator(.)ident(printStackTrace)operator(()ident(errorStream)operator(\))operator(;) operator(}) directive(public) pre_type(Throwable) ident(getCause)operator(()operator(\)) operator({) keyword(return) ident(cause)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) comment(/** * @author Ola Bini */) directive(public) type(interface) class(Profile) operator({) ident(Profile) ident(ALL) operator(=) keyword(new) ident(Profile)operator(()operator(\)) operator({) directive(public) type(boolean) ident(allowBuiltin)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowClass)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowModule)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowLoad)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowRequire)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(})operator(;) ident(Profile) ident(DEBUG_ALLOW) operator(=) keyword(new) ident(Profile)operator(()operator(\)) operator({) directive(public) type(boolean) ident(allowBuiltin)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(+)ident(name)operator(+)stringoperator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowClass)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(+)ident(name)operator(+)stringoperator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowModule)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(+)ident(name)operator(+)stringoperator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowLoad)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(+)ident(name)operator(+)stringoperator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowRequire)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(+)ident(name)operator(+)stringoperator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) operator(})operator(;) ident(Profile) ident(NO_FILE_CLASS) operator(=) keyword(new) ident(Profile)operator(()operator(\)) operator({) directive(public) type(boolean) ident(allowBuiltin)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowClass)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) operator(!)ident(name)operator(.)ident(equals)operator(()stringoperator(\))operator(;) operator(}) directive(public) type(boolean) ident(allowModule)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowLoad)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(allowRequire)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(})operator(;) ident(Profile) ident(ANY) operator(=) ident(ALL)operator(;) ident(Profile) ident(DEFAULT) operator(=) ident(ALL)operator(;) type(boolean) ident(allowBuiltin)operator(()pre_type(String) ident(name)operator(\))operator(;) type(boolean) ident(allowClass)operator(()pre_type(String) ident(name)operator(\))operator(;) type(boolean) ident(allowModule)operator(()pre_type(String) ident(name)operator(\))operator(;) type(boolean) ident(allowLoad)operator(()pre_type(String) ident(name)operator(\))operator(;) type(boolean) ident(allowRequire)operator(()pre_type(String) ident(name)operator(\))operator(;) operator(})comment(// Profile) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2006 Michael Studman * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2007 Nick Sieger * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.ByteArrayInputStream)operator(;) keyword(import) include(java.io.File)operator(;) keyword(import) include(java.io.FileDescriptor)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(java.io.UnsupportedEncodingException)operator(;) keyword(import) include(java.lang.ref.WeakReference)operator(;) keyword(import) include(java.lang.reflect.Field)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.Collections)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Hashtable)operator(;) keyword(import) include(java.util.IdentityHashMap)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.Random)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(java.util.Stack)operator(;) keyword(import) include(java.util.Vector)operator(;) keyword(import) include(java.util.WeakHashMap)operator(;) keyword(import) include(java.util.concurrent.ConcurrentHashMap)operator(;) keyword(import) include(java.util.concurrent.ExecutorService)operator(;) keyword(import) include(java.util.concurrent.Executors)operator(;) keyword(import) include(java.util.concurrent.SynchronousQueue)operator(;) keyword(import) include(java.util.concurrent.ThreadFactory)operator(;) keyword(import) include(java.util.concurrent.ThreadPoolExecutor)operator(;) keyword(import) include(java.util.concurrent.TimeUnit)operator(;) keyword(import) include(java.util.concurrent.atomic.AtomicInteger)operator(;) keyword(import) include(org.joda.time.DateTimeZone)operator(;) keyword(import) include(org.jruby.ast.Node)operator(;) keyword(import) include(org.jruby.ast.executable.RubiniusRunner)operator(;) keyword(import) include(org.jruby.ast.executable.Script)operator(;) keyword(import) include(org.jruby.ast.executable.YARVCompiledRunner)operator(;) keyword(import) include(org.jruby.common.RubyWarnings)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.compiler.ASTCompiler)operator(;) keyword(import) include(org.jruby.compiler.ASTInspector)operator(;) keyword(import) include(org.jruby.compiler.JITCompiler)operator(;) keyword(import) include(org.jruby.compiler.NotCompilableException)operator(;) keyword(import) include(org.jruby.compiler.impl.StandardASMCompiler)operator(;) keyword(import) include(org.jruby.compiler.yarv.StandardYARVCompiler)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.ext.JRubyPOSIXHandler)operator(;) keyword(import) include(org.jruby.ext.LateLoadingLibrary)operator(;) keyword(import) include(org.jruby.ext.posix.POSIX)operator(;) keyword(import) include(org.jruby.ext.posix.POSIXFactory)operator(;) keyword(import) include(org.jruby.internal.runtime.GlobalVariables)operator(;) keyword(import) include(org.jruby.internal.runtime.ThreadService)operator(;) keyword(import) include(org.jruby.internal.runtime.ValueAccessor)operator(;) keyword(import) include(org.jruby.javasupport.JavaSupport)operator(;) keyword(import) include(org.jruby.management.BeanManager)operator(;) keyword(import) include(org.jruby.management.ClassCache)operator(;) keyword(import) include(org.jruby.management.Config)operator(;) keyword(import) include(org.jruby.parser.Parser)operator(;) keyword(import) include(org.jruby.parser.ParserConfiguration)operator(;) keyword(import) include(org.jruby.runtime.Binding)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CacheMap)operator(;) keyword(import) include(org.jruby.runtime.CallSite)operator(;) keyword(import) include(org.jruby.runtime.CallbackFactory)operator(;) keyword(import) include(org.jruby.runtime.DynamicScope)operator(;) keyword(import) include(org.jruby.runtime.EventHook)operator(;) keyword(import) include(org.jruby.runtime.GlobalVariable)operator(;) keyword(import) include(org.jruby.runtime.IAccessor)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ObjectSpace)operator(;) keyword(import) include(org.jruby.runtime.RubyEvent)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.load.Library)operator(;) keyword(import) include(org.jruby.runtime.load.LoadService)operator(;) keyword(import) include(org.jruby.util.BuiltinScript)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.IOInputStream)operator(;) keyword(import) include(org.jruby.util.IOOutputStream)operator(;) keyword(import) include(org.jruby.util.JRubyClassLoader)operator(;) keyword(import) include(org.jruby.util.JavaNameMangler)operator(;) keyword(import) include(org.jruby.util.KCode)operator(;) keyword(import) include(org.jruby.util.SafePropertyAccessor)operator(;) keyword(import) include(org.jruby.util.collections.WeakHashSet)operator(;) keyword(import) include(org.jruby.util.io.ChannelDescriptor)operator(;) comment(/** * The Ruby object represents the top-level of a JRuby "instance" in a given VM. * JRuby supports spawning multiple instances in the same JVM. Generally, objects * created under these instances are tied to a given runtime, for such details * as identity and type, because multiple Ruby instances means there are * multiple instances of each class. This means that in multi-runtime mode * (or really, multi-VM mode, where each JRuby instance is a ruby "VM"\), objects * generally can't be transported across runtimes without marshaling. * * This class roots everything that makes the JRuby runtime function, and * provides a number of utility methods for constructing global types and * accessing global runtime structures. */) directive(public) directive(final) type(class) class(Ruby) operator({) comment(/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */) directive(public) directive(static) ident(Ruby) ident(newInstance)operator(()operator(\)) operator({) keyword(return) ident(newInstance)operator(()keyword(new) ident(RubyInstanceConfig)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Returns a new instance of the JRuby runtime configured as specified. * * @param config The instance configuration * @return The JRuby runtime * @see org.jruby.RubyInstanceConfig */) directive(public) directive(static) ident(Ruby) ident(newInstance)operator(()ident(RubyInstanceConfig) ident(config)operator(\)) operator({) ident(Ruby) ident(ruby) operator(=) keyword(new) ident(Ruby)operator(()ident(config)operator(\))operator(;) ident(ruby)operator(.)ident(init)operator(()operator(\))operator(;) keyword(return) ident(ruby)operator(;) operator(}) comment(/** * Returns a new instance of the JRuby runtime configured with the given * input, output and error streams and otherwise default configuration * (except where specified system properties alter defaults\). * * @param in the custom input stream * @param out the custom output stream * @param err the custom error stream * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */) directive(public) directive(static) ident(Ruby) ident(newInstance)operator(()pre_type(InputStream) ident(in)operator(,) pre_type(PrintStream) ident(out)operator(,) pre_type(PrintStream) ident(err)operator(\)) operator({) ident(RubyInstanceConfig) ident(config) operator(=) keyword(new) ident(RubyInstanceConfig)operator(()operator(\))operator(;) ident(config)operator(.)ident(setInput)operator(()ident(in)operator(\))operator(;) ident(config)operator(.)ident(setOutput)operator(()ident(out)operator(\))operator(;) ident(config)operator(.)ident(setError)operator(()ident(err)operator(\))operator(;) keyword(return) ident(newInstance)operator(()ident(config)operator(\))operator(;) operator(}) comment(/** * Create and initialize a new JRuby runtime. The properties of the * specified RubyInstanceConfig will be used to determine various JRuby * runtime characteristics. * * @param config The configuration to use for the new instance * @see org.jruby.RubyInstanceConfig */) directive(private) ident(Ruby)operator(()ident(RubyInstanceConfig) ident(config)operator(\)) operator({) local_variable(this)operator(.)ident(config) operator(=) ident(config)operator(;) local_variable(this)operator(.)ident(threadService) operator(=) keyword(new) ident(ThreadService)operator(()local_variable(this)operator(\))operator(;) keyword(if)operator(()ident(config)operator(.)ident(isSamplingEnabled)operator(()operator(\))operator(\)) operator({) ident(org)operator(.)ident(jruby)operator(.)ident(util)operator(.)ident(SimpleSampler)operator(.)ident(registerThreadContext)operator(()ident(threadService)operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(in) operator(=) ident(config)operator(.)ident(getInput)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(out) operator(=) ident(config)operator(.)ident(getOutput)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(err) operator(=) ident(config)operator(.)ident(getError)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(objectSpaceEnabled) operator(=) ident(config)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(profile) operator(=) ident(config)operator(.)ident(getProfile)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(currentDirectory) operator(=) ident(config)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(kcode) operator(=) ident(config)operator(.)ident(getKCode)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(beanManager) operator(=) keyword(new) ident(BeanManager)operator(()local_variable(this)operator(,) ident(config)operator(.)ident(isManagementEnabled)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(jitCompiler) operator(=) keyword(new) ident(JITCompiler)operator(()local_variable(this)operator(\))operator(;) local_variable(this)operator(.)ident(beanManager)operator(.)ident(register)operator(()keyword(new) ident(Config)operator(()local_variable(this)operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(beanManager)operator(.)ident(register)operator(()keyword(new) ident(ClassCache)operator(()local_variable(this)operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(cacheMap) operator(=) keyword(new) ident(CacheMap)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** * Evaluates a script under the current scope (perhaps the top-level * scope\) and returns the result (generally the last value calculated\). * This version goes straight into the interpreter, bypassing compilation * and runtime preparation typical to normal script runs. * * @param script The scriptlet to run * @returns The result of the eval */) directive(public) ident(IRubyObject) ident(evalScriptlet)operator(()pre_type(String) ident(script)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) ident(Node) ident(node) operator(=) ident(parseEval)operator(()ident(script)operator(,) string)delimiter(")>operator(,) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(,) integer(0)operator(\))operator(;) keyword(try) operator({) keyword(return) ident(node)operator(.)ident(interpret)operator(()local_variable(this)operator(,) ident(context)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(throw) ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) keyword(throw) ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(RedoJump) ident(rj)operator(\)) operator({) keyword(throw) ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) operator(}) comment(/** * Parse and execute the specified script * This differs from the other methods in that it accepts a string-based script and * parses and runs it as though it were loaded at a command-line. This is the preferred * way to start up a new script when calling directly into the Ruby object (which is * generally *dis*couraged. * * @param script The contents of the script to run as a normal, root script * @return The last value of the script */) directive(public) ident(IRubyObject) ident(executeScript)operator(()pre_type(String) ident(script)operator(,) pre_type(String) ident(filename)operator(\)) operator({) type(byte)type([]) ident(bytes)operator(;) keyword(try) operator({) ident(bytes) operator(=) ident(script)operator(.)ident(getBytes)operator(()ident(KCode)operator(.)ident(NONE)operator(.)ident(getKCode)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedEncodingException) ident(e)operator(\)) operator({) ident(bytes) operator(=) ident(script)operator(.)ident(getBytes)operator(()operator(\))operator(;) operator(}) ident(Node) ident(node) operator(=) ident(parseInline)operator(()keyword(new) pre_type(ByteArrayInputStream)operator(()ident(bytes)operator(\))operator(,) ident(filename)operator(,) pre_constant(null)operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(oldFile) operator(=) ident(context)operator(.)ident(getFile)operator(()operator(\))operator(;) type(int) ident(oldLine) operator(=) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(;) keyword(try) operator({) ident(context)operator(.)ident(setFile)operator(()ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\))operator(\))operator(;) ident(context)operator(.)ident(setLine)operator(()ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getStartLine)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runNormally)operator(()ident(node)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(setFile)operator(()ident(oldFile)operator(\))operator(;) ident(context)operator(.)ident(setLine)operator(()ident(oldLine)operator(\))operator(;) operator(}) operator(}) comment(/** * Run the script contained in the specified input stream, using the * specified filename as the name of the script being executed. The stream * will be read fully before being parsed and executed. The given filename * will be used for the ruby $PROGRAM_NAME and $0 global variables in this * runtime. * * This method is intended to be called once per runtime, generally from * Main or from main-like top-level entry points. * * As part of executing the script loaded from the input stream, various * RubyInstanceConfig properties will be used to determine whether to * compile the script before execution or run with various wrappers (for * looping, printing, and so on, see jruby -help\). * * @param inputStream The InputStream from which to read the script contents * @param filename The filename to use when parsing, and for $PROGRAM_NAME * and $0 ruby global variables. */) directive(public) type(void) ident(runFromMain)operator(()pre_type(InputStream) ident(inputStream)operator(,) pre_type(String) ident(filename)operator(\)) operator({) ident(IAccessor) ident(d) operator(=) keyword(new) ident(ValueAccessor)operator(()ident(newString)operator(()ident(filename)operator(\))operator(\))operator(;) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(define)operator(()stringoperator(,) ident(d)operator(\))operator(;) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(define)operator(()stringoperator(,) ident(d)operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) ident(config)operator(.)ident(getOptionGlobals)operator(()operator(\))operator(.)ident(entrySet)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(Map)operator(.)ident(Entry) ident(entry) operator(=) operator(()pre_type(Map)operator(.)ident(Entry)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) pre_type(Object) ident(value) operator(=) ident(entry)operator(.)ident(getValue)operator(()operator(\))operator(;) ident(IRubyObject) ident(varvalue)operator(;) keyword(if) operator(()ident(value) operator(!=) pre_constant(null)operator(\)) operator({) ident(varvalue) operator(=) ident(newString)operator(()ident(value)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(varvalue) operator(=) ident(getTrue)operator(()operator(\))operator(;) operator(}) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()string operator(+) ident(entry)operator(.)ident(getKey)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) ident(varvalue)operator(\))operator(;) operator(}) keyword(if)operator(()ident(config)operator(.)ident(isYARVEnabled)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isShowBytecode)operator(()operator(\))operator(\)) pre_type(System)operator(.)ident(err)operator(.)ident(print)operator(()stringoperator(\))operator(;) keyword(new) ident(YARVCompiledRunner)operator(()local_variable(this)operator(,) ident(inputStream)operator(,) ident(filename)operator(\))operator(.)ident(run)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(config)operator(.)ident(isRubiniusEnabled)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isShowBytecode)operator(()operator(\))operator(\)) pre_type(System)operator(.)ident(err)operator(.)ident(print)operator(()stringoperator(\))operator(;) keyword(new) ident(RubiniusRunner)operator(()local_variable(this)operator(,) ident(inputStream)operator(,) ident(filename)operator(\))operator(.)ident(run)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(Node) ident(scriptNode) operator(=) ident(parseFromMain)operator(()ident(inputStream)operator(,) ident(filename)operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(oldFile) operator(=) ident(context)operator(.)ident(getFile)operator(()operator(\))operator(;) type(int) ident(oldLine) operator(=) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(;) keyword(try) operator({) ident(context)operator(.)ident(setFile)operator(()ident(scriptNode)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\))operator(\))operator(;) ident(context)operator(.)ident(setLine)operator(()ident(scriptNode)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getStartLine)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(isAssumePrinting)operator(()operator(\)) operator(||) ident(config)operator(.)ident(isAssumeLoop)operator(()operator(\))operator(\)) operator({) ident(runWithGetsLoop)operator(()ident(scriptNode)operator(,) ident(config)operator(.)ident(isAssumePrinting)operator(()operator(\))operator(,) ident(config)operator(.)ident(isProcessLineEnds)operator(()operator(\))operator(,) ident(config)operator(.)ident(isSplit)operator(()operator(\))operator(,) ident(config)operator(.)ident(isYARVCompileEnabled)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(runNormally)operator(()ident(scriptNode)operator(,) ident(config)operator(.)ident(isYARVCompileEnabled)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(setFile)operator(()ident(oldFile)operator(\))operator(;) ident(context)operator(.)ident(setLine)operator(()ident(oldLine)operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** * Parse the script contained in the given input stream, using the given * filename as the name of the script, and return the root Node. This * is used to verify that the script syntax is valid, for jruby -c. The * current scope (generally the top-level scope\) is used as the parent * scope for parsing. * * @param inputStream The input stream from which to read the script * @param filename The filename to use for parsing * @returns The root node of the parsed script */) directive(public) ident(Node) ident(parseFromMain)operator(()pre_type(InputStream) ident(inputStream)operator(,) pre_type(String) ident(filename)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isInlineScript)operator(()operator(\))operator(\)) operator({) keyword(return) ident(parseInline)operator(()ident(inputStream)operator(,) ident(filename)operator(,) ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentScope)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(parseFile)operator(()ident(inputStream)operator(,) ident(filename)operator(,) ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentScope)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** * Run the given script with a "while gets; end" loop wrapped around it. * This is primarily used for the -n command-line flag, to allow writing * a short script that processes input lines using the specified code. * * @param scriptNode The root node of the script to execute * @param printing Whether $_ should be printed after each loop (as in the * -p command-line flag\) * @param processLineEnds Whether line endings should be processed by * setting $\\ to $/ and chop!ing every line read * @param split Whether to split each line read using String#split * @param yarvCompile Whether to compile the target script to YARV (Ruby 1.9\) * bytecode before executing. * @return The result of executing the specified script */) directive(public) ident(IRubyObject) ident(runWithGetsLoop)operator(()ident(Node) ident(scriptNode)operator(,) type(boolean) ident(printing)operator(,) type(boolean) ident(processLineEnds)operator(,) type(boolean) ident(split)operator(,) type(boolean) ident(yarvCompile)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) ident(Script) ident(script) operator(=) pre_constant(null)operator(;) ident(YARVCompiledRunner) ident(runner) operator(=) pre_constant(null)operator(;) type(boolean) ident(compile) operator(=) ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompileMode)operator(()operator(\))operator(.)ident(shouldPrecompileCLI)operator(()operator(\))operator(;) keyword(if) operator(()ident(compile) operator(||) operator(!)ident(yarvCompile)operator(\)) operator({) ident(script) operator(=) ident(tryCompile)operator(()ident(scriptNode)operator(\))operator(;) keyword(if) operator(()ident(compile) operator(&&) ident(script) operator(==) pre_constant(null)operator(\)) operator({) comment(// terminate; tryCompile will have printed out an error and we're done) keyword(return) ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(yarvCompile)operator(\)) operator({) ident(runner) operator(=) ident(tryCompileYarv)operator(()ident(scriptNode)operator(\))operator(;) operator(}) keyword(if) operator(()ident(processLineEnds)operator(\)) operator({) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(while) operator(()ident(RubyKernel)operator(.)ident(gets)operator(()ident(context)operator(,) ident(getTopSelf)operator(()operator(\))operator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(loop)operator(:) keyword(while) operator(()pre_constant(true)operator(\)) operator({) comment(// Used for the 'redo' command) keyword(try) operator({) keyword(if) operator(()ident(processLineEnds)operator(\)) operator({) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(split)operator(\)) operator({) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(script) operator(!=) pre_constant(null)operator(\)) operator({) ident(runScript)operator(()ident(script)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(runner) operator(!=) pre_constant(null)operator(\)) operator({) ident(runYarv)operator(()ident(runner)operator(\))operator(;) operator(}) keyword(else) operator({) ident(runInterpreter)operator(()ident(scriptNode)operator(\))operator(;) operator(}) keyword(if) operator(()ident(printing)operator(\)) ident(RubyKernel)operator(.)ident(print)operator(()ident(context)operator(,) ident(getKernel)operator(()operator(\))operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(})operator(\))operator(;) keyword(break) ident(loop)operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(RedoJump) ident(rj)operator(\)) operator({) comment(// do nothing, this iteration restarts) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(NextJump) ident(nj)operator(\)) operator({) comment(// recheck condition) keyword(break) ident(loop)operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) comment(// end loop) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * Run the specified script without any of the loop-processing wrapper * code. * * @param scriptNode The root node of the script to be executed * @param yarvCompile Whether to compile the script to YARV (Ruby 1.9\) * bytecode before execution * @return The result of executing the script */) directive(public) ident(IRubyObject) ident(runNormally)operator(()ident(Node) ident(scriptNode)operator(,) type(boolean) ident(yarvCompile)operator(\)) operator({) ident(Script) ident(script) operator(=) pre_constant(null)operator(;) ident(YARVCompiledRunner) ident(runner) operator(=) pre_constant(null)operator(;) type(boolean) ident(compile) operator(=) ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompileMode)operator(()operator(\))operator(.)ident(shouldPrecompileCLI)operator(()operator(\))operator(;) type(boolean) ident(forceCompile) operator(=) ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompileMode)operator(()operator(\))operator(.)ident(shouldPrecompileAll)operator(()operator(\))operator(;) keyword(if) operator(()ident(yarvCompile)operator(\)) operator({) ident(runner) operator(=) ident(tryCompileYarv)operator(()ident(scriptNode)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(compile)operator(\)) operator({) ident(script) operator(=) ident(tryCompile)operator(()ident(scriptNode)operator(\))operator(;) keyword(if) operator(()ident(forceCompile) operator(&&) ident(script) operator(==) pre_constant(null)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) keyword(return) ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(script) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isShowBytecode)operator(()operator(\))operator(\)) operator({) keyword(return) ident(nilObject)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runScript)operator(()ident(script)operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(runner) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(runYarv)operator(()ident(runner)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(config)operator(.)ident(isShowBytecode)operator(()operator(\))operator(\)) pre_type(System)operator(.)ident(err)operator(.)ident(print)operator(()stringoperator(\))operator(;) keyword(return) ident(runInterpreter)operator(()ident(scriptNode)operator(\))operator(;) operator(}) operator(}) directive(private) ident(Script) ident(tryCompile)operator(()ident(Node) ident(node)operator(\)) operator({) keyword(return) ident(tryCompile)operator(()ident(node)operator(,) keyword(new) ident(JRubyClassLoader)operator(()ident(getJRubyClassLoader)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) ident(Script) ident(tryCompile)operator(()ident(Node) ident(node)operator(,) ident(JRubyClassLoader) ident(classLoader)operator(\)) operator({) ident(Script) ident(script) operator(=) pre_constant(null)operator(;) keyword(try) operator({) pre_type(String) ident(filename) operator(=) ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\))operator(;) pre_type(String) ident(classname) operator(=) ident(JavaNameMangler)operator(.)ident(mangledFilenameForStartupClasspath)operator(()ident(filename)operator(\))operator(;) ident(ASTInspector) ident(inspector) operator(=) keyword(new) ident(ASTInspector)operator(()operator(\))operator(;) ident(inspector)operator(.)ident(inspect)operator(()ident(node)operator(\))operator(;) ident(StandardASMCompiler) ident(asmCompiler) operator(=) keyword(new) ident(StandardASMCompiler)operator(()ident(classname)operator(,) ident(filename)operator(\))operator(;) ident(ASTCompiler) ident(compiler) operator(=) keyword(new) ident(ASTCompiler)operator(()operator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(isShowBytecode)operator(()operator(\))operator(\)) operator({) ident(compiler)operator(.)ident(compileRoot)operator(()ident(node)operator(,) ident(asmCompiler)operator(,) ident(inspector)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(\))operator(;) ident(asmCompiler)operator(.)ident(dumpClass)operator(()pre_type(System)operator(.)ident(out)operator(\))operator(;) operator(}) keyword(else) operator({) ident(compiler)operator(.)ident(compileRoot)operator(()ident(node)operator(,) ident(asmCompiler)operator(,) ident(inspector)operator(,) pre_constant(true)operator(,) pre_constant(false)operator(\))operator(;) operator(}) ident(script) operator(=) operator(()ident(Script)operator(\))ident(asmCompiler)operator(.)ident(loadClass)operator(()ident(classLoader)operator(\))operator(.)ident(newInstance)operator(()operator(\))operator(;) keyword(if) operator(()ident(config)operator(.)ident(isJitLogging)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(NotCompilableException) ident(nce)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isJitLoggingVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(nce)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) ident(nce)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(ClassNotFoundException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isJitLoggingVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) ident(e)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(InstantiationException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isJitLoggingVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) ident(e)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(IllegalAccessException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isJitLoggingVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) ident(e)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()pre_type(Throwable) ident(t)operator(\)) operator({) keyword(if) operator(()ident(config)operator(.)ident(isJitLoggingVerbose)operator(()operator(\))operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\)) operator(+) string operator(+) ident(t)operator(.)ident(getMessage)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(t)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(script)operator(;) operator(}) directive(private) ident(YARVCompiledRunner) ident(tryCompileYarv)operator(()ident(Node) ident(node)operator(\)) operator({) keyword(try) operator({) ident(StandardYARVCompiler) ident(compiler) operator(=) keyword(new) ident(StandardYARVCompiler)operator(()local_variable(this)operator(\))operator(;) ident(ASTCompiler)operator(.)ident(getYARVCompiler)operator(()operator(\))operator(.)ident(compile)operator(()ident(node)operator(,) ident(compiler)operator(\))operator(;) ident(org)operator(.)ident(jruby)operator(.)ident(lexer)operator(.)ident(yacc)operator(.)ident(ISourcePosition) ident(p) operator(=) ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(;) keyword(if)operator(()ident(p) operator(==) pre_constant(null) operator(&&) ident(node) keyword(instanceof) ident(org)operator(.)ident(jruby)operator(.)ident(ast)operator(.)ident(RootNode)operator(\)) operator({) ident(p) operator(=) operator(()operator(()ident(org)operator(.)ident(jruby)operator(.)ident(ast)operator(.)ident(RootNode)operator(\))ident(node)operator(\))operator(.)ident(getBodyNode)operator(()operator(\))operator(.)ident(getPosition)operator(()operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(YARVCompiledRunner)operator(()local_variable(this)operator(,)ident(compiler)operator(.)ident(getInstructionSequence)operator(()string)delimiter(")>operator(,)ident(p)operator(.)ident(getFile)operator(()operator(\))operator(,)stringoperator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(NotCompilableException) ident(nce)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(nce)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(runScript)operator(()ident(Script) ident(script)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) keyword(try) operator({) keyword(return) ident(script)operator(.)ident(load)operator(()ident(context)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(runYarv)operator(()ident(YARVCompiledRunner) ident(runner)operator(\)) operator({) keyword(try) operator({) keyword(return) ident(runner)operator(.)ident(run)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(runInterpreter)operator(()ident(Node) ident(scriptNode)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) keyword(assert) ident(scriptNode) operator(!=) pre_constant(null) operator(:) stringoperator(;) keyword(try) operator({) keyword(return) ident(scriptNode)operator(.)ident(interpret)operator(()local_variable(this)operator(,) ident(context)operator(,) ident(getTopSelf)operator(()operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) ident(BeanManager) ident(getBeanManager)operator(()operator(\)) operator({) keyword(return) ident(beanManager)operator(;) operator(}) directive(public) ident(JITCompiler) ident(getJITCompiler)operator(()operator(\)) operator({) keyword(return) ident(jitCompiler)operator(;) operator(}) comment(/** * @deprecated use #newInstance(\) */) directive(public) directive(static) ident(Ruby) ident(getDefaultInstance)operator(()operator(\)) operator({) keyword(return) ident(newInstance)operator(()operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(Ruby) ident(getCurrentInstance)operator(()operator(\)) operator({) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) type(void) ident(setCurrentInstance)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) operator(}) directive(public) type(int) ident(allocSymbolId)operator(()operator(\)) operator({) keyword(return) ident(symbolLastId)operator(.)ident(incrementAndGet)operator(()operator(\))operator(;) operator(}) directive(public) type(int) ident(allocModuleId)operator(()operator(\)) operator({) keyword(return) ident(moduleLastId)operator(.)ident(incrementAndGet)operator(()operator(\))operator(;) operator(}) comment(/** * Retrieve the module with the given name from the Object namespace. * * @param name The name of the module * @return The module or null if not found */) directive(public) ident(RubyModule) ident(getModule)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) operator(()ident(RubyModule)operator(\)) ident(objectClass)operator(.)ident(getConstantAt)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Retrieve the module with the given name from the Object namespace. The * module name must be an interned string, but this method will be faster * than the non-interned version. * * @param internedName The name of the module; must be an interned String * @return The module or null if not found */) directive(public) ident(RubyModule) ident(fastGetModule)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) operator(()ident(RubyModule)operator(\)) ident(objectClass)operator(.)ident(fastGetConstantAt)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** * Retrieve the class with the given name from the Object namespace. * * @param name The name of the class * @return The class */) directive(public) ident(RubyClass) ident(getClass)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(objectClass)operator(.)ident(getClass)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Retrieve the class with the given name from the Object namespace. The * module name must be an interned string, but this method will be faster * than the non-interned version. * * @param internedName the name of the class; must be an interned String! * @return */) directive(public) ident(RubyClass) ident(fastGetClass)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(return) ident(objectClass)operator(.)ident(fastGetClass)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** * Define a new class under the Object namespace. Roughly equivalent to * rb_define_class in MRI. * * @param name The name for the new class * @param superClass The super class for the new class * @param allocator An ObjectAllocator instance that can construct * instances of the new class. * @return The new class */) directive(public) ident(RubyClass) ident(defineClass)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(\)) operator({) keyword(return) ident(defineClassUnder)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(allocator)operator(,) ident(objectClass)operator(\))operator(;) operator(}) comment(/** * A variation of defineClass that allows passing in an array of subplementary * call sites for improving dynamic invocation performance. * * @param name The name for the new class * @param superClass The super class for the new class * @param allocator An ObjectAllocator instance that can construct * instances of the new class. * @return The new class */) directive(public) ident(RubyClass) ident(defineClass)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(,) ident(CallSite)type([]) ident(callSites)operator(\)) operator({) keyword(return) ident(defineClassUnder)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(allocator)operator(,) ident(objectClass)operator(,) ident(callSites)operator(\))operator(;) operator(}) comment(/** * Define a new class with the given name under the given module or class * namespace. Roughly equivalent to rb_define_class_under in MRI. * * If the name specified is already bound, its value will be returned if: * * It is a class * * No new superclass is being defined * * @param name The name for the new class * @param superClass The super class for the new class * @param allocator An ObjectAllocator instance that can construct * instances of the new class. * @param parent The namespace under which to define the new class * @return The new class */) directive(public) ident(RubyClass) ident(defineClassUnder)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(,) ident(RubyModule) ident(parent)operator(\)) operator({) keyword(return) ident(defineClassUnder)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(allocator)operator(,) ident(parent)operator(,) pre_constant(null)operator(\))operator(;) operator(}) comment(/** * A variation of defineClassUnder that allows passing in an array of * supplementary call sites to improve dynamic invocation. * * @param name The name for the new class * @param superClass The super class for the new class * @param allocator An ObjectAllocator instance that can construct * instances of the new class. * @param parent The namespace under which to define the new class * @param callSites The array of call sites to add * @return The new class */) directive(public) ident(RubyClass) ident(defineClassUnder)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(,) ident(RubyModule) ident(parent)operator(,) ident(CallSite)type([]) ident(callSites)operator(\)) operator({) ident(IRubyObject) ident(classObj) operator(=) ident(parent)operator(.)ident(getConstantAt)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(classObj) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(classObj) keyword(instanceof) ident(RubyClass)operator(\))operator(\)) keyword(throw) ident(newTypeError)operator(()ident(name) operator(+) stringoperator(\))operator(;) ident(RubyClass) ident(klazz) operator(=) operator(()ident(RubyClass)operator(\))ident(classObj)operator(;) keyword(if) operator(()ident(klazz)operator(.)ident(getSuperClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(superClass)operator(\)) operator({) keyword(throw) ident(newNameError)operator(()ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) comment(// If we define a class in Ruby, but later want to allow it to be defined in Java,) comment(// the allocator needs to be updated) keyword(if) operator(()ident(klazz)operator(.)ident(getAllocator)operator(()operator(\)) operator(!=) ident(allocator)operator(\)) operator({) ident(klazz)operator(.)ident(setAllocator)operator(()ident(allocator)operator(\))operator(;) operator(}) keyword(return) ident(klazz)operator(;) operator(}) type(boolean) ident(parentIsObject) operator(=) ident(parent) operator(==) ident(objectClass)operator(;) keyword(if) operator(()ident(superClass) operator(==) pre_constant(null)operator(\)) operator({) pre_type(String) ident(className) operator(=) ident(parentIsObject) operator(?) ident(name) operator(:) ident(parent)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(;) ident(warnings)operator(.)ident(warn)operator(()ident(ID)operator(.)ident(NO_SUPER_CLASS)operator(,) string operator(+) ident(className) operator(+) stringoperator(,) ident(className)operator(\))operator(;) ident(superClass) operator(=) ident(objectClass)operator(;) operator(}) keyword(return) ident(RubyClass)operator(.)ident(newClass)operator(()local_variable(this)operator(,) ident(superClass)operator(,) ident(name)operator(,) ident(allocator)operator(,) ident(parent)operator(,) operator(!)ident(parentIsObject)operator(,) ident(callSites)operator(\))operator(;) operator(}) comment(/** * Define a new module under the Object namespace. Roughly equivalent to * rb_define_module in MRI. * * @param name The name of the new module * @returns The new module */) directive(public) ident(RubyModule) ident(defineModule)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(defineModuleUnder)operator(()ident(name)operator(,) ident(objectClass)operator(\))operator(;) operator(}) comment(/** * Define a new module with the given name under the given module or * class namespace. Roughly equivalent to rb_define_module_under in MRI. * * @param name The name of the new module * @param parent The class or module namespace under which to define the * module * @returns The new module */) directive(public) ident(RubyModule) ident(defineModuleUnder)operator(()pre_type(String) ident(name)operator(,) ident(RubyModule) ident(parent)operator(\)) operator({) ident(IRubyObject) ident(moduleObj) operator(=) ident(parent)operator(.)ident(getConstantAt)operator(()ident(name)operator(\))operator(;) type(boolean) ident(parentIsObject) operator(=) ident(parent) operator(==) ident(objectClass)operator(;) keyword(if) operator(()ident(moduleObj) operator(!=) pre_constant(null) operator(\)) operator({) keyword(if) operator(()ident(moduleObj)operator(.)ident(isModule)operator(()operator(\))operator(\)) keyword(return) operator(()ident(RubyModule)operator(\))ident(moduleObj)operator(;) keyword(if) operator(()ident(parentIsObject)operator(\)) operator({) keyword(throw) ident(newTypeError)operator(()ident(moduleObj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(newTypeError)operator(()ident(parent)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(moduleObj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) keyword(return) ident(RubyModule)operator(.)ident(newModule)operator(()local_variable(this)operator(,) ident(name)operator(,) ident(parent)operator(,) operator(!)ident(parentIsObject)operator(\))operator(;) operator(}) comment(/** * From Object, retrieve the named module. If it doesn't exist a * new module is created. * * @param name The name of the module * @returns The existing or new module */) directive(public) ident(RubyModule) ident(getOrCreateModule)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(IRubyObject) ident(module) operator(=) ident(objectClass)operator(.)ident(getConstantAt)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(module) operator(==) pre_constant(null)operator(\)) operator({) ident(module) operator(=) ident(defineModule)operator(()ident(name)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) operator({) keyword(throw) ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)ident(module)operator(.)ident(isModule)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(newTypeError)operator(()ident(name) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) operator(()ident(RubyModule)operator(\)) ident(module)operator(;) operator(}) comment(/** * Retrieve the current safe level. * * @see org.jruby.Ruby#setSaveLevel */) directive(public) type(int) ident(getSafeLevel)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(safeLevel)operator(;) operator(}) comment(/** * Set the current safe level: * * 0 - strings from streams/environment/ARGV are tainted (default\) * 1 - no dangerous operation by tainted value * 2 - process/file operations prohibited * 3 - all generated objects are tainted * 4 - no global (non-tainted\) variable modification/no direct output * * The safe level is set using $SAFE in Ruby code. It is not particularly * well supported in JRuby. */) directive(public) type(void) ident(setSafeLevel)operator(()type(int) ident(safeLevel)operator(\)) operator({) local_variable(this)operator(.)ident(safeLevel) operator(=) ident(safeLevel)operator(;) operator(}) directive(public) ident(KCode) ident(getKCode)operator(()operator(\)) operator({) keyword(return) ident(kcode)operator(;) operator(}) directive(public) type(void) ident(setKCode)operator(()ident(KCode) ident(kcode)operator(\)) operator({) local_variable(this)operator(.)ident(kcode) operator(=) ident(kcode)operator(;) operator(}) directive(public) type(void) ident(secure)operator(()type(int) ident(level)operator(\)) operator({) keyword(if) operator(()ident(level) operator(<=) ident(safeLevel)operator(\)) operator({) keyword(throw) ident(newSecurityError)operator(()string operator(+) ident(getCurrentContext)operator(()operator(\))operator(.)ident(getFrameName)operator(()operator(\)) operator(+) string operator(+) ident(safeLevel)operator(\))operator(;) operator(}) operator(}) comment(// FIXME moved this here to get what's obviously a utility method out of IRubyObject.) comment(// perhaps security methods should find their own centralized home at some point.) directive(public) type(void) ident(checkSafeString)operator(()ident(IRubyObject) ident(object)operator(\)) operator({) keyword(if) operator(()ident(getSafeLevel)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(object)operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(ThreadContext) ident(tc) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) keyword(if) operator(()ident(tc)operator(.)ident(getFrameName)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(throw) ident(newSecurityError)operator(()string operator(+) ident(tc)operator(.)ident(getFrameName)operator(()operator(\))operator(\))operator(;) operator(}) keyword(throw) ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(secure)operator(()integer(4)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(object) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(throw) ident(newTypeError)operator(() string operator(+) ident(object)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) comment(/** rb_define_global_const * */) directive(public) type(void) ident(defineGlobalConstant)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(objectClass)operator(.)ident(defineConstant)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(isClassDefined)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(getModule)operator(()ident(name)operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) comment(/** * A ThreadFactory for when we're using pooled threads; we want to create * the threads with daemon = true so they don't keep us from shutting down. */) directive(public) directive(static) type(class) class(DaemonThreadFactory) directive(implements) pre_type(ThreadFactory) operator({) directive(public) pre_type(Thread) ident(newThread)operator(()pre_type(Runnable) ident(runnable)operator(\)) operator({) pre_type(Thread) ident(thread) operator(=) keyword(new) pre_type(Thread)operator(()ident(runnable)operator(\))operator(;) ident(thread)operator(.)ident(setDaemon)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(thread)operator(;) operator(}) operator(}) comment(/** * This method is called immediately after constructing the Ruby instance. * The main thread is prepared for execution, all core classes and libraries * are initialized, and any libraries required on the command line are * loaded. */) directive(private) type(void) ident(init)operator(()operator(\)) operator({) comment(// Get the main threadcontext (gets constructed for us\)) ident(ThreadContext) ident(tc) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) ident(safeLevel) operator(=) ident(config)operator(.)ident(getSafeLevel)operator(()operator(\))operator(;) comment(// Construct key services) ident(loadService) operator(=) ident(config)operator(.)ident(createLoadService)operator(()local_variable(this)operator(\))operator(;) ident(posix) operator(=) ident(POSIXFactory)operator(.)ident(getPOSIX)operator(()keyword(new) ident(JRubyPOSIXHandler)operator(()local_variable(this)operator(\))operator(,) ident(RubyInstanceConfig)operator(.)ident(nativeEnabled)operator(\))operator(;) ident(javaSupport) operator(=) keyword(new) ident(JavaSupport)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(RubyInstanceConfig)operator(.)ident(POOLING_ENABLED)operator(\)) operator({) pre_type(Executors)operator(.)ident(newCachedThreadPool)operator(()operator(\))operator(;) ident(executor) operator(=) keyword(new) pre_type(ThreadPoolExecutor)operator(() ident(RubyInstanceConfig)operator(.)ident(POOL_MIN)operator(,) ident(RubyInstanceConfig)operator(.)ident(POOL_MAX)operator(,) ident(RubyInstanceConfig)operator(.)ident(POOL_TTL)operator(,) pre_type(TimeUnit)operator(.)ident(SECONDS)operator(,) keyword(new) pre_type(SynchronousQueue)operator(<)pre_type(Runnable)operator(>)operator(()operator(\))operator(,) keyword(new) ident(DaemonThreadFactory)operator(()operator(\))operator(\))operator(;) operator(}) comment(// initialize the root of the class hierarchy completely) ident(initRoot)operator(()ident(tc)operator(\))operator(;) comment(// Construct the top-level execution frame and scope for the main thread) ident(tc)operator(.)ident(prepareTopLevel)operator(()ident(objectClass)operator(,) ident(topSelf)operator(\))operator(;) comment(// Initialize all the core classes) ident(bootstrap)operator(()operator(\))operator(;) comment(// Create global constants and variables) ident(RubyGlobal)operator(.)ident(createGlobals)operator(()ident(tc)operator(,) local_variable(this)operator(\))operator(;) comment(// Prepare LoadService and load path) ident(getLoadService)operator(()operator(\))operator(.)ident(init)operator(()ident(config)operator(.)ident(loadPaths)operator(()operator(\))operator(\))operator(;) comment(// initialize builtin libraries) ident(initBuiltins)operator(()operator(\))operator(;) comment(// Require in all libraries specified on command line) keyword(for) operator(()pre_type(String) ident(scriptName) operator(:) ident(config)operator(.)ident(requiredLibraries)operator(()operator(\))operator(\)) operator({) ident(RubyKernel)operator(.)ident(require)operator(()ident(getTopSelf)operator(()operator(\))operator(,) ident(newString)operator(()ident(scriptName)operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(bootstrap)operator(()operator(\)) operator({) ident(initCore)operator(()operator(\))operator(;) ident(initExceptions)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(initRoot)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) comment(// Bootstrap the top of the hierarchy) ident(objectClass) operator(=) ident(RubyClass)operator(.)ident(createBootstrapClass)operator(()local_variable(this)operator(,) stringoperator(,) pre_constant(null)operator(,) ident(RubyObject)operator(.)ident(OBJECT_ALLOCATOR)operator(\))operator(;) ident(moduleClass) operator(=) ident(RubyClass)operator(.)ident(createBootstrapClass)operator(()local_variable(this)operator(,) stringoperator(,) ident(objectClass)operator(,) ident(RubyModule)operator(.)ident(MODULE_ALLOCATOR)operator(\))operator(;) ident(classClass) operator(=) ident(RubyClass)operator(.)ident(createBootstrapClass)operator(()local_variable(this)operator(,) stringoperator(,) ident(moduleClass)operator(,) ident(RubyClass)operator(.)ident(CLASS_ALLOCATOR)operator(\))operator(;) ident(objectClass)operator(.)ident(setMetaClass)operator(()ident(classClass)operator(\))operator(;) ident(moduleClass)operator(.)ident(setMetaClass)operator(()ident(classClass)operator(\))operator(;) ident(classClass)operator(.)ident(setMetaClass)operator(()ident(classClass)operator(\))operator(;) ident(RubyClass) ident(metaClass)operator(;) ident(metaClass) operator(=) ident(objectClass)operator(.)ident(makeMetaClass)operator(()ident(classClass)operator(\))operator(;) ident(metaClass) operator(=) ident(moduleClass)operator(.)ident(makeMetaClass)operator(()ident(metaClass)operator(\))operator(;) ident(metaClass) operator(=) ident(classClass)operator(.)ident(makeMetaClass)operator(()ident(metaClass)operator(\))operator(;) ident(RubyObject)operator(.)ident(createObjectClass)operator(()local_variable(this)operator(,) ident(objectClass)operator(\))operator(;) ident(RubyModule)operator(.)ident(createModuleClass)operator(()local_variable(this)operator(,) ident(moduleClass)operator(\))operator(;) ident(RubyClass)operator(.)ident(createClassClass)operator(()local_variable(this)operator(,) ident(classClass)operator(\))operator(;) comment(// set constants now that they're initialized) ident(objectClass)operator(.)ident(setConstant)operator(()stringoperator(,) ident(objectClass)operator(\))operator(;) ident(objectClass)operator(.)ident(setConstant)operator(()stringoperator(,) ident(classClass)operator(\))operator(;) ident(objectClass)operator(.)ident(setConstant)operator(()stringoperator(,) ident(moduleClass)operator(\))operator(;) comment(// Initialize Kernel and include into Object) ident(RubyKernel)operator(.)ident(createKernelModule)operator(()local_variable(this)operator(\))operator(;) ident(objectClass)operator(.)ident(includeModule)operator(()ident(kernelModule)operator(\))operator(;) comment(// Initialize the "dummy" class used as a marker) ident(dummyClass) operator(=) keyword(new) ident(RubyClass)operator(()local_variable(this)operator(\))operator(;) ident(dummyClass)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) comment(// Object is ready, create top self) ident(topSelf) operator(=) ident(TopSelfFactory)operator(.)ident(createTopSelf)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(private) type(void) ident(initCore)operator(()operator(\)) operator({) comment(// Pre-create all the core classes potentially referenced during startup) ident(RubyNil)operator(.)ident(createNilClass)operator(()local_variable(this)operator(\))operator(;) ident(RubyBoolean)operator(.)ident(createFalseClass)operator(()local_variable(this)operator(\))operator(;) ident(RubyBoolean)operator(.)ident(createTrueClass)operator(()local_variable(this)operator(\))operator(;) ident(nilObject) operator(=) keyword(new) ident(RubyNil)operator(()local_variable(this)operator(\))operator(;) ident(falseObject) operator(=) keyword(new) ident(RubyBoolean)operator(()local_variable(this)operator(,) pre_constant(false)operator(\))operator(;) ident(trueObject) operator(=) keyword(new) ident(RubyBoolean)operator(()local_variable(this)operator(,) pre_constant(true)operator(\))operator(;) ident(RubyComparable)operator(.)ident(createComparable)operator(()local_variable(this)operator(\))operator(;) ident(RubyEnumerable)operator(.)ident(createEnumerableModule)operator(()local_variable(this)operator(\))operator(;) ident(RubyString)operator(.)ident(createStringClass)operator(()local_variable(this)operator(\))operator(;) ident(RubySymbol)operator(.)ident(createSymbolClass)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyThreadGroup)operator(.)ident(createThreadGroupClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyThread)operator(.)ident(createThreadClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyException)operator(.)ident(createExceptionClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyPrecision)operator(.)ident(createPrecisionModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyNumeric)operator(.)ident(createNumericClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyInteger)operator(.)ident(createIntegerClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyFixnum)operator(.)ident(createFixnumClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(getCompatVersion)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) operator({) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyComplex)operator(.)ident(createComplexClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyRational)operator(.)ident(createRationalClass)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyHash)operator(.)ident(createHashClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyArray)operator(.)ident(createArrayClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyFloat)operator(.)ident(createFloatClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyBignum)operator(.)ident(createBignumClass)operator(()local_variable(this)operator(\))operator(;) operator(}) ident(ioClass) operator(=) ident(RubyIO)operator(.)ident(createIOClass)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyStruct)operator(.)ident(createStructClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(tmsStruct) operator(=) ident(RubyStruct)operator(.)ident(newInstance)operator(()ident(structClass)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(newString)operator(()stringoperator(\))operator(,) ident(newSymbol)operator(()stringoperator(\))operator(,) ident(newSymbol)operator(()stringoperator(\))operator(,) ident(newSymbol)operator(()stringoperator(\))operator(,) ident(newSymbol)operator(()stringoperator(\))operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyBinding)operator(.)ident(createBindingClass)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(// Math depends on all numeric types) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyMath)operator(.)ident(createMathModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyRegexp)operator(.)ident(createRegexpClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyRange)operator(.)ident(createRangeClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyObjectSpace)operator(.)ident(createObjectSpaceModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyGC)operator(.)ident(createGCModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyProc)operator(.)ident(createProcClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyMethod)operator(.)ident(createMethodClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyMatchData)operator(.)ident(createMatchDataClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyMarshal)operator(.)ident(createMarshalModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyDir)operator(.)ident(createDirClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyFileTest)operator(.)ident(createFileTestModule)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(// depends on IO, FileTest) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyFile)operator(.)ident(createFileClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyFileStat)operator(.)ident(createFileStatClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubyProcess)operator(.)ident(createProcessModule)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyTime)operator(.)ident(createTimeClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyUnboundMethod)operator(.)ident(defineUnboundMethodClass)operator(()local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(defineClass)operator(()stringoperator(,) ident(objectClass)operator(,) ident(objectClass)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(isSecurityRestricted)operator(()operator(\))operator(\)) operator({) comment(// Signal uses sun.misc.* classes, this is not allowed) comment(// in the security-sensitive environments) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(RubySignal)operator(.)ident(createSignal)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(RubyContinuation)operator(.)ident(createContinuation)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(initExceptions)operator(()operator(\)) operator({) ident(standardError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(exceptionClass)operator(\))operator(;) ident(runtimeError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(ioError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(scriptError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(exceptionClass)operator(\))operator(;) ident(rangeError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(signalException) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(exceptionClass)operator(\))operator(;) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(nameError) operator(=) ident(RubyNameError)operator(.)ident(createNameErrorClass)operator(()local_variable(this)operator(,) ident(standardError)operator(\))operator(;) ident(nameErrorMessage) operator(=) ident(RubyNameError)operator(.)ident(createNameErrorMessageClass)operator(()local_variable(this)operator(,) ident(nameError)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(noMethodError) operator(=) ident(RubyNoMethodError)operator(.)ident(createNoMethodErrorClass)operator(()local_variable(this)operator(,) ident(nameError)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(systemExit) operator(=) ident(RubySystemExit)operator(.)ident(createSystemExitClass)operator(()local_variable(this)operator(,) ident(exceptionClass)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(localJumpError) operator(=) ident(RubyLocalJumpError)operator(.)ident(createLocalJumpErrorClass)operator(()local_variable(this)operator(,) ident(standardError)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(nativeException) operator(=) ident(NativeException)operator(.)ident(createClass)operator(()local_variable(this)operator(,) ident(runtimeError)operator(\))operator(;) operator(}) keyword(if) operator(()ident(profile)operator(.)ident(allowClass)operator(()stringoperator(\))operator(\)) operator({) ident(systemCallError) operator(=) ident(RubySystemCallError)operator(.)ident(createSystemCallErrorClass)operator(()local_variable(this)operator(,) ident(standardError)operator(\))operator(;) operator(}) ident(fatal) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(exceptionClass)operator(\))operator(;) ident(interrupt) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(signalException)operator(\))operator(;) ident(typeError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(argumentError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(indexError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(syntaxError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(scriptError)operator(\))operator(;) ident(loadError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(scriptError)operator(\))operator(;) ident(notImplementedError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(scriptError)operator(\))operator(;) ident(securityError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(noMemoryError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(exceptionClass)operator(\))operator(;) ident(regexpError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(eofError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(ioError)operator(\))operator(;) ident(threadError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(concurrencyError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(threadError)operator(\))operator(;) ident(systemStackError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(zeroDivisionError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(standardError)operator(\))operator(;) ident(floatDomainError) operator(=) ident(defineClassIfAllowed)operator(()stringoperator(,) ident(rangeError)operator(\))operator(;) ident(initErrno)operator(()operator(\))operator(;) operator(}) directive(private) ident(RubyClass) ident(defineClassIfAllowed)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(\)) operator({) comment(// TODO: should probably apply the null object pattern for a) comment(// non-allowed class, rather than null) keyword(if) operator(()ident(superClass) operator(!=) pre_constant(null) operator(&&) ident(profile)operator(.)ident(allowClass)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(defineClass)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(superClass)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(private) pre_type(Map)operator(<)pre_type(Integer)operator(,) ident(RubyClass)operator(>) ident(errnos) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(Integer)operator(,) ident(RubyClass)operator(>)operator(()operator(\))operator(;) directive(public) ident(RubyClass) ident(getErrno)operator(()type(int) ident(n)operator(\)) operator({) keyword(return) ident(errnos)operator(.)ident(get)operator(()ident(n)operator(\))operator(;) operator(}) comment(/** * Create module Errno's Variables. We have this method since Errno does not have it's * own java class. */) directive(private) type(void) ident(initErrno)operator(()operator(\)) operator({) keyword(if) operator(()ident(profile)operator(.)ident(allowModule)operator(()stringoperator(\))operator(\)) operator({) ident(errnoModule) operator(=) ident(defineModule)operator(()stringoperator(\))operator(;) pre_type(Field)type([]) ident(fields) operator(=) ident(IErrno)operator(.)ident(class)operator(.)ident(getFields)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(fields)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(try) operator({) ident(createSysErr)operator(()ident(fields)operator([)ident(i)operator(])operator(.)ident(getInt)operator(()ident(IErrno)operator(.)ident(class)operator(\))operator(,) ident(fields)operator([)ident(i)operator(])operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IllegalAccessException) ident(e)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(,) ident(e)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) comment(/** * Creates a system error. * @param i the error code (will probably use a java exception instead\) * @param name of the error to define. **/) directive(private) type(void) ident(createSysErr)operator(()type(int) ident(i)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(if)operator(()ident(profile)operator(.)ident(allowClass)operator(()ident(name)operator(\))operator(\)) operator({) ident(RubyClass) ident(errno) operator(=) ident(getErrno)operator(()operator(\))operator(.)ident(defineClassUnder)operator(()ident(name)operator(,) ident(systemCallError)operator(,) ident(systemCallError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(errnos)operator(.)ident(put)operator(()ident(i)operator(,) ident(errno)operator(\))operator(;) ident(errno)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(newFixnum)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(initBuiltins)operator(()operator(\)) operator({) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(if)operator(()ident(RubyInstanceConfig)operator(.)ident(NATIVE_NET_PROTOCOL)operator(\)) operator({) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(config)operator(.)ident(getCompatVersion)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) operator({) ident(addLazyBuiltin)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) operator(}) ident(addBuiltinIfAllowed)operator(()stringoperator(,) keyword(new) ident(Library)operator(()operator(\)) operator({) directive(public) type(void) ident(load)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(wrap)operator(\)) directive(throws) exception(IOException) operator({) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) operator(}) operator(})operator(\))operator(;) pre_type(String)type([]) ident(builtins) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) string operator(})operator(;) keyword(for) operator(()pre_type(String) ident(library) operator(:) ident(builtins)operator(\)) operator({) ident(addBuiltinIfAllowed)operator(()ident(library) operator(+) stringoperator(,) keyword(new) ident(BuiltinScript)operator(()ident(library)operator(\))operator(\))operator(;) operator(}) ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) ident(RubyKernel)operator(.)ident(autoload)operator(()ident(topSelf)operator(,) ident(newSymbol)operator(()stringoperator(\))operator(,) ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) operator(}) directive(private) type(void) ident(addLazyBuiltin)operator(()pre_type(String) ident(name)operator(,) pre_type(String) ident(shortName)operator(,) pre_type(String) ident(className)operator(\)) operator({) ident(addBuiltinIfAllowed)operator(()ident(name)operator(,) keyword(new) ident(LateLoadingLibrary)operator(()ident(shortName)operator(,) ident(className)operator(,) ident(getJRubyClassLoader)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) type(void) ident(addBuiltinIfAllowed)operator(()pre_type(String) ident(name)operator(,) ident(Library) ident(lib)operator(\)) operator({) keyword(if)operator(()ident(profile)operator(.)ident(allowBuiltin)operator(()ident(name)operator(\))operator(\)) operator({) ident(loadService)operator(.)ident(addBuiltinLibrary)operator(()ident(name)operator(,)ident(lib)operator(\))operator(;) operator(}) operator(}) pre_type(Object) ident(getRespondToMethod)operator(()operator(\)) operator({) keyword(return) ident(respondToMethod)operator(;) operator(}) type(void) ident(setRespondToMethod)operator(()pre_type(Object) ident(rtm)operator(\)) operator({) local_variable(this)operator(.)ident(respondToMethod) operator(=) ident(rtm)operator(;) operator(}) directive(public) pre_type(Object) ident(getObjectToYamlMethod)operator(()operator(\)) operator({) keyword(return) ident(objectToYamlMethod)operator(;) operator(}) type(void) ident(setObjectToYamlMethod)operator(()pre_type(Object) ident(otym)operator(\)) operator({) local_variable(this)operator(.)ident(objectToYamlMethod) operator(=) ident(otym)operator(;) operator(}) comment(/** * Retrieve mappings of cached methods to where they have been cached. When a cached * method needs to be invalidated this map can be used to remove all places it has been * cached. * * @return the mappings of where cached methods have been stored */) directive(public) ident(CacheMap) ident(getCacheMap)operator(()operator(\)) operator({) keyword(return) ident(cacheMap)operator(;) operator(}) comment(/** Getter for property rubyTopSelf. * @return Value of property rubyTopSelf. */) directive(public) ident(IRubyObject) ident(getTopSelf)operator(()operator(\)) operator({) keyword(return) ident(topSelf)operator(;) operator(}) directive(public) type(void) ident(setCurrentDirectory)operator(()pre_type(String) ident(dir)operator(\)) operator({) ident(currentDirectory) operator(=) ident(dir)operator(;) operator(}) directive(public) pre_type(String) ident(getCurrentDirectory)operator(()operator(\)) operator({) keyword(return) ident(currentDirectory)operator(;) operator(}) directive(public) ident(RubyModule) ident(getEtc)operator(()operator(\)) operator({) keyword(return) ident(etcModule)operator(;) operator(}) directive(public) type(void) ident(setEtc)operator(()ident(RubyModule) ident(etcModule)operator(\)) operator({) local_variable(this)operator(.)ident(etcModule) operator(=) ident(etcModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getObject)operator(()operator(\)) operator({) keyword(return) ident(objectClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getModule)operator(()operator(\)) operator({) keyword(return) ident(moduleClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getClassClass)operator(()operator(\)) operator({) keyword(return) ident(classClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getKernel)operator(()operator(\)) operator({) keyword(return) ident(kernelModule)operator(;) operator(}) type(void) ident(setKernel)operator(()ident(RubyModule) ident(kernelModule)operator(\)) operator({) local_variable(this)operator(.)ident(kernelModule) operator(=) ident(kernelModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getDummy)operator(()operator(\)) operator({) keyword(return) ident(dummyClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getComparable)operator(()operator(\)) operator({) keyword(return) ident(comparableModule)operator(;) operator(}) type(void) ident(setComparable)operator(()ident(RubyModule) ident(comparableModule)operator(\)) operator({) local_variable(this)operator(.)ident(comparableModule) operator(=) ident(comparableModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNumeric)operator(()operator(\)) operator({) keyword(return) ident(numericClass)operator(;) operator(}) type(void) ident(setNumeric)operator(()ident(RubyClass) ident(numericClass)operator(\)) operator({) local_variable(this)operator(.)ident(numericClass) operator(=) ident(numericClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFloat)operator(()operator(\)) operator({) keyword(return) ident(floatClass)operator(;) operator(}) type(void) ident(setFloat)operator(()ident(RubyClass) ident(floatClass)operator(\)) operator({) local_variable(this)operator(.)ident(floatClass) operator(=) ident(floatClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getInteger)operator(()operator(\)) operator({) keyword(return) ident(integerClass)operator(;) operator(}) type(void) ident(setInteger)operator(()ident(RubyClass) ident(integerClass)operator(\)) operator({) local_variable(this)operator(.)ident(integerClass) operator(=) ident(integerClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFixnum)operator(()operator(\)) operator({) keyword(return) ident(fixnumClass)operator(;) operator(}) type(void) ident(setFixnum)operator(()ident(RubyClass) ident(fixnumClass)operator(\)) operator({) local_variable(this)operator(.)ident(fixnumClass) operator(=) ident(fixnumClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getComplex)operator(()operator(\)) operator({) keyword(return) ident(complexClass)operator(;) operator(}) type(void) ident(setComplex)operator(()ident(RubyClass) ident(complexClass)operator(\)) operator({) local_variable(this)operator(.)ident(complexClass) operator(=) ident(complexClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRational)operator(()operator(\)) operator({) keyword(return) ident(rationalClass)operator(;) operator(}) type(void) ident(setRational)operator(()ident(RubyClass) ident(rationalClass)operator(\)) operator({) local_variable(this)operator(.)ident(rationalClass) operator(=) ident(rationalClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getEnumerable)operator(()operator(\)) operator({) keyword(return) ident(enumerableModule)operator(;) operator(}) type(void) ident(setEnumerable)operator(()ident(RubyModule) ident(enumerableModule)operator(\)) operator({) local_variable(this)operator(.)ident(enumerableModule) operator(=) ident(enumerableModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getEnumerator)operator(()operator(\)) operator({) keyword(return) ident(enumeratorClass)operator(;) operator(}) type(void) ident(setEnumerator)operator(()ident(RubyClass) ident(enumeratorClass)operator(\)) operator({) local_variable(this)operator(.)ident(enumeratorClass) operator(=) ident(enumeratorClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getString)operator(()operator(\)) operator({) keyword(return) ident(stringClass)operator(;) operator(}) type(void) ident(setString)operator(()ident(RubyClass) ident(stringClass)operator(\)) operator({) local_variable(this)operator(.)ident(stringClass) operator(=) ident(stringClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSymbol)operator(()operator(\)) operator({) keyword(return) ident(symbolClass)operator(;) operator(}) type(void) ident(setSymbol)operator(()ident(RubyClass) ident(symbolClass)operator(\)) operator({) local_variable(this)operator(.)ident(symbolClass) operator(=) ident(symbolClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getArray)operator(()operator(\)) operator({) keyword(return) ident(arrayClass)operator(;) operator(}) type(void) ident(setArray)operator(()ident(RubyClass) ident(arrayClass)operator(\)) operator({) local_variable(this)operator(.)ident(arrayClass) operator(=) ident(arrayClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getHash)operator(()operator(\)) operator({) keyword(return) ident(hashClass)operator(;) operator(}) type(void) ident(setHash)operator(()ident(RubyClass) ident(hashClass)operator(\)) operator({) local_variable(this)operator(.)ident(hashClass) operator(=) ident(hashClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRange)operator(()operator(\)) operator({) keyword(return) ident(rangeClass)operator(;) operator(}) type(void) ident(setRange)operator(()ident(RubyClass) ident(rangeClass)operator(\)) operator({) local_variable(this)operator(.)ident(rangeClass) operator(=) ident(rangeClass)operator(;) operator(}) comment(/** Returns the "true" instance from the instance pool. * @return The "true" instance. */) directive(public) ident(RubyBoolean) ident(getTrue)operator(()operator(\)) operator({) keyword(return) ident(trueObject)operator(;) operator(}) comment(/** Returns the "false" instance from the instance pool. * @return The "false" instance. */) directive(public) ident(RubyBoolean) ident(getFalse)operator(()operator(\)) operator({) keyword(return) ident(falseObject)operator(;) operator(}) comment(/** Returns the "nil" singleton instance. * @return "nil" */) directive(public) ident(IRubyObject) ident(getNil)operator(()operator(\)) operator({) keyword(return) ident(nilObject)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNilClass)operator(()operator(\)) operator({) keyword(return) ident(nilClass)operator(;) operator(}) type(void) ident(setNilClass)operator(()ident(RubyClass) ident(nilClass)operator(\)) operator({) local_variable(this)operator(.)ident(nilClass) operator(=) ident(nilClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getTrueClass)operator(()operator(\)) operator({) keyword(return) ident(trueClass)operator(;) operator(}) type(void) ident(setTrueClass)operator(()ident(RubyClass) ident(trueClass)operator(\)) operator({) local_variable(this)operator(.)ident(trueClass) operator(=) ident(trueClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFalseClass)operator(()operator(\)) operator({) keyword(return) ident(falseClass)operator(;) operator(}) type(void) ident(setFalseClass)operator(()ident(RubyClass) ident(falseClass)operator(\)) operator({) local_variable(this)operator(.)ident(falseClass) operator(=) ident(falseClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getProc)operator(()operator(\)) operator({) keyword(return) ident(procClass)operator(;) operator(}) type(void) ident(setProc)operator(()ident(RubyClass) ident(procClass)operator(\)) operator({) local_variable(this)operator(.)ident(procClass) operator(=) ident(procClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getBinding)operator(()operator(\)) operator({) keyword(return) ident(bindingClass)operator(;) operator(}) type(void) ident(setBinding)operator(()ident(RubyClass) ident(bindingClass)operator(\)) operator({) local_variable(this)operator(.)ident(bindingClass) operator(=) ident(bindingClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getMethod)operator(()operator(\)) operator({) keyword(return) ident(methodClass)operator(;) operator(}) type(void) ident(setMethod)operator(()ident(RubyClass) ident(methodClass)operator(\)) operator({) local_variable(this)operator(.)ident(methodClass) operator(=) ident(methodClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getUnboundMethod)operator(()operator(\)) operator({) keyword(return) ident(unboundMethodClass)operator(;) operator(}) type(void) ident(setUnboundMethod)operator(()ident(RubyClass) ident(unboundMethodClass)operator(\)) operator({) local_variable(this)operator(.)ident(unboundMethodClass) operator(=) ident(unboundMethodClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getMatchData)operator(()operator(\)) operator({) keyword(return) ident(matchDataClass)operator(;) operator(}) type(void) ident(setMatchData)operator(()ident(RubyClass) ident(matchDataClass)operator(\)) operator({) local_variable(this)operator(.)ident(matchDataClass) operator(=) ident(matchDataClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRegexp)operator(()operator(\)) operator({) keyword(return) ident(regexpClass)operator(;) operator(}) type(void) ident(setRegexp)operator(()ident(RubyClass) ident(regexpClass)operator(\)) operator({) local_variable(this)operator(.)ident(regexpClass) operator(=) ident(regexpClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getTime)operator(()operator(\)) operator({) keyword(return) ident(timeClass)operator(;) operator(}) type(void) ident(setTime)operator(()ident(RubyClass) ident(timeClass)operator(\)) operator({) local_variable(this)operator(.)ident(timeClass) operator(=) ident(timeClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getMath)operator(()operator(\)) operator({) keyword(return) ident(mathModule)operator(;) operator(}) type(void) ident(setMath)operator(()ident(RubyModule) ident(mathModule)operator(\)) operator({) local_variable(this)operator(.)ident(mathModule) operator(=) ident(mathModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getMarshal)operator(()operator(\)) operator({) keyword(return) ident(marshalModule)operator(;) operator(}) type(void) ident(setMarshal)operator(()ident(RubyModule) ident(marshalModule)operator(\)) operator({) local_variable(this)operator(.)ident(marshalModule) operator(=) ident(marshalModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getBignum)operator(()operator(\)) operator({) keyword(return) ident(bignumClass)operator(;) operator(}) type(void) ident(setBignum)operator(()ident(RubyClass) ident(bignumClass)operator(\)) operator({) local_variable(this)operator(.)ident(bignumClass) operator(=) ident(bignumClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getDir)operator(()operator(\)) operator({) keyword(return) ident(dirClass)operator(;) operator(}) type(void) ident(setDir)operator(()ident(RubyClass) ident(dirClass)operator(\)) operator({) local_variable(this)operator(.)ident(dirClass) operator(=) ident(dirClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFile)operator(()operator(\)) operator({) keyword(return) ident(fileClass)operator(;) operator(}) type(void) ident(setFile)operator(()ident(RubyClass) ident(fileClass)operator(\)) operator({) local_variable(this)operator(.)ident(fileClass) operator(=) ident(fileClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFileStat)operator(()operator(\)) operator({) keyword(return) ident(fileStatClass)operator(;) operator(}) type(void) ident(setFileStat)operator(()ident(RubyClass) ident(fileStatClass)operator(\)) operator({) local_variable(this)operator(.)ident(fileStatClass) operator(=) ident(fileStatClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getFileTest)operator(()operator(\)) operator({) keyword(return) ident(fileTestModule)operator(;) operator(}) type(void) ident(setFileTest)operator(()ident(RubyModule) ident(fileTestModule)operator(\)) operator({) local_variable(this)operator(.)ident(fileTestModule) operator(=) ident(fileTestModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getIO)operator(()operator(\)) operator({) keyword(return) ident(ioClass)operator(;) operator(}) type(void) ident(setIO)operator(()ident(RubyClass) ident(ioClass)operator(\)) operator({) local_variable(this)operator(.)ident(ioClass) operator(=) ident(ioClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getThread)operator(()operator(\)) operator({) keyword(return) ident(threadClass)operator(;) operator(}) type(void) ident(setThread)operator(()ident(RubyClass) ident(threadClass)operator(\)) operator({) local_variable(this)operator(.)ident(threadClass) operator(=) ident(threadClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getThreadGroup)operator(()operator(\)) operator({) keyword(return) ident(threadGroupClass)operator(;) operator(}) type(void) ident(setThreadGroup)operator(()ident(RubyClass) ident(threadGroupClass)operator(\)) operator({) local_variable(this)operator(.)ident(threadGroupClass) operator(=) ident(threadGroupClass)operator(;) operator(}) directive(public) ident(RubyThreadGroup) ident(getDefaultThreadGroup)operator(()operator(\)) operator({) keyword(return) ident(defaultThreadGroup)operator(;) operator(}) type(void) ident(setDefaultThreadGroup)operator(()ident(RubyThreadGroup) ident(defaultThreadGroup)operator(\)) operator({) local_variable(this)operator(.)ident(defaultThreadGroup) operator(=) ident(defaultThreadGroup)operator(;) operator(}) directive(public) ident(RubyClass) ident(getContinuation)operator(()operator(\)) operator({) keyword(return) ident(continuationClass)operator(;) operator(}) type(void) ident(setContinuation)operator(()ident(RubyClass) ident(continuationClass)operator(\)) operator({) local_variable(this)operator(.)ident(continuationClass) operator(=) ident(continuationClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getStructClass)operator(()operator(\)) operator({) keyword(return) ident(structClass)operator(;) operator(}) type(void) ident(setStructClass)operator(()ident(RubyClass) ident(structClass)operator(\)) operator({) local_variable(this)operator(.)ident(structClass) operator(=) ident(structClass)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getTmsStruct)operator(()operator(\)) operator({) keyword(return) ident(tmsStruct)operator(;) operator(}) type(void) ident(setTmsStruct)operator(()ident(RubyClass) ident(tmsStruct)operator(\)) operator({) local_variable(this)operator(.)ident(tmsStruct) operator(=) ident(tmsStruct)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getPasswdStruct)operator(()operator(\)) operator({) keyword(return) ident(passwdStruct)operator(;) operator(}) type(void) ident(setPasswdStruct)operator(()ident(RubyClass) ident(passwdStruct)operator(\)) operator({) local_variable(this)operator(.)ident(passwdStruct) operator(=) ident(passwdStruct)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getGroupStruct)operator(()operator(\)) operator({) keyword(return) ident(groupStruct)operator(;) operator(}) type(void) ident(setGroupStruct)operator(()ident(RubyClass) ident(groupStruct)operator(\)) operator({) local_variable(this)operator(.)ident(groupStruct) operator(=) ident(groupStruct)operator(;) operator(}) directive(public) ident(RubyModule) ident(getGC)operator(()operator(\)) operator({) keyword(return) ident(gcModule)operator(;) operator(}) type(void) ident(setGC)operator(()ident(RubyModule) ident(gcModule)operator(\)) operator({) local_variable(this)operator(.)ident(gcModule) operator(=) ident(gcModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getObjectSpaceModule)operator(()operator(\)) operator({) keyword(return) ident(objectSpaceModule)operator(;) operator(}) type(void) ident(setObjectSpaceModule)operator(()ident(RubyModule) ident(objectSpaceModule)operator(\)) operator({) local_variable(this)operator(.)ident(objectSpaceModule) operator(=) ident(objectSpaceModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getProcess)operator(()operator(\)) operator({) keyword(return) ident(processModule)operator(;) operator(}) type(void) ident(setProcess)operator(()ident(RubyModule) ident(processModule)operator(\)) operator({) local_variable(this)operator(.)ident(processModule) operator(=) ident(processModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getProcStatus)operator(()operator(\)) operator({) keyword(return) ident(procStatusClass)operator(;) operator(}) type(void) ident(setProcStatus)operator(()ident(RubyClass) ident(procStatusClass)operator(\)) operator({) local_variable(this)operator(.)ident(procStatusClass) operator(=) ident(procStatusClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getProcUID)operator(()operator(\)) operator({) keyword(return) ident(procUIDModule)operator(;) operator(}) type(void) ident(setProcUID)operator(()ident(RubyModule) ident(procUIDModule)operator(\)) operator({) local_variable(this)operator(.)ident(procUIDModule) operator(=) ident(procUIDModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getProcGID)operator(()operator(\)) operator({) keyword(return) ident(procGIDModule)operator(;) operator(}) type(void) ident(setProcGID)operator(()ident(RubyModule) ident(procGIDModule)operator(\)) operator({) local_variable(this)operator(.)ident(procGIDModule) operator(=) ident(procGIDModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getProcSysModule)operator(()operator(\)) operator({) keyword(return) ident(procSysModule)operator(;) operator(}) type(void) ident(setProcSys)operator(()ident(RubyModule) ident(procSysModule)operator(\)) operator({) local_variable(this)operator(.)ident(procSysModule) operator(=) ident(procSysModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getPrecision)operator(()operator(\)) operator({) keyword(return) ident(precisionModule)operator(;) operator(}) type(void) ident(setPrecision)operator(()ident(RubyModule) ident(precisionModule)operator(\)) operator({) local_variable(this)operator(.)ident(precisionModule) operator(=) ident(precisionModule)operator(;) operator(}) directive(public) ident(RubyModule) ident(getErrno)operator(()operator(\)) operator({) keyword(return) ident(errnoModule)operator(;) operator(}) directive(public) ident(RubyClass) ident(getException)operator(()operator(\)) operator({) keyword(return) ident(exceptionClass)operator(;) operator(}) type(void) ident(setException)operator(()ident(RubyClass) ident(exceptionClass)operator(\)) operator({) local_variable(this)operator(.)ident(exceptionClass) operator(=) ident(exceptionClass)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNameError)operator(()operator(\)) operator({) keyword(return) ident(nameError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNameErrorMessage)operator(()operator(\)) operator({) keyword(return) ident(nameErrorMessage)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNoMethodError)operator(()operator(\)) operator({) keyword(return) ident(noMethodError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSignalException)operator(()operator(\)) operator({) keyword(return) ident(signalException)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRangeError)operator(()operator(\)) operator({) keyword(return) ident(rangeError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSystemExit)operator(()operator(\)) operator({) keyword(return) ident(systemExit)operator(;) operator(}) directive(public) ident(RubyClass) ident(getLocalJumpError)operator(()operator(\)) operator({) keyword(return) ident(localJumpError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNativeException)operator(()operator(\)) operator({) keyword(return) ident(nativeException)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSystemCallError)operator(()operator(\)) operator({) keyword(return) ident(systemCallError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFatal)operator(()operator(\)) operator({) keyword(return) ident(fatal)operator(;) operator(}) directive(public) ident(RubyClass) ident(getInterrupt)operator(()operator(\)) operator({) keyword(return) ident(interrupt)operator(;) operator(}) directive(public) ident(RubyClass) ident(getTypeError)operator(()operator(\)) operator({) keyword(return) ident(typeError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getArgumentError)operator(()operator(\)) operator({) keyword(return) ident(argumentError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getIndexError)operator(()operator(\)) operator({) keyword(return) ident(indexError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSyntaxError)operator(()operator(\)) operator({) keyword(return) ident(syntaxError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getStandardError)operator(()operator(\)) operator({) keyword(return) ident(standardError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRuntimeError)operator(()operator(\)) operator({) keyword(return) ident(runtimeError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getIOError)operator(()operator(\)) operator({) keyword(return) ident(ioError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getLoadError)operator(()operator(\)) operator({) keyword(return) ident(loadError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNotImplementedError)operator(()operator(\)) operator({) keyword(return) ident(notImplementedError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSecurityError)operator(()operator(\)) operator({) keyword(return) ident(securityError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getNoMemoryError)operator(()operator(\)) operator({) keyword(return) ident(noMemoryError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRegexpError)operator(()operator(\)) operator({) keyword(return) ident(regexpError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getEOFError)operator(()operator(\)) operator({) keyword(return) ident(eofError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getThreadError)operator(()operator(\)) operator({) keyword(return) ident(threadError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getConcurrencyError)operator(()operator(\)) operator({) keyword(return) ident(concurrencyError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getSystemStackError)operator(()operator(\)) operator({) keyword(return) ident(systemStackError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getZeroDivisionError)operator(()operator(\)) operator({) keyword(return) ident(zeroDivisionError)operator(;) operator(}) directive(public) ident(RubyClass) ident(getFloatDomainError)operator(()operator(\)) operator({) keyword(return) ident(floatDomainError)operator(;) operator(}) directive(private) ident(RubyHash) ident(charsetMap)operator(;) directive(public) ident(RubyHash) ident(getCharsetMap)operator(()operator(\)) operator({) keyword(if) operator(()ident(charsetMap) operator(==) pre_constant(null)operator(\)) ident(charsetMap) operator(=) keyword(new) ident(RubyHash)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(charsetMap)operator(;) operator(}) comment(/** Getter for property isVerbose. * @return Value of property isVerbose. */) directive(public) ident(IRubyObject) ident(getVerbose)operator(()operator(\)) operator({) keyword(return) ident(verbose)operator(;) operator(}) comment(/** Setter for property isVerbose. * @param verbose New value of property isVerbose. */) directive(public) type(void) ident(setVerbose)operator(()ident(IRubyObject) ident(verbose)operator(\)) operator({) local_variable(this)operator(.)ident(verbose) operator(=) ident(verbose)operator(;) operator(}) comment(/** Getter for property isDebug. * @return Value of property isDebug. */) directive(public) ident(IRubyObject) ident(getDebug)operator(()operator(\)) operator({) keyword(return) ident(debug)operator(;) operator(}) comment(/** Setter for property isDebug. * @param debug New value of property isDebug. */) directive(public) type(void) ident(setDebug)operator(()ident(IRubyObject) ident(debug)operator(\)) operator({) local_variable(this)operator(.)ident(debug) operator(=) ident(debug)operator(;) operator(}) directive(public) ident(JavaSupport) ident(getJavaSupport)operator(()operator(\)) operator({) keyword(return) ident(javaSupport)operator(;) operator(}) directive(public) directive(static) pre_type(ClassLoader) ident(getClassLoader)operator(()operator(\)) operator({) comment(// we try to get the classloader that loaded JRuby, falling back on System) pre_type(ClassLoader) ident(loader) operator(=) ident(Ruby)operator(.)ident(class)operator(.)ident(getClassLoader)operator(()operator(\))operator(;) keyword(if) operator(()ident(loader) operator(==) pre_constant(null)operator(\)) operator({) ident(loader) operator(=) pre_type(ClassLoader)operator(.)ident(getSystemClassLoader)operator(()operator(\))operator(;) operator(}) keyword(return) ident(loader)operator(;) operator(}) directive(public) directive(synchronized) ident(JRubyClassLoader) ident(getJRubyClassLoader)operator(()operator(\)) operator({) comment(// FIXME: Get rid of laziness and handle restricted access elsewhere) keyword(if) operator(()operator(!)ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\)) operator(&&) ident(jrubyClassLoader) operator(==) pre_constant(null)operator(\)) operator({) ident(jrubyClassLoader) operator(=) keyword(new) ident(JRubyClassLoader)operator(()ident(config)operator(.)ident(getLoader)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(jrubyClassLoader)operator(;) operator(}) comment(/** Defines a global variable */) directive(public) type(void) ident(defineVariable)operator(()directive(final) ident(GlobalVariable) ident(variable)operator(\)) operator({) ident(globalVariables)operator(.)ident(define)operator(()ident(variable)operator(.)ident(name)operator(()operator(\))operator(,) keyword(new) ident(IAccessor)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(variable)operator(.)ident(get)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(setValue)operator(()ident(IRubyObject) ident(newValue)operator(\)) operator({) keyword(return) ident(variable)operator(.)ident(set)operator(()ident(newValue)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) comment(/** defines a readonly global variable * */) directive(public) type(void) ident(defineReadonlyVariable)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(globalVariables)operator(.)ident(defineReadonly)operator(()ident(name)operator(,) keyword(new) ident(ValueAccessor)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parseFile)operator(()pre_type(InputStream) ident(in)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(\)) operator({) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) ident(in)operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()integer(0)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parseInline)operator(()pre_type(InputStream) ident(in)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(\)) operator({) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) ident(in)operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()integer(0)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parseEval)operator(()pre_type(String) ident(content)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(,) type(int) ident(lineNumber)operator(\)) operator({) type(byte)type([]) ident(bytes)operator(;) keyword(try) operator({) ident(bytes) operator(=) ident(content)operator(.)ident(getBytes)operator(()ident(KCode)operator(.)ident(NONE)operator(.)ident(getKCode)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedEncodingException) ident(e)operator(\)) operator({) ident(bytes) operator(=) ident(content)operator(.)ident(getBytes)operator(()operator(\))operator(;) operator(}) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) keyword(new) pre_type(ByteArrayInputStream)operator(()ident(bytes)operator(\))operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()ident(lineNumber)operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parse)operator(()pre_type(String) ident(content)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(,) type(int) ident(lineNumber)operator(,) type(boolean) ident(extraPositionInformation)operator(\)) operator({) type(byte)type([]) ident(bytes)operator(;) keyword(try) operator({) ident(bytes) operator(=) ident(content)operator(.)ident(getBytes)operator(()ident(KCode)operator(.)ident(NONE)operator(.)ident(getKCode)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedEncodingException) ident(e)operator(\)) operator({) ident(bytes) operator(=) ident(content)operator(.)ident(getBytes)operator(()operator(\))operator(;) operator(}) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) keyword(new) pre_type(ByteArrayInputStream)operator(()ident(bytes)operator(\))operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()ident(lineNumber)operator(,) ident(extraPositionInformation)operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parseEval)operator(()ident(ByteList) ident(content)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(,) type(int) ident(lineNumber)operator(\)) operator({) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) ident(content)operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()ident(lineNumber)operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) directive(public) ident(Node) ident(parse)operator(()ident(ByteList) ident(content)operator(,) pre_type(String) ident(file)operator(,) ident(DynamicScope) ident(scope)operator(,) type(int) ident(lineNumber)operator(,) type(boolean) ident(extraPositionInformation)operator(\)) operator({) keyword(return) ident(parser)operator(.)ident(parse)operator(()ident(file)operator(,) ident(content)operator(,) ident(scope)operator(,) keyword(new) ident(ParserConfiguration)operator(()ident(lineNumber)operator(,) ident(extraPositionInformation)operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) directive(public) ident(ThreadService) ident(getThreadService)operator(()operator(\)) operator({) keyword(return) ident(threadService)operator(;) operator(}) directive(public) ident(ThreadContext) ident(getCurrentContext)operator(()operator(\)) operator({) keyword(return) ident(threadService)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) operator(}) comment(/** * Returns the loadService. * @return ILoadService */) directive(public) ident(LoadService) ident(getLoadService)operator(()operator(\)) operator({) keyword(return) ident(loadService)operator(;) operator(}) directive(public) ident(RubyWarnings) ident(getWarnings)operator(()operator(\)) operator({) keyword(return) ident(warnings)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getErrorStream)operator(()operator(\)) operator({) comment(// FIXME: We can't guarantee this will always be a RubyIO...so the old code here is not safe) comment(/*java.io.OutputStream os = ((RubyIO\) getGlobalVariables(\).get("$stderr"\)\).getOutStream(\); if(null != os\) { return new PrintStream(os\); } else { return new PrintStream(new org.jruby.util.SwallowingOutputStream(\)\); }*/) keyword(return) keyword(new) pre_type(PrintStream)operator(()keyword(new) ident(IOOutputStream)operator(()ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(InputStream) ident(getInputStream)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(IOInputStream)operator(()ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getOutputStream)operator(()operator(\)) operator({) keyword(return) keyword(new) pre_type(PrintStream)operator(()keyword(new) ident(IOOutputStream)operator(()ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyModule) ident(getClassFromPath)operator(()pre_type(String) ident(path)operator(\)) operator({) ident(RubyModule) ident(c) operator(=) ident(getObject)operator(()operator(\))operator(;) keyword(if) operator(()ident(path)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0) operator(||) ident(path)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator({) keyword(throw) ident(newTypeError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) type(int) ident(pbeg) operator(=) integer(0)operator(,) ident(p) operator(=) integer(0)operator(;) keyword(for)operator(()type(int) ident(l)operator(=)ident(path)operator(.)ident(length)operator(()operator(\))operator(;) ident(p)operator(<)ident(l)operator(;) operator(\)) operator({) keyword(while)operator(()ident(p)operator(<)ident(l) operator(&&) ident(path)operator(.)ident(charAt)operator(()ident(p)operator(\)) operator(!=) stringoperator(\)) operator({) ident(p)operator(++)operator(;) operator(}) pre_type(String) ident(str) operator(=) ident(path)operator(.)ident(substring)operator(()ident(pbeg)operator(,) ident(p)operator(\))operator(;) keyword(if)operator(()ident(p)operator(<)ident(l) operator(&&) ident(path)operator(.)ident(charAt)operator(()ident(p)operator(\)) operator(==) stringoperator(\)) operator({) keyword(if)operator(()ident(p)operator(+)integer(1) operator(<) ident(l) operator(&&) ident(path)operator(.)ident(charAt)operator(()ident(p)operator(+)integer(1)operator(\)) operator(!=) stringoperator(\)) operator({) keyword(throw) ident(newTypeError)operator(()string operator(+) ident(path)operator(.)ident(substring)operator(()ident(pbeg)operator(,)ident(p)operator(\))operator(\))operator(;) operator(}) ident(p) operator(+=) integer(2)operator(;) ident(pbeg) operator(=) ident(p)operator(;) operator(}) ident(IRubyObject) ident(cc) operator(=) ident(c)operator(.)ident(getConstant)operator(()ident(str)operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(cc) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(newTypeError)operator(()string operator(+) ident(path) operator(+) stringoperator(\))operator(;) operator(}) ident(c) operator(=) operator(()ident(RubyModule)operator(\))ident(cc)operator(;) operator(}) keyword(return) ident(c)operator(;) operator(}) comment(/** Prints an error with backtrace to the error stream. * * MRI: eval.c - error_print(\) * */) directive(public) type(void) ident(printError)operator(()ident(RubyException) ident(excp)operator(\)) operator({) keyword(if) operator(()ident(excp) operator(==) pre_constant(null) operator(||) ident(excp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(backtrace) operator(=) ident(excp)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) pre_type(PrintStream) ident(errorStream) operator(=) ident(getErrorStream)operator(()operator(\))operator(;) keyword(if) operator(()ident(backtrace)operator(.)ident(isNil)operator(()operator(\)) operator(||) operator(!)operator(()ident(backtrace) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getFile)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(context)operator(.)ident(getFile)operator(()operator(\)) operator(+) string operator(+) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(context)operator(.)ident(getLine)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()operator(()operator(()ident(RubyArray)operator(\)) ident(backtrace)operator(\))operator(.)ident(getLength)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(printErrorPos)operator(()ident(context)operator(,) ident(errorStream)operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(mesg) operator(=) operator(()operator(()ident(RubyArray)operator(\)) ident(backtrace)operator(\))operator(.)ident(first)operator(()operator(\))operator(;) keyword(if) operator(()ident(mesg)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(printErrorPos)operator(()ident(context)operator(,) ident(errorStream)operator(\))operator(;) operator(}) keyword(else) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(mesg)operator(\))operator(;) operator(}) operator(}) ident(RubyClass) ident(type) operator(=) ident(excp)operator(.)ident(getMetaClass)operator(()operator(\))operator(;) pre_type(String) ident(info) operator(=) ident(excp)operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if) operator(()ident(type) operator(==) ident(getRuntimeError)operator(()operator(\)) operator(&&) operator(()ident(info) operator(==) pre_constant(null) operator(||) ident(info)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\))operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) pre_type(String) ident(path) operator(=) ident(type)operator(.)ident(getName)operator(()operator(\))operator(;) keyword(if) operator(()ident(info)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(path) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(path)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) ident(path) operator(=) pre_constant(null)operator(;) operator(}) pre_type(String) ident(tail) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(info)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(tail) operator(=) ident(info)operator(.)ident(substring)operator(()ident(info)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(+) integer(1)operator(\))operator(;) ident(info) operator(=) ident(info)operator(.)ident(substring)operator(()integer(0)operator(,) ident(info)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(info)operator(\))operator(;) keyword(if) operator(()ident(path) operator(!=) pre_constant(null)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(path) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(tail) operator(!=) pre_constant(null)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(tail) operator(+) stringoperator(\))operator(;) operator(}) operator(}) operator(}) ident(excp)operator(.)ident(printBacktrace)operator(()ident(errorStream)operator(\))operator(;) operator(}) directive(private) type(void) ident(printErrorPos)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(PrintStream) ident(errorStream)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getFile)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getFrameName)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(context)operator(.)ident(getFile)operator(()operator(\)) operator(+) string operator(+) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(\))operator(;) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(context)operator(.)ident(getFrameName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(context)operator(.)ident(getLine)operator(()operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(context)operator(.)ident(getFile)operator(()operator(\)) operator(+) string operator(+) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(errorStream)operator(.)ident(print)operator(()ident(context)operator(.)ident(getFile)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(void) ident(loadFile)operator(()pre_type(String) ident(scriptName)operator(,) pre_type(InputStream) ident(in)operator(,) type(boolean) ident(wrap)operator(\)) operator({) ident(IRubyObject) ident(self) operator(=) ident(wrap) operator(?) ident(TopSelfFactory)operator(.)ident(createTopSelf)operator(()local_variable(this)operator(\)) operator(:) ident(getTopSelf)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(file) operator(=) ident(context)operator(.)ident(getFile)operator(()operator(\))operator(;) keyword(try) operator({) ident(secure)operator(()integer(4)operator(\))operator(;) comment(/* should alter global state */) ident(context)operator(.)ident(setFile)operator(()ident(scriptName)operator(\))operator(;) ident(context)operator(.)ident(preNodeEval)operator(()ident(objectClass)operator(,) ident(self)operator(,) ident(scriptName)operator(\))operator(;) ident(parseFile)operator(()ident(in)operator(,) ident(scriptName)operator(,) pre_constant(null)operator(\))operator(.)ident(interpret)operator(()local_variable(this)operator(,) ident(context)operator(,) ident(self)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postNodeEval)operator(()operator(\))operator(;) ident(context)operator(.)ident(setFile)operator(()ident(file)operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(compileAndLoadFile)operator(()pre_type(String) ident(filename)operator(,) pre_type(InputStream) ident(in)operator(,) type(boolean) ident(wrap)operator(\)) operator({) ident(IRubyObject) ident(self) operator(=) ident(wrap) operator(?) ident(TopSelfFactory)operator(.)ident(createTopSelf)operator(()local_variable(this)operator(\)) operator(:) ident(getTopSelf)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(file) operator(=) ident(context)operator(.)ident(getFile)operator(()operator(\))operator(;) keyword(try) operator({) ident(secure)operator(()integer(4)operator(\))operator(;) comment(/* should alter global state */) ident(context)operator(.)ident(setFile)operator(()ident(filename)operator(\))operator(;) ident(context)operator(.)ident(preNodeEval)operator(()ident(objectClass)operator(,) ident(self)operator(,) ident(filename)operator(\))operator(;) ident(Node) ident(scriptNode) operator(=) ident(parseFile)operator(()ident(in)operator(,) ident(filename)operator(,) pre_constant(null)operator(\))operator(;) ident(Script) ident(script) operator(=) ident(tryCompile)operator(()ident(scriptNode)operator(,) keyword(new) ident(JRubyClassLoader)operator(()ident(jrubyClassLoader)operator(\))operator(\))operator(;) keyword(if) operator(()ident(script) operator(==) pre_constant(null)operator(\)) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()stringoperator(\))operator(;) operator(}) ident(runScript)operator(()ident(script)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postNodeEval)operator(()operator(\))operator(;) ident(context)operator(.)ident(setFile)operator(()ident(file)operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(loadScript)operator(()ident(Script) ident(script)operator(\)) operator({) ident(IRubyObject) ident(self) operator(=) ident(getTopSelf)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(getCurrentContext)operator(()operator(\))operator(;) keyword(try) operator({) ident(secure)operator(()integer(4)operator(\))operator(;) comment(/* should alter global state */) ident(context)operator(.)ident(preNodeEval)operator(()ident(objectClass)operator(,) ident(self)operator(\))operator(;) ident(script)operator(.)ident(load)operator(()ident(context)operator(,) ident(self)operator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postNodeEval)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) type(class) class(CallTraceFuncHook) directive(extends) ident(EventHook) operator({) directive(private) ident(RubyProc) ident(traceFunc)operator(;) directive(public) type(void) ident(setTraceFunc)operator(()ident(RubyProc) ident(traceFunc)operator(\)) operator({) local_variable(this)operator(.)ident(traceFunc) operator(=) ident(traceFunc)operator(;) operator(}) directive(public) type(void) ident(eventHandler)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(eventName)operator(,) pre_type(String) ident(file)operator(,) type(int) ident(line)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(type)operator(\)) operator({) keyword(if) operator(()operator(!)ident(context)operator(.)ident(isWithinTrace)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(file) operator(==) pre_constant(null)operator(\)) ident(file) operator(=) stringoperator(;) keyword(if) operator(()ident(type) operator(==) pre_constant(null)operator(\)) ident(type) operator(=) ident(getFalse)operator(()operator(\))operator(;) ident(RubyBinding) ident(binding) operator(=) ident(RubyBinding)operator(.)ident(newBinding)operator(()ident(Ruby)operator(.)ident(this)operator(\))operator(;) ident(context)operator(.)ident(preTrace)operator(()operator(\))operator(;) keyword(try) operator({) ident(traceFunc)operator(.)ident(call)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(newString)operator(()ident(eventName)operator(\))operator(,) comment(// event name) ident(newString)operator(()ident(file)operator(\))operator(,) comment(// filename) ident(newFixnum)operator(()ident(line)operator(\))operator(,) comment(// line numbers should be 1-based) ident(name) operator(!=) pre_constant(null) operator(?) ident(newSymbol)operator(()ident(name)operator(\)) operator(:) ident(getNil)operator(()operator(\))operator(,) ident(binding)operator(,) ident(type) operator(})operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postTrace)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(boolean) ident(isInterestedInEvent)operator(()ident(RubyEvent) ident(event)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(CallTraceFuncHook) ident(callTraceFuncHook) operator(=) keyword(new) ident(CallTraceFuncHook)operator(()operator(\))operator(;) directive(public) type(void) ident(addEventHook)operator(()ident(EventHook) ident(hook)operator(\)) operator({) ident(eventHooks)operator(.)ident(add)operator(()ident(hook)operator(\))operator(;) ident(hasEventHooks) operator(=) pre_constant(true)operator(;) operator(}) directive(public) type(void) ident(removeEventHook)operator(()ident(EventHook) ident(hook)operator(\)) operator({) ident(eventHooks)operator(.)ident(remove)operator(()ident(hook)operator(\))operator(;) ident(hasEventHooks) operator(=) operator(!)ident(eventHooks)operator(.)ident(isEmpty)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(setTraceFunction)operator(()ident(RubyProc) ident(traceFunction)operator(\)) operator({) ident(removeEventHook)operator(()ident(callTraceFuncHook)operator(\))operator(;) keyword(if) operator(()ident(traceFunction) operator(==) pre_constant(null)operator(\)) operator({) keyword(return)operator(;) operator(}) ident(callTraceFuncHook)operator(.)ident(setTraceFunc)operator(()ident(traceFunction)operator(\))operator(;) ident(addEventHook)operator(()ident(callTraceFuncHook)operator(\))operator(;) operator(}) directive(public) type(void) ident(callEventHooks)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyEvent) ident(event)operator(,) pre_type(String) ident(file)operator(,) type(int) ident(line)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(type)operator(\)) operator({) keyword(for) operator(()ident(EventHook) ident(eventHook) operator(:) ident(eventHooks)operator(\)) operator({) keyword(if) operator(()ident(eventHook)operator(.)ident(isInterestedInEvent)operator(()ident(event)operator(\))operator(\)) operator({) ident(eventHook)operator(.)ident(event)operator(()ident(context)operator(,) ident(event)operator(,) ident(file)operator(,) ident(line)operator(,) ident(name)operator(,) ident(type)operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(boolean) ident(hasEventHooks)operator(()operator(\)) operator({) keyword(return) ident(hasEventHooks)operator(;) operator(}) directive(public) ident(GlobalVariables) ident(getGlobalVariables)operator(()operator(\)) operator({) keyword(return) ident(globalVariables)operator(;) operator(}) comment(// For JSR 223 support: see http://scripting.java.net/) directive(public) type(void) ident(setGlobalVariables)operator(()ident(GlobalVariables) ident(globalVariables)operator(\)) operator({) local_variable(this)operator(.)ident(globalVariables) operator(=) ident(globalVariables)operator(;) operator(}) directive(public) ident(CallbackFactory) ident(callbackFactory)operator(()pre_type(Class)operator(<)operator(?)operator(>) ident(type)operator(\)) operator({) keyword(return) ident(CallbackFactory)operator(.)ident(createFactory)operator(()local_variable(this)operator(,) ident(type)operator(\))operator(;) operator(}) comment(/** * Push block onto exit stack. When runtime environment exits * these blocks will be evaluated. * * @return the element that was pushed onto stack */) directive(public) ident(IRubyObject) ident(pushExitBlock)operator(()ident(RubyProc) ident(proc)operator(\)) operator({) ident(atExitBlocks)operator(.)ident(push)operator(()ident(proc)operator(\))operator(;) keyword(return) ident(proc)operator(;) operator(}) comment(// use this for JRuby-internal finalizers) directive(public) type(void) ident(addInternalFinalizer)operator(()ident(Finalizable) ident(finalizer)operator(\)) operator({) directive(synchronized) operator(()ident(internalFinalizersMutex)operator(\)) operator({) keyword(if) operator(()ident(internalFinalizers) operator(==) pre_constant(null)operator(\)) operator({) ident(internalFinalizers) operator(=) keyword(new) pre_type(WeakHashMap)operator(<)ident(Finalizable)operator(,) pre_type(Object)operator(>)operator(()operator(\))operator(;) operator(}) ident(internalFinalizers)operator(.)ident(put)operator(()ident(finalizer)operator(,) pre_constant(null)operator(\))operator(;) operator(}) operator(}) comment(// this method is for finalizers registered via ObjectSpace) directive(public) type(void) ident(addFinalizer)operator(()ident(Finalizable) ident(finalizer)operator(\)) operator({) directive(synchronized) operator(()ident(finalizersMutex)operator(\)) operator({) keyword(if) operator(()ident(finalizers) operator(==) pre_constant(null)operator(\)) operator({) ident(finalizers) operator(=) keyword(new) pre_type(WeakHashMap)operator(<)ident(Finalizable)operator(,) pre_type(Object)operator(>)operator(()operator(\))operator(;) operator(}) ident(finalizers)operator(.)ident(put)operator(()ident(finalizer)operator(,) pre_constant(null)operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(removeInternalFinalizer)operator(()ident(Finalizable) ident(finalizer)operator(\)) operator({) directive(synchronized) operator(()ident(internalFinalizersMutex)operator(\)) operator({) keyword(if) operator(()ident(internalFinalizers) operator(!=) pre_constant(null)operator(\)) operator({) ident(internalFinalizers)operator(.)ident(remove)operator(()ident(finalizer)operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(void) ident(removeFinalizer)operator(()ident(Finalizable) ident(finalizer)operator(\)) operator({) directive(synchronized) operator(()ident(finalizersMutex)operator(\)) operator({) keyword(if) operator(()ident(finalizers) operator(!=) pre_constant(null)operator(\)) operator({) ident(finalizers)operator(.)ident(remove)operator(()ident(finalizer)operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** * Make sure Kernel#at_exit procs get invoked on runtime shutdown. * This method needs to be explicitly called to work properly. * I thought about using finalize(\), but that did not work and I * am not sure the runtime will be at a state to run procs by the * time Ruby is going away. This method can contain any other * things that need to be cleaned up at shutdown. */) directive(public) type(void) ident(tearDown)operator(()operator(\)) operator({) type(int) ident(status) operator(=) integer(0)operator(;) keyword(while) operator(()operator(!)ident(atExitBlocks)operator(.)ident(empty)operator(()operator(\))operator(\)) operator({) ident(RubyProc) ident(proc) operator(=) ident(atExitBlocks)operator(.)ident(pop)operator(()operator(\))operator(;) keyword(try) operator({) ident(proc)operator(.)ident(call)operator(()ident(getCurrentContext)operator(()operator(\))operator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(rj)operator(\)) operator({) ident(RubyException) ident(raisedException) operator(=) ident(rj)operator(.)ident(getException)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(getSystemExit)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(raisedException)operator(\))operator(\)) operator({) ident(status) operator(=) integer(1)operator(;) ident(printError)operator(()ident(raisedException)operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(statusObj) operator(=) ident(raisedException)operator(.)ident(callMethod)operator(() ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(statusObj) operator(!=) pre_constant(null) operator(&&) operator(!)ident(statusObj)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(status) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(statusObj)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) keyword(if) operator(()ident(finalizers) operator(!=) pre_constant(null)operator(\)) operator({) directive(synchronized) operator(()ident(finalizers)operator(\)) operator({) keyword(for) operator(()pre_type(Iterator)operator(<)ident(Finalizable)operator(>) ident(finalIter) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Finalizable)operator(>)operator(()ident(finalizers)operator(.)ident(keySet)operator(()operator(\))operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(finalIter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(finalIter)operator(.)ident(next)operator(()operator(\))operator(.)ident(finalize)operator(()operator(\))operator(;) ident(finalIter)operator(.)ident(remove)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) directive(synchronized) operator(()ident(internalFinalizersMutex)operator(\)) operator({) keyword(if) operator(()ident(internalFinalizers) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()pre_type(Iterator)operator(<)ident(Finalizable)operator(>) ident(finalIter) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Finalizable)operator(>)operator(() ident(internalFinalizers)operator(.)ident(keySet)operator(()operator(\))operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(finalIter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(finalIter)operator(.)ident(next)operator(()operator(\))operator(.)ident(finalize)operator(()operator(\))operator(;) ident(finalIter)operator(.)ident(remove)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) ident(getThreadService)operator(()operator(\))operator(.)ident(disposeCurrentThread)operator(()operator(\))operator(;) ident(getBeanManager)operator(()operator(\))operator(.)ident(unregisterCompiler)operator(()operator(\))operator(;) ident(getBeanManager)operator(()operator(\))operator(.)ident(unregisterConfig)operator(()operator(\))operator(;) ident(getBeanManager)operator(()operator(\))operator(.)ident(unregisterClassCache)operator(()operator(\))operator(;) ident(getBeanManager)operator(()operator(\))operator(.)ident(unregisterMethodCache)operator(()operator(\))operator(;) keyword(if) operator(()ident(status) operator(!=) integer(0)operator(\)) operator({) keyword(throw) ident(newSystemExit)operator(()ident(status)operator(\))operator(;) operator(}) operator(}) comment(// new factory methods ------------------------------------------------------------------------) directive(public) ident(RubyArray) ident(newEmptyArray)operator(()operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newEmptyArray)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArrayLight)operator(()operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArrayLight)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()ident(IRubyObject) ident(object)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(,) ident(object)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()ident(IRubyObject) ident(car)operator(,) ident(IRubyObject) ident(cdr)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(,) ident(car)operator(,) ident(cdr)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()ident(IRubyObject)type([]) ident(objects)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(,) ident(objects)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArrayNoCopy)operator(()ident(IRubyObject)type([]) ident(objects)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArrayNoCopy)operator(()local_variable(this)operator(,) ident(objects)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArrayNoCopyLight)operator(()ident(IRubyObject)type([]) ident(objects)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArrayNoCopyLight)operator(()local_variable(this)operator(,) ident(objects)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(list)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(,) ident(list)operator(\))operator(;) operator(}) directive(public) ident(RubyArray) ident(newArray)operator(()type(int) ident(size)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()local_variable(this)operator(,) ident(size)operator(\))operator(;) operator(}) directive(public) ident(RubyBoolean) ident(newBoolean)operator(()type(boolean) ident(value)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()local_variable(this)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyFileStat) ident(newFileStat)operator(()pre_type(String) ident(filename)operator(,) type(boolean) ident(lstat)operator(\)) operator({) keyword(return) ident(RubyFileStat)operator(.)ident(newFileStat)operator(()local_variable(this)operator(,) ident(filename)operator(,) ident(lstat)operator(\))operator(;) operator(}) directive(public) ident(RubyFileStat) ident(newFileStat)operator(()pre_type(FileDescriptor) ident(descriptor)operator(\)) operator({) keyword(return) ident(RubyFileStat)operator(.)ident(newFileStat)operator(()local_variable(this)operator(,) ident(descriptor)operator(\))operator(;) operator(}) directive(public) ident(RubyFixnum) ident(newFixnum)operator(()type(long) ident(value)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()local_variable(this)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyFixnum) ident(newFixnum)operator(()type(int) ident(value)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()local_variable(this)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyFloat) ident(newFloat)operator(()type(double) ident(value)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()local_variable(this)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric) ident(newNumeric)operator(()operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(newNumeric)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(RubyProc) ident(newProc)operator(()ident(Block)operator(.)ident(Type) ident(type)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(type) operator(!=) ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA) operator(&&) ident(block)operator(.)ident(getProcObject)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(block)operator(.)ident(getProcObject)operator(()operator(\))operator(;) ident(RubyProc) ident(proc) operator(=) ident(RubyProc)operator(.)ident(newProc)operator(()local_variable(this)operator(,) ident(type)operator(\))operator(;) ident(proc)operator(.)ident(callInit)operator(()ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(proc)operator(;) operator(}) directive(public) ident(RubyProc) ident(newBlockPassProc)operator(()ident(Block)operator(.)ident(Type) ident(type)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(type) operator(!=) ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA) operator(&&) ident(block)operator(.)ident(getProcObject)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(block)operator(.)ident(getProcObject)operator(()operator(\))operator(;) ident(RubyProc) ident(proc) operator(=) ident(RubyProc)operator(.)ident(newProc)operator(()local_variable(this)operator(,) ident(type)operator(\))operator(;) ident(proc)operator(.)ident(initialize)operator(()ident(getCurrentContext)operator(()operator(\))operator(,) ident(block)operator(\))operator(;) keyword(return) ident(proc)operator(;) operator(}) directive(public) ident(RubyBinding) ident(newBinding)operator(()operator(\)) operator({) keyword(return) ident(RubyBinding)operator(.)ident(newBinding)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(RubyBinding) ident(newBinding)operator(()pre_type(Binding) ident(binding)operator(\)) operator({) keyword(return) ident(RubyBinding)operator(.)ident(newBinding)operator(()local_variable(this)operator(,) ident(binding)operator(\))operator(;) operator(}) directive(public) ident(RubyString) ident(newString)operator(()operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()local_variable(this)operator(,) keyword(new) ident(ByteList)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyString) ident(newString)operator(()pre_type(String) ident(string)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()local_variable(this)operator(,) ident(string)operator(\))operator(;) operator(}) directive(public) ident(RubyString) ident(newString)operator(()ident(ByteList) ident(byteList)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()local_variable(this)operator(,) ident(byteList)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(RubyString) ident(newStringShared)operator(()ident(ByteList) ident(byteList)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newStringShared)operator(()local_variable(this)operator(,) ident(byteList)operator(\))operator(;) operator(}) directive(public) ident(RubySymbol) ident(newSymbol)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(symbolTable)operator(.)ident(getSymbol)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Faster than {@link #newSymbol(String\)} if you already have an interned * name String. Don't intern your string just to call this version - the * overhead of interning will more than wipe out any benefit from the faster * lookup. * * @param internedName the symbol name, must be interned! if in * doubt, call {@link #newSymbol(String\)} instead. * @return the symbol for name */) directive(public) ident(RubySymbol) ident(fastNewSymbol)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) keyword(return) ident(symbolTable)operator(.)ident(fastGetSymbol)operator(()ident(internedName)operator(\))operator(;) operator(}) directive(public) ident(RubyTime) ident(newTime)operator(()type(long) ident(milliseconds)operator(\)) operator({) keyword(return) ident(RubyTime)operator(.)ident(newTime)operator(()local_variable(this)operator(,) ident(milliseconds)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newRuntimeError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getRuntimeError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newArgumentError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getArgumentError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newArgumentError)operator(()type(int) ident(got)operator(,) type(int) ident(expected)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getArgumentError)operator(()operator(\))operator(,) string operator(+) ident(got) operator(+) string operator(+) ident(expected) operator(+) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEBADFError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoENOPROTOOPTError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEPIPEError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoECONNREFUSEDError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoECONNRESETError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEADDRINUSEError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEINVALError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoENOENTError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEACCESError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEAGAINError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEISDirError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoESPIPEError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEBADFError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEINVALError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoENOTDIRError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoENOTSOCKError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoENOENTError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoESPIPEError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEEXISTError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoEDOMError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) string operator(+) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newErrnoECHILDError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getErrno)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newIndexError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getIndexError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newSecurityError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getSecurityError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newSystemCallError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getSystemCallError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newTypeError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getTypeError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newThreadError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getThreadError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newConcurrencyError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getConcurrencyError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newSyntaxError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getSyntaxError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newRegexpError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getRegexpError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newRangeError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getRangeError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newNotImplementedError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getNotImplementedError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newInvalidEncoding)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newNoMethodError)operator(()pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(args)operator(\)) operator({) keyword(return) keyword(new) ident(RaiseException)operator(()keyword(new) ident(RubyNoMethodError)operator(()local_variable(this)operator(,) ident(getNoMethodError)operator(()operator(\))operator(,) ident(message)operator(,) ident(name)operator(,) ident(args)operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newNameError)operator(()pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(newNameError)operator(()ident(message)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newNameError)operator(()pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(,) pre_type(Throwable) ident(origException)operator(\)) operator({) keyword(return) ident(newNameError)operator(()ident(message)operator(,) ident(name)operator(,) ident(origException)operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newNameError)operator(()pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(,) pre_type(Throwable) ident(origException)operator(,) type(boolean) ident(printWhenVerbose)operator(\)) operator({) keyword(if) operator(()ident(printWhenVerbose) operator(&&) ident(origException) operator(!=) pre_constant(null) operator(&&) local_variable(this)operator(.)ident(getVerbose)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(origException)operator(.)ident(printStackTrace)operator(()ident(getErrorStream)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RaiseException)operator(()keyword(new) ident(RubyNameError)operator(() local_variable(this)operator(,) ident(getNameError)operator(()operator(\))operator(,) ident(message)operator(,) ident(name)operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newLocalJumpError)operator(()pre_type(String) ident(reason)operator(,) ident(IRubyObject) ident(exitValue)operator(,) pre_type(String) ident(message)operator(\)) operator({) keyword(return) keyword(new) ident(RaiseException)operator(()keyword(new) ident(RubyLocalJumpError)operator(()local_variable(this)operator(,) ident(getLocalJumpError)operator(()operator(\))operator(,) ident(message)operator(,) ident(reason)operator(,) ident(exitValue)operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newRedoLocalJumpError)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(RaiseException)operator(()keyword(new) ident(RubyLocalJumpError)operator(()local_variable(this)operator(,) ident(getLocalJumpError)operator(()operator(\))operator(,) stringoperator(,) stringoperator(,) ident(getNil)operator(()operator(\))operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newLoadError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getLoadError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newFrozenError)operator(()pre_type(String) ident(objectType)operator(\)) operator({) comment(// TODO: Should frozen error have its own distinct class? If not should more share?) keyword(return) ident(newRaiseException)operator(()ident(getTypeError)operator(()operator(\))operator(,) string operator(+) ident(objectType)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newSystemStackError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getSystemStackError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newSystemExit)operator(()type(int) ident(status)operator(\)) operator({) keyword(return) keyword(new) ident(RaiseException)operator(()ident(RubySystemExit)operator(.)ident(newInstance)operator(()local_variable(this)operator(,) ident(status)operator(\))operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newIOError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getIOError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newStandardError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getStandardError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newIOErrorFromException)operator(()exception(IOException) ident(ioe)operator(\)) operator({) comment(// TODO: this is kinda gross) keyword(if)operator(()ident(ioe)operator(.)ident(getMessage)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(ioe)operator(.)ident(getMessage)operator(()operator(\))operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(ioe)operator(.)ident(getMessage)operator(()operator(\))operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(newErrnoECONNRESETError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(newRaiseException)operator(()ident(getIOError)operator(()operator(\))operator(,) ident(ioe)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(newRaiseException)operator(()ident(getIOError)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) operator(}) directive(public) ident(RaiseException) ident(newTypeError)operator(()ident(IRubyObject) ident(receivedObject)operator(,) ident(RubyClass) ident(expectedType)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getTypeError)operator(()operator(\))operator(,) string operator(+) ident(receivedObject)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(+) string operator(+) ident(expectedType) operator(+) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newEOFError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getEOFError)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newEOFError)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getEOFError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newZeroDivisionError)operator(()operator(\)) operator({) keyword(return) ident(newRaiseException)operator(()ident(getZeroDivisionError)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) directive(public) ident(RaiseException) ident(newFloatDomainError)operator(()pre_type(String) ident(message)operator(\))operator({) keyword(return) ident(newRaiseException)operator(()ident(getFloatDomainError)operator(()operator(\))operator(,) ident(message)operator(\))operator(;) operator(}) comment(/** * @param exceptionClass * @param message * @return */) directive(private) ident(RaiseException) ident(newRaiseException)operator(()ident(RubyClass) ident(exceptionClass)operator(,) pre_type(String) ident(message)operator(\)) operator({) ident(RaiseException) ident(re) operator(=) keyword(new) ident(RaiseException)operator(()local_variable(this)operator(,) ident(exceptionClass)operator(,) ident(message)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(re)operator(;) operator(}) directive(public) ident(RubySymbol)operator(.)ident(SymbolTable) ident(getSymbolTable)operator(()operator(\)) operator({) keyword(return) ident(symbolTable)operator(;) operator(}) directive(public) type(void) ident(setStackTraces)operator(()type(int) ident(stackTraces)operator(\)) operator({) local_variable(this)operator(.)ident(stackTraces) operator(=) ident(stackTraces)operator(;) operator(}) directive(public) type(int) ident(getStackTraces)operator(()operator(\)) operator({) keyword(return) ident(stackTraces)operator(;) operator(}) directive(public) type(void) ident(setRandomSeed)operator(()type(long) ident(randomSeed)operator(\)) operator({) local_variable(this)operator(.)ident(randomSeed) operator(=) ident(randomSeed)operator(;) operator(}) directive(public) type(long) ident(getRandomSeed)operator(()operator(\)) operator({) keyword(return) ident(randomSeed)operator(;) operator(}) directive(public) pre_type(Random) ident(getRandom)operator(()operator(\)) operator({) keyword(return) ident(random)operator(;) operator(}) directive(public) ident(ObjectSpace) ident(getObjectSpace)operator(()operator(\)) operator({) keyword(return) ident(objectSpace)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(Integer)operator(,) pre_type(WeakReference)operator(<)ident(ChannelDescriptor)operator(>)operator(>) ident(getDescriptors)operator(()operator(\)) operator({) keyword(return) ident(descriptors)operator(;) operator(}) directive(public) type(long) ident(incrementRandomSeedSequence)operator(()operator(\)) operator({) keyword(return) ident(randomSeedSequence)operator(++)operator(;) operator(}) directive(public) pre_type(InputStream) ident(getIn)operator(()operator(\)) operator({) keyword(return) ident(in)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getOut)operator(()operator(\)) operator({) keyword(return) ident(out)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getErr)operator(()operator(\)) operator({) keyword(return) ident(err)operator(;) operator(}) directive(public) type(boolean) ident(isGlobalAbortOnExceptionEnabled)operator(()operator(\)) operator({) keyword(return) ident(globalAbortOnExceptionEnabled)operator(;) operator(}) directive(public) type(void) ident(setGlobalAbortOnExceptionEnabled)operator(()type(boolean) ident(enable)operator(\)) operator({) ident(globalAbortOnExceptionEnabled) operator(=) ident(enable)operator(;) operator(}) directive(public) type(boolean) ident(isDoNotReverseLookupEnabled)operator(()operator(\)) operator({) keyword(return) ident(doNotReverseLookupEnabled)operator(;) operator(}) directive(public) type(void) ident(setDoNotReverseLookupEnabled)operator(()type(boolean) ident(b)operator(\)) operator({) ident(doNotReverseLookupEnabled) operator(=) ident(b)operator(;) operator(}) directive(private) pre_type(ThreadLocal)operator(<)pre_type(Map)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>)operator(>) ident(inspect) operator(=) keyword(new) pre_type(ThreadLocal)operator(<)pre_type(Map)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>)operator(>)operator(()operator(\))operator(;) directive(public) type(void) ident(registerInspecting)operator(()pre_type(Object) ident(obj)operator(\)) operator({) pre_type(Map)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>) ident(val) operator(=) ident(inspect)operator(.)ident(get)operator(()operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) ident(inspect)operator(.)ident(set)operator(()ident(val) operator(=) keyword(new) pre_type(IdentityHashMap)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>)operator(()operator(\))operator(\))operator(;) ident(val)operator(.)ident(put)operator(()ident(obj)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(isInspecting)operator(()pre_type(Object) ident(obj)operator(\)) operator({) pre_type(Map)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>) ident(val) operator(=) ident(inspect)operator(.)ident(get)operator(()operator(\))operator(;) keyword(return) ident(val) operator(==) pre_constant(null) operator(?) pre_constant(false) operator(:) ident(val)operator(.)ident(containsKey)operator(()ident(obj)operator(\))operator(;) operator(}) directive(public) type(void) ident(unregisterInspecting)operator(()pre_type(Object) ident(obj)operator(\)) operator({) pre_type(Map)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>) ident(val) operator(=) ident(inspect)operator(.)ident(get)operator(()operator(\))operator(;) keyword(if) operator(()ident(val) operator(!=) pre_constant(null) operator(\)) ident(val)operator(.)ident(remove)operator(()ident(obj)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(isObjectSpaceEnabled)operator(()operator(\)) operator({) keyword(return) ident(objectSpaceEnabled)operator(;) operator(}) comment(// The method is intentionally not public, since it typically should) comment(// not be used outside of the core.) comment(/* package-private */) type(void) ident(setObjectSpaceEnabled)operator(()type(boolean) ident(objectSpaceEnabled)operator(\)) operator({) local_variable(this)operator(.)ident(objectSpaceEnabled) operator(=) ident(objectSpaceEnabled)operator(;) operator(}) directive(public) type(long) ident(getStartTime)operator(()operator(\)) operator({) keyword(return) ident(startTime)operator(;) operator(}) directive(public) ident(Profile) ident(getProfile)operator(()operator(\)) operator({) keyword(return) ident(profile)operator(;) operator(}) directive(public) pre_type(String) ident(getJRubyHome)operator(()operator(\)) operator({) keyword(return) ident(config)operator(.)ident(getJRubyHome)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(setJRubyHome)operator(()pre_type(String) ident(home)operator(\)) operator({) ident(config)operator(.)ident(setJRubyHome)operator(()ident(home)operator(\))operator(;) operator(}) directive(public) ident(RubyInstanceConfig) ident(getInstanceConfig)operator(()operator(\)) operator({) keyword(return) ident(config)operator(;) operator(}) comment(/** GET_VM_STATE_VERSION */) directive(public) type(long) ident(getGlobalState)operator(()operator(\)) operator({) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) keyword(return) ident(globalState)operator(;) operator(}) operator(}) comment(/** INC_VM_STATE_VERSION */) directive(public) type(void) ident(incGlobalState)operator(()operator(\)) operator({) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) ident(globalState) operator(=) operator(()ident(globalState)operator(+)integer(1)operator(\)) operator(&) hex(0x8fffffff)operator(;) operator(}) operator(}) directive(public) directive(static) type(boolean) ident(isSecurityRestricted)operator(()operator(\)) operator({) keyword(return) ident(securityRestricted)operator(;) operator(}) directive(public) directive(static) type(void) ident(setSecurityRestricted)operator(()type(boolean) ident(restricted)operator(\)) operator({) ident(securityRestricted) operator(=) ident(restricted)operator(;) operator(}) directive(public) ident(POSIX) ident(getPosix)operator(()operator(\)) operator({) keyword(return) ident(posix)operator(;) operator(}) directive(public) type(void) ident(setRecordSeparatorVar)operator(()ident(GlobalVariable) ident(recordSeparatorVar)operator(\)) operator({) local_variable(this)operator(.)ident(recordSeparatorVar) operator(=) ident(recordSeparatorVar)operator(;) operator(}) directive(public) ident(GlobalVariable) ident(getRecordSeparatorVar)operator(()operator(\)) operator({) keyword(return) ident(recordSeparatorVar)operator(;) operator(}) directive(public) pre_type(Set)operator(<)ident(Script)operator(>) ident(getJittedMethods)operator(()operator(\)) operator({) keyword(return) ident(jittedMethods)operator(;) operator(}) directive(public) pre_type(ExecutorService) ident(getExecutor)operator(()operator(\)) operator({) keyword(return) ident(executor)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) ident(DateTimeZone)operator(>) ident(getLocalTimezoneCache)operator(()operator(\)) operator({) keyword(return) ident(localTimeZoneCache)operator(;) operator(}) directive(private) directive(final) ident(CacheMap) ident(cacheMap)operator(;) directive(private) directive(final) ident(ThreadService) ident(threadService)operator(;) directive(private) pre_type(Hashtable)operator(<)pre_type(Object)operator(,) pre_type(Object)operator(>) ident(runtimeInformation)operator(;) directive(private) ident(POSIX) ident(posix)operator(;) directive(private) type(int) ident(stackTraces) operator(=) integer(0)operator(;) directive(private) ident(ObjectSpace) ident(objectSpace) operator(=) keyword(new) ident(ObjectSpace)operator(()operator(\))operator(;) directive(private) directive(final) ident(RubySymbol)operator(.)ident(SymbolTable) ident(symbolTable) operator(=) keyword(new) ident(RubySymbol)operator(.)ident(SymbolTable)operator(()local_variable(this)operator(\))operator(;) directive(private) pre_type(Map)operator(<)pre_type(Integer)operator(,) pre_type(WeakReference)operator(<)ident(ChannelDescriptor)operator(>)operator(>) ident(descriptors) operator(=) keyword(new) pre_type(ConcurrentHashMap)operator(<)pre_type(Integer)operator(,) pre_type(WeakReference)operator(<)ident(ChannelDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) directive(private) type(long) ident(randomSeed) operator(=) integer(0)operator(;) directive(private) type(long) ident(randomSeedSequence) operator(=) integer(0)operator(;) directive(private) pre_type(Random) ident(random) operator(=) keyword(new) pre_type(Random)operator(()operator(\))operator(;) directive(private) pre_type(List)operator(<)ident(EventHook)operator(>) ident(eventHooks) operator(=) keyword(new) pre_type(Vector)operator(<)ident(EventHook)operator(>)operator(()operator(\))operator(;) directive(private) type(boolean) ident(hasEventHooks)operator(;) directive(private) type(boolean) ident(globalAbortOnExceptionEnabled) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(doNotReverseLookupEnabled) operator(=) pre_constant(false)operator(;) directive(private) directive(volatile) type(boolean) ident(objectSpaceEnabled)operator(;) directive(private) directive(final) pre_type(Set)operator(<)ident(Script)operator(>) ident(jittedMethods) operator(=) pre_type(Collections)operator(.)ident(synchronizedSet)operator(()keyword(new) ident(WeakHashSet)operator(<)ident(Script)operator(>)operator(()operator(\))operator(\))operator(;) directive(private) directive(static) pre_type(ThreadLocal)operator(<)ident(Ruby)operator(>) ident(currentRuntime) operator(=) keyword(new) pre_type(ThreadLocal)operator(<)ident(Ruby)operator(>)operator(()operator(\))operator(;) directive(private) type(long) ident(globalState) operator(=) integer(1)operator(;) directive(private) type(int) ident(safeLevel) operator(=) operator(-)integer(1)operator(;) comment(// Default objects) directive(private) ident(IRubyObject) ident(topSelf)operator(;) directive(private) ident(RubyNil) ident(nilObject)operator(;) directive(private) ident(RubyBoolean) ident(trueObject)operator(;) directive(private) ident(RubyBoolean) ident(falseObject)operator(;) directive(public) directive(final) ident(RubyFixnum)type([]) ident(fixnumCache) operator(=) keyword(new) ident(RubyFixnum)operator([)integer(256)operator(])operator(;) directive(private) ident(IRubyObject) ident(verbose)operator(;) directive(private) ident(IRubyObject) ident(debug)operator(;) directive(private) ident(RubyThreadGroup) ident(defaultThreadGroup)operator(;) comment(/** * All the core classes we keep hard references to. These are here largely * so that if someone redefines String or Array we won't start blowing up * creating strings and arrays internally. They also provide much faster * access than going through normal hash lookup on the Object class. */) directive(private) ident(RubyClass) ident(objectClass)operator(,) ident(moduleClass)operator(,) ident(classClass)operator(,) ident(nilClass)operator(,) ident(trueClass)operator(,) ident(falseClass)operator(,) ident(numericClass)operator(,) ident(floatClass)operator(,) ident(integerClass)operator(,) ident(fixnumClass)operator(,) ident(complexClass)operator(,) ident(rationalClass)operator(,) ident(enumeratorClass)operator(,) ident(arrayClass)operator(,) ident(hashClass)operator(,) ident(rangeClass)operator(,) ident(stringClass)operator(,) ident(symbolClass)operator(,) ident(procClass)operator(,) ident(bindingClass)operator(,) ident(methodClass)operator(,) ident(unboundMethodClass)operator(,) ident(matchDataClass)operator(,) ident(regexpClass)operator(,) ident(timeClass)operator(,) ident(bignumClass)operator(,) ident(dirClass)operator(,) ident(fileClass)operator(,) ident(fileStatClass)operator(,) ident(ioClass)operator(,) ident(threadClass)operator(,) ident(threadGroupClass)operator(,) ident(continuationClass)operator(,) ident(structClass)operator(,) ident(tmsStruct)operator(,) ident(passwdStruct)operator(,) ident(groupStruct)operator(,) ident(procStatusClass)operator(,) ident(exceptionClass)operator(,) ident(runtimeError)operator(,) ident(ioError)operator(,) ident(scriptError)operator(,) ident(nameError)operator(,) ident(nameErrorMessage)operator(,) ident(noMethodError)operator(,) ident(signalException)operator(,) ident(rangeError)operator(,) ident(dummyClass)operator(,) ident(systemExit)operator(,) ident(localJumpError)operator(,) ident(nativeException)operator(,) ident(systemCallError)operator(,) ident(fatal)operator(,) ident(interrupt)operator(,) ident(typeError)operator(,) ident(argumentError)operator(,) ident(indexError)operator(,) ident(syntaxError)operator(,) ident(standardError)operator(,) ident(loadError)operator(,) ident(notImplementedError)operator(,) ident(securityError)operator(,) ident(noMemoryError)operator(,) ident(regexpError)operator(,) ident(eofError)operator(,) ident(threadError)operator(,) ident(concurrencyError)operator(,) ident(systemStackError)operator(,) ident(zeroDivisionError)operator(,) ident(floatDomainError)operator(;) comment(/** * All the core modules we keep direct references to, for quick access and * to ensure they remain available. */) directive(private) ident(RubyModule) ident(kernelModule)operator(,) ident(comparableModule)operator(,) ident(enumerableModule)operator(,) ident(mathModule)operator(,) ident(marshalModule)operator(,) ident(etcModule)operator(,) ident(fileTestModule)operator(,) ident(gcModule)operator(,) ident(objectSpaceModule)operator(,) ident(processModule)operator(,) ident(procUIDModule)operator(,) ident(procGIDModule)operator(,) ident(procSysModule)operator(,) ident(precisionModule)operator(,) ident(errnoModule)operator(;) comment(// record separator var, to speed up io ops that use it) directive(private) ident(GlobalVariable) ident(recordSeparatorVar)operator(;) comment(// former java.lang.System concepts now internalized for MVM) directive(private) pre_type(String) ident(currentDirectory)operator(;) directive(private) type(long) ident(startTime) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) directive(private) ident(RubyInstanceConfig) ident(config)operator(;) directive(private) pre_type(InputStream) ident(in)operator(;) directive(private) pre_type(PrintStream) ident(out)operator(;) directive(private) pre_type(PrintStream) ident(err)operator(;) comment(// Java support) directive(private) ident(JavaSupport) ident(javaSupport)operator(;) directive(private) ident(JRubyClassLoader) ident(jrubyClassLoader)operator(;) comment(// Management/monitoring) directive(private) ident(BeanManager) ident(beanManager)operator(;) comment(// Compilation) directive(private) directive(final) ident(JITCompiler) ident(jitCompiler)operator(;) comment(// Note: this field and the following static initializer) comment(// must be located be in this order!) directive(private) directive(volatile) directive(static) type(boolean) ident(securityRestricted) operator(=) pre_constant(false)operator(;) directive(static) operator({) keyword(if) operator(()ident(SafePropertyAccessor)operator(.)ident(isSecurityProtected)operator(()stringoperator(\))operator(\)) operator({) comment(// can't read non-standard properties) ident(securityRestricted) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) operator({) pre_type(SecurityManager) ident(sm) operator(=) pre_type(System)operator(.)ident(getSecurityManager)operator(()operator(\))operator(;) keyword(if) operator(()ident(sm) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(sm)operator(.)ident(checkCreateClassLoader)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(SecurityException) ident(se)operator(\)) operator({) comment(// can't create custom classloaders) ident(securityRestricted) operator(=) pre_constant(true)operator(;) operator(}) operator(}) operator(}) operator(}) directive(private) pre_type(Parser) ident(parser) operator(=) keyword(new) pre_type(Parser)operator(()local_variable(this)operator(\))operator(;) directive(private) ident(LoadService) ident(loadService)operator(;) directive(private) ident(GlobalVariables) ident(globalVariables) operator(=) keyword(new) ident(GlobalVariables)operator(()local_variable(this)operator(\))operator(;) directive(private) ident(RubyWarnings) ident(warnings) operator(=) keyword(new) ident(RubyWarnings)operator(()local_variable(this)operator(\))operator(;) comment(// Contains a list of all blocks (as Procs\) that should be called when) comment(// the runtime environment exits.) directive(private) pre_type(Stack)operator(<)ident(RubyProc)operator(>) ident(atExitBlocks) operator(=) keyword(new) pre_type(Stack)operator(<)ident(RubyProc)operator(>)operator(()operator(\))operator(;) directive(private) ident(Profile) ident(profile)operator(;) directive(private) ident(KCode) ident(kcode) operator(=) ident(KCode)operator(.)ident(NONE)operator(;) comment(// Atomic integers for symbol and method IDs) directive(private) pre_type(AtomicInteger) ident(symbolLastId) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(128)operator(\))operator(;) directive(private) pre_type(AtomicInteger) ident(moduleLastId) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(0)operator(\))operator(;) directive(private) pre_type(Object) ident(respondToMethod)operator(;) directive(private) pre_type(Object) ident(objectToYamlMethod)operator(;) directive(private) pre_type(Map)operator(<)pre_type(String)operator(,) ident(DateTimeZone)operator(>) ident(localTimeZoneCache) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,)ident(DateTimeZone)operator(>)operator(()operator(\))operator(;) comment(/** * A list of "external" finalizers (the ones, registered via ObjectSpace\), * weakly referenced, to be executed on tearDown. */) directive(private) pre_type(Map)operator(<)ident(Finalizable)operator(,) pre_type(Object)operator(>) ident(finalizers)operator(;) comment(/** * A list of JRuby-internal finalizers, weakly referenced, * to be executed on tearDown. */) directive(private) pre_type(Map)operator(<)ident(Finalizable)operator(,) pre_type(Object)operator(>) ident(internalFinalizers)operator(;) comment(// mutex that controls modifications of user-defined finalizers) directive(private) directive(final) pre_type(Object) ident(finalizersMutex) operator(=) keyword(new) pre_type(Object)operator(()operator(\))operator(;) comment(// mutex that controls modifications of internal finalizers) directive(private) directive(final) pre_type(Object) ident(internalFinalizersMutex) operator(=) keyword(new) pre_type(Object)operator(()operator(\))operator(;) comment(// A thread pool to use for executing this runtime's Ruby threads) directive(private) pre_type(ExecutorService) ident(executor)operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.FrameField)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) directive(public) type(class) class(RubyArgsFile) operator({) directive(private) directive(static) directive(final) type(class) class(ArgsFileData) operator({) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(public) ident(ArgsFileData)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) operator(}) directive(public) ident(IRubyObject) ident(currentFile)operator(;) directive(public) type(int) ident(currentLineNumber)operator(;) directive(public) type(boolean) ident(startedProcessing) operator(=) pre_constant(false)operator(;) directive(public) type(boolean) ident(finishedProcessing) operator(=) pre_constant(false)operator(;) directive(public) type(boolean) ident(nextArgsFile)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(finishedProcessing)operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) ident(RubyArray) ident(args) operator(=) operator(()ident(RubyArray)operator(\))ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(getLength)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(if) operator(()operator(!)ident(startedProcessing)operator(\)) operator({) ident(currentFile) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) operator(()operator(()ident(RubyString)operator(\)) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(setValue)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(;) ident(currentLineNumber) operator(=) integer(0)operator(;) ident(startedProcessing) operator(=) pre_constant(true)operator(;) keyword(return) pre_constant(true)operator(;) operator(}) keyword(else) operator({) ident(finishedProcessing) operator(=) pre_constant(true)operator(;) keyword(return) pre_constant(false)operator(;) operator(}) operator(}) ident(IRubyObject) ident(arg) operator(=) ident(args)operator(.)ident(shift)operator(()operator(\))operator(;) ident(RubyString) ident(filename) operator(=) operator(()ident(RubyString)operator(\))operator(()operator(()ident(RubyObject)operator(\))ident(arg)operator(\))operator(.)ident(to_s)operator(()operator(\))operator(;) ident(ByteList) ident(filenameBytes) operator(=) ident(filename)operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(()operator(()ident(RubyString)operator(\)) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(setValue)operator(()ident(filenameBytes)operator(\))operator(;) keyword(if) operator(()ident(filenameBytes)operator(.)ident(length)operator(()operator(\)) operator(==) integer(1) operator(&&) ident(filenameBytes)operator(.)ident(get)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator({) ident(currentFile) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(currentFile) operator(=) ident(RubyFile)operator(.)ident(open)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(filename)operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) ident(startedProcessing) operator(=) pre_constant(true)operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) directive(static) ident(ArgsFileData) ident(getDataFrom)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) operator(()ident(ArgsFileData)operator(\))ident(recv)operator(.)ident(dataGetStruct)operator(()operator(\))operator(;) keyword(if)operator(()ident(data) operator(==) pre_constant(null)operator(\)) operator({) ident(data) operator(=) keyword(new) ident(ArgsFileData)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(recv)operator(.)ident(dataWrapStruct)operator(()ident(data)operator(\))operator(;) operator(}) keyword(return) ident(data)operator(;) operator(}) operator(}) directive(public) directive(static) type(void) ident(setCurrentLineNumber)operator(()ident(IRubyObject) ident(recv)operator(,) type(int) ident(newLineNumber)operator(\)) operator({) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(.)ident(currentLineNumber) operator(=) ident(newLineNumber)operator(;) operator(}) directive(public) directive(static) type(void) ident(initArgsFile)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyObject) ident(argsFile) operator(=) keyword(new) ident(RubyObject)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(.)ident(extend_object)operator(()ident(argsFile)operator(\))operator(;) ident(runtime)operator(.)ident(defineReadonlyVariable)operator(()stringoperator(,) ident(argsFile)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(argsFile)operator(\))operator(;) ident(RubyClass) ident(argfClass) operator(=) ident(argsFile)operator(.)ident(getMetaClass)operator(()operator(\))operator(;) ident(argfClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyArgsFile)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(defineReadonlyVariable)operator(()stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(fileno)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if) operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\)) ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(fileno)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(to_io)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if) operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(data)operator(.)ident(currentFile)operator(;) operator(}) directive(public) directive(static) ident(IRubyObject) ident(internalGets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(IRubyObject) ident(line) operator(=) ident(data)operator(.)ident(currentFile)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(\))operator(;) keyword(while) operator(()ident(line) keyword(instanceof) ident(RubyNil)operator(\)) operator({) ident(data)operator(.)ident(currentFile)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) ident(data)operator(.)ident(currentFile) operator(=) pre_constant(null)operator(;) keyword(return) ident(line)operator(;) operator(}) ident(line) operator(=) ident(data)operator(.)ident(currentFile)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(\))operator(;) operator(}) ident(data)operator(.)ident(currentLineNumber)operator(++)operator(;) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(data)operator(.)ident(currentLineNumber)operator(\))operator(\))operator(;) keyword(return) ident(line)operator(;) operator(}) comment(// ARGF methods) comment(/** Read a line. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) keyword(if) operator(()operator(!)ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(result)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** Read a line. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(readline)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(line)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(readlines)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject)type([]) ident(separatorArgument)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(if) operator(()operator(!)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNilClass)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(args)operator([)integer(0)operator(])operator(\)) operator(&&) operator(!)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(\))operator(;) operator(}) ident(separatorArgument) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(args)operator([)integer(0)operator(]) operator(})operator(;) operator(}) keyword(else) operator({) ident(separatorArgument) operator(=) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(;) operator(}) ident(RubyArray) ident(result) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(line)operator(;) keyword(while) operator(()operator(!) operator(()ident(line) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(separatorArgument)operator(\))operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(line)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_byte)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject) ident(bt)operator(;) keyword(while)operator(()operator(!)operator(()ident(bt) operator(=) ident(getc)operator(()ident(context)operator(,) ident(recv)operator(\))operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(bt)operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) comment(/** Invoke a block for each line. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) operator({)stringoperator(})operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_line)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject) ident(nextLine) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) keyword(while) operator(()operator(!)ident(nextLine)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(nextLine)operator(\))operator(;) ident(nextLine) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(file)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(data)operator(.)ident(currentFile)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(skip)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) ident(data)operator(.)ident(currentFile) operator(=) pre_constant(null)operator(;) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(close)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(;) operator(}) ident(data)operator(.)ident(currentFile) operator(=) pre_constant(null)operator(;) ident(data)operator(.)ident(currentLineNumber) operator(=) integer(0)operator(;) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(closed_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(closed_p)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(binmode)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(binmode)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(lineno)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(.)ident(currentLineNumber)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) operator({)stringoperator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(tell)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(pos)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(rewind)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(rewind)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eof)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if) operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\)) ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(eof_p)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(set_pos)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(offset)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(pos_set)operator(()ident(context)operator(,) ident(offset)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(seek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(seek)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(set_lineno)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(line)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) ident(data)operator(.)ident(currentLineNumber) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(line)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(readchar)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(IRubyObject) ident(c) operator(=) ident(getc)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) keyword(if)operator(()ident(c)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(c)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(getc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) ident(IRubyObject) ident(bt)operator(;) keyword(while)operator(()pre_constant(true)operator(\)) operator({) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)operator(()ident(data)operator(.)ident(currentFile) keyword(instanceof) ident(RubyFile)operator(\))operator(\)) operator({) ident(bt) operator(=) ident(data)operator(.)ident(currentFile)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(bt) operator(=) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(getc)operator(()operator(\))operator(;) operator(}) keyword(if)operator(()ident(bt)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(data)operator(.)ident(currentFile) operator(=) pre_constant(null)operator(;) keyword(continue)operator(;) operator(}) keyword(return) ident(bt)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ArgsFileData) ident(data) operator(=) ident(ArgsFileData)operator(.)ident(getDataFrom)operator(()ident(recv)operator(\))operator(;) ident(IRubyObject) ident(tmp)operator(,) ident(str)operator(,) ident(length)operator(;) type(long) ident(len) operator(=) integer(0)operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(length) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(str) operator(=) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(else) operator({) ident(str) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(length) operator(=) ident(str) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(length)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(length)operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(str) operator(=) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(modify)operator(()operator(\))operator(;) operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()integer(0)operator(\))operator(;) ident(args)operator([)integer(1)operator(]) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(while)operator(()pre_constant(true)operator(\)) operator({) keyword(if)operator(()ident(data)operator(.)ident(currentFile) operator(==) pre_constant(null) operator(&&) operator(!)ident(data)operator(.)ident(nextArgsFile)operator(()ident(context)operator(\))operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) keyword(if)operator(()operator(!)operator(()ident(data)operator(.)ident(currentFile) keyword(instanceof) ident(RubyIO)operator(\))operator(\)) operator({) ident(tmp) operator(=) ident(data)operator(.)ident(currentFile)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(\))operator(;) operator(}) keyword(else) operator({) ident(tmp) operator(=) operator(()operator(()ident(RubyIO)operator(\))ident(data)operator(.)ident(currentFile)operator(\))operator(.)ident(read)operator(()ident(args)operator(\))operator(;) operator(}) keyword(if)operator(()ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(str) operator(=) ident(tmp)operator(;) operator(}) keyword(else) keyword(if)operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(append)operator(()ident(tmp)operator(\))operator(;) operator(}) keyword(if)operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(length)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(data)operator(.)ident(currentFile) operator(=) pre_constant(null)operator(;) keyword(continue)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>=) integer(1)operator(\)) operator({) keyword(if)operator(()operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(<) ident(len)operator(\)) operator({) ident(len) operator(-=) operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) ident(args)operator([)integer(0)operator(]) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(len)operator(\))operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(return) ident(str)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) operator({)stringoperator(})operator(\)) directive(public) directive(static) ident(RubyString) ident(filename)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) operator(()ident(RubyString)operator(\)) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(to_s)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2005 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Daniel Steer * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.reflect.Array)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.Arrays)operator(;) keyword(import) include(java.util.Collection)operator(;) keyword(import) include(java.util.Comparator)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.ListIterator)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.Pack)operator(;) comment(/** * The implementation of the built-in class Array in Ruby. * * Concurrency: no synchronization is required among readers, but * all users must synchronize externally with writers. * */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyArray) directive(extends) ident(RubyObject) directive(implements) pre_type(List) operator({) directive(public) directive(static) ident(RubyClass) ident(createArrayClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(arrayc) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ARRAY_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setArray)operator(()ident(arrayc)operator(\))operator(;) ident(arrayc)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(ARRAY)operator(;) ident(arrayc)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyArray)operator(;) operator(}) operator(})operator(;) ident(arrayc)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(arrayc)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyArray)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(arrayc)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(ARRAY_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(ARRAY)operator(;) operator(}) directive(private) directive(final) type(void) ident(concurrentModification)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newConcurrencyError)operator(()stringoperator(\))operator(;) operator(}) comment(/** rb_ary_s_create * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(create)operator(()ident(IRubyObject) ident(klass)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) operator(()ident(RubyArray)operator(\)) operator(()operator(()ident(RubyClass)operator(\)) ident(klass)operator(\))operator(.)ident(allocate)operator(()operator(\))operator(;) ident(arr)operator(.)ident(callInit)operator(()ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(block)operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(arr)operator(.)ident(alloc)operator(()ident(args)operator(.)ident(length)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(arr)operator(.)ident(values)operator(,) integer(0)operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) ident(arr)operator(.)ident(realLength) operator(=) ident(args)operator(.)ident(length)operator(;) operator(}) keyword(return) ident(arr)operator(;) operator(}) comment(/** rb_ary_new2 * */) directive(public) directive(static) directive(final) ident(RubyArray) ident(newArray)operator(()directive(final) ident(Ruby) ident(runtime)operator(,) directive(final) type(long) ident(len)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(len)operator(\))operator(;) operator(}) directive(public) directive(static) directive(final) ident(RubyArray) ident(newArrayLight)operator(()directive(final) ident(Ruby) ident(runtime)operator(,) directive(final) type(long) ident(len)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(len)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_ary_new * */) directive(public) directive(static) directive(final) ident(RubyArray) ident(newArray)operator(()directive(final) ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) operator(}) comment(/** rb_ary_new * */) directive(public) directive(static) directive(final) ident(RubyArray) ident(newArrayLight)operator(()directive(final) ident(Ruby) ident(runtime)operator(\)) operator({) comment(/* Ruby arrays default to holding 16 elements, so we create an * ArrayList of the same size if we're not told otherwise */) ident(RubyArray) ident(arr) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) pre_constant(false)operator(\))operator(;) ident(arr)operator(.)ident(alloc)operator(()ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) keyword(return) ident(arr)operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(obj) operator(})operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArrayLight)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(obj) operator(})operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_assoc_new * */) directive(public) directive(static) ident(RubyArray) ident(newArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(car)operator(,) ident(IRubyObject) ident(cdr)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(car)operator(,) ident(cdr) operator(})operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newEmptyArray)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(NULL_ARRAY)operator(\))operator(;) operator(}) comment(/** rb_ary_new4, rb_ary_new3 * */) directive(public) directive(static) ident(RubyArray) ident(newArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(arr)operator(.)ident(values)operator(,) integer(0)operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) ident(arr)operator(.)ident(realLength) operator(=) ident(args)operator(.)ident(length)operator(;) keyword(return) ident(arr)operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArrayNoCopy)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(args)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArrayNoCopy)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) type(int) ident(begin)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(args)operator(,) ident(begin)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArrayNoCopyLight)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) pre_constant(false)operator(\))operator(;) ident(arr)operator(.)ident(values) operator(=) ident(args)operator(;) ident(arr)operator(.)ident(realLength) operator(=) ident(args)operator(.)ident(length)operator(;) keyword(return) ident(arr)operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(newArray)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Collection) ident(collection)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(collection)operator(.)ident(size)operator(()operator(\))operator(\))operator(;) ident(collection)operator(.)ident(toArray)operator(()ident(arr)operator(.)ident(values)operator(\))operator(;) ident(arr)operator(.)ident(realLength) operator(=) ident(arr)operator(.)ident(values)operator(.)ident(length)operator(;) keyword(return) ident(arr)operator(;) operator(}) directive(public) directive(static) directive(final) type(int) ident(ARRAY_DEFAULT_SIZE) operator(=) integer(16)operator(;) comment(// volatile to ensure that initial nil-fill is visible to other threads) directive(private) directive(volatile) ident(IRubyObject)type([]) ident(values)operator(;) directive(private) directive(static) directive(final) type(int) ident(TMPLOCK_ARR_F) operator(=) integer(1) operator(<)operator(<) integer(9)operator(;) directive(private) directive(static) directive(final) type(int) ident(TMPLOCK_OR_FROZEN_ARR_F) operator(=) ident(TMPLOCK_ARR_F) operator(|) ident(FROZEN_F)operator(;) directive(private) directive(volatile) type(boolean) ident(isShared) operator(=) pre_constant(false)operator(;) directive(private) type(int) ident(begin) operator(=) integer(0)operator(;) directive(private) type(int) ident(realLength) operator(=) integer(0)operator(;) comment(/* * plain internal array assignment */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(vals)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) ident(values) operator(=) ident(vals)operator(;) ident(realLength) operator(=) ident(vals)operator(.)ident(length)operator(;) operator(}) comment(/* * plain internal array assignment */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(vals)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(,) ident(objectSpace)operator(\))operator(;) ident(values) operator(=) ident(vals)operator(;) ident(realLength) operator(=) ident(vals)operator(.)ident(length)operator(;) operator(}) comment(/* * plain internal array assignment */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(vals)operator(,) type(int) ident(begin)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(values) operator(=) ident(vals)operator(;) local_variable(this)operator(.)ident(begin) operator(=) ident(begin)operator(;) local_variable(this)operator(.)ident(realLength) operator(=) ident(vals)operator(.)ident(length) operator(-) ident(begin)operator(;) local_variable(this)operator(.)ident(isShared) operator(=) pre_constant(true)operator(;) operator(}) comment(/* rb_ary_new2 * just allocates the internal array */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(length)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) ident(checkLength)operator(()ident(length)operator(\))operator(;) ident(alloc)operator(()operator(()type(int)operator(\)) ident(length)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(length)operator(,) type(boolean) ident(objectspace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(,) ident(objectspace)operator(\))operator(;) ident(checkLength)operator(()ident(length)operator(\))operator(;) ident(alloc)operator(()operator(()type(int)operator(\))ident(length)operator(\))operator(;) operator(}) comment(/* rb_ary_new3, rb_ary_new4 * allocates the internal array of size length and copies the 'length' elements */) directive(public) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(length)operator(,) ident(IRubyObject)type([]) ident(vals)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) ident(checkLength)operator(()ident(length)operator(\))operator(;) type(int) ident(ilength) operator(=) operator(()type(int)operator(\)) ident(length)operator(;) ident(alloc)operator(()ident(ilength)operator(\))operator(;) keyword(if) operator(()ident(ilength) operator(>) integer(0) operator(&&) ident(vals)operator(.)ident(length) operator(>) integer(0)operator(\)) pre_type(System)operator(.)ident(arraycopy)operator(()ident(vals)operator(,) integer(0)operator(,) ident(values)operator(,) integer(0)operator(,) ident(ilength)operator(\))operator(;) ident(realLength) operator(=) ident(ilength)operator(;) operator(}) comment(/* NEWOBJ and OBJSETUP equivalent * fastest one, for shared arrays, optional objectspace */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(,) ident(objectSpace)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) ident(alloc)operator(()ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) operator(}) directive(public) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(alloc)operator(()ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) operator(}) comment(/* Array constructors taking the MetaClass to fulfil MRI Array subclass behaviour * */) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) type(int) ident(length)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(alloc)operator(()ident(length)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) type(long) ident(length)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(checkLength)operator(()ident(length)operator(\))operator(;) ident(alloc)operator(()operator(()type(int)operator(\))ident(length)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) type(long) ident(length)operator(,) type(boolean) ident(objectspace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(objectspace)operator(\))operator(;) ident(checkLength)operator(()ident(length)operator(\))operator(;) ident(alloc)operator(()operator(()type(int)operator(\))ident(length)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(objectSpace)operator(\))operator(;) operator(}) directive(private) ident(RubyArray)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) ident(RubyArray) ident(original)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(realLength) operator(=) ident(original)operator(.)ident(realLength)operator(;) ident(alloc)operator(()ident(realLength)operator(\))operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(original)operator(.)ident(values)operator(,) ident(original)operator(.)ident(begin)operator(,) ident(values)operator(,) integer(0)operator(,) ident(realLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) directive(final) ident(IRubyObject)type([]) ident(reserve)operator(()type(int) ident(length)operator(\)) operator({) directive(final) ident(IRubyObject)type([]) ident(arr) operator(=) keyword(new) ident(IRubyObject)operator([)ident(length)operator(])operator(;) pre_type(Arrays)operator(.)ident(fill)operator(()ident(arr)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(arr)operator(;) operator(}) directive(private) directive(final) type(void) ident(alloc)operator(()type(int) ident(length)operator(\)) operator({) directive(final) ident(IRubyObject)type([]) ident(newValues) operator(=) keyword(new) ident(IRubyObject)operator([)ident(length)operator(])operator(;) pre_type(Arrays)operator(.)ident(fill)operator(()ident(newValues)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) ident(values) operator(=) ident(newValues)operator(;) operator(}) directive(private) directive(final) type(void) ident(realloc)operator(()type(int) ident(newLength)operator(\)) operator({) ident(IRubyObject)type([]) ident(reallocated) operator(=) keyword(new) ident(IRubyObject)operator([)ident(newLength)operator(])operator(;) pre_type(Arrays)operator(.)ident(fill)operator(()ident(reallocated)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) integer(0)operator(,) ident(reallocated)operator(,) integer(0)operator(,) ident(newLength) operator(>) ident(realLength) operator(?) ident(realLength) operator(:) ident(newLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(values) operator(=) ident(reallocated)operator(;) operator(}) directive(private) directive(final) type(void) ident(checkLength)operator(()type(long) ident(length)operator(\)) operator({) keyword(if) operator(()ident(length) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(length) operator(>=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** Getter for property list. * @return Value of property list. */) directive(public) pre_type(List) ident(getList)operator(()operator(\)) operator({) keyword(return) pre_type(Arrays)operator(.)ident(asList)operator(()ident(toJavaArray)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(int) ident(getLength)operator(()operator(\)) operator({) keyword(return) ident(realLength)operator(;) operator(}) directive(public) ident(IRubyObject)type([]) ident(toJavaArray)operator(()operator(\)) operator({) ident(IRubyObject)type([]) ident(copy) operator(=) ident(reserve)operator(()ident(realLength)operator(\))operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) ident(begin)operator(,) ident(copy)operator(,) integer(0)operator(,) ident(realLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) keyword(return) ident(copy)operator(;) operator(}) directive(public) ident(IRubyObject)type([]) ident(toJavaArrayUnsafe)operator(()operator(\)) operator({) keyword(return) operator(!)ident(isShared) operator(?) ident(values) operator(:) ident(toJavaArray)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject)type([]) ident(toJavaArrayMaybeUnsafe)operator(()operator(\)) operator({) keyword(return) operator(()operator(!)ident(isShared) operator(&&) ident(begin) operator(==) integer(0) operator(&&) ident(values)operator(.)ident(length) operator(==) ident(realLength)operator(\)) operator(?) ident(values) operator(:) ident(toJavaArray)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_make_shared * */) directive(private) directive(final) ident(RubyArray) ident(makeShared)operator(()type(int) ident(beg)operator(,) type(int) ident(len)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) ident(makeShared)operator(()ident(beg)operator(,) ident(len)operator(,) ident(klass)operator(,) ident(klass)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_make_shared * */) directive(private) directive(final) ident(RubyArray) ident(makeShared)operator(()type(int) ident(beg)operator(,) type(int) ident(len)operator(,) ident(RubyClass) ident(klass)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) ident(RubyArray) ident(sharedArray) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(klass)operator(,) ident(objectSpace)operator(\))operator(;) ident(isShared) operator(=) pre_constant(true)operator(;) ident(sharedArray)operator(.)ident(values) operator(=) ident(values)operator(;) ident(sharedArray)operator(.)ident(isShared) operator(=) pre_constant(true)operator(;) ident(sharedArray)operator(.)ident(begin) operator(=) ident(beg)operator(;) ident(sharedArray)operator(.)ident(realLength) operator(=) ident(len)operator(;) keyword(return) ident(sharedArray)operator(;) operator(}) comment(/** rb_ary_modify_check * */) directive(private) directive(final) type(void) ident(modifyCheck)operator(()operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(TMPLOCK_OR_FROZEN_ARR_F)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(FROZEN_F)operator(\)) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(flags) operator(&) ident(TMPLOCK_ARR_F)operator(\)) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_modify * */) directive(private) directive(final) type(void) ident(modify)operator(()operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if) operator(()ident(isShared)operator(\)) operator({) ident(IRubyObject)type([]) ident(vals) operator(=) ident(reserve)operator(()ident(realLength)operator(\))operator(;) ident(isShared) operator(=) pre_constant(false)operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) ident(begin)operator(,) ident(vals)operator(,) integer(0)operator(,) ident(realLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(begin) operator(=) integer(0)operator(;) ident(values) operator(=) ident(vals)operator(;) operator(}) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** rb_ary_initialize * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(0)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(argc) operator(=) ident(args)operator(.)ident(length)operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(argc) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) ident(realLength) operator(=) integer(0)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(BLOCK_UNUSED)operator(,) stringoperator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(argc) operator(==) integer(1) operator(&&) operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(val)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(replace)operator(()ident(val)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) operator(}) type(long) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(len) operator(>=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) type(int) ident(ilen) operator(=) operator(()type(int)operator(\)) ident(len)operator(;) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(ilen) operator(>) ident(values)operator(.)ident(length)operator(\)) ident(values) operator(=) ident(reserve)operator(()ident(ilen)operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(argc) operator(==) integer(2)operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(BLOCK_BEATS_DEFAULT_VALUE)operator(,) stringoperator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(ilen)operator(;) ident(i)operator(++)operator(\)) operator({) ident(store)operator(()ident(i)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) ident(i)operator(\))operator(\))operator(\))operator(;) ident(realLength) operator(=) ident(i) operator(+) integer(1)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(try) operator({) pre_type(Arrays)operator(.)ident(fill)operator(()ident(values)operator(,) integer(0)operator(,) ident(ilen)operator(,) operator(()ident(argc) operator(==) integer(2)operator(\)) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength) operator(=) ident(ilen)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_initialize_copy * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility)operator(=)pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(orig)operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(replace)operator(()ident(orig)operator(\))operator(;) operator(}) comment(/** rb_ary_replace * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(replace)operator(()ident(IRubyObject) ident(orig)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) ident(RubyArray) ident(origArr) operator(=) ident(orig)operator(.)ident(convertToArray)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(orig)operator(\)) keyword(return) local_variable(this)operator(;) ident(origArr)operator(.)ident(isShared) operator(=) pre_constant(true)operator(;) ident(isShared) operator(=) pre_constant(true)operator(;) ident(values) operator(=) ident(origArr)operator(.)ident(values)operator(;) ident(realLength) operator(=) ident(origArr)operator(.)ident(realLength)operator(;) ident(begin) operator(=) ident(origArr)operator(.)ident(begin)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(join)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(;) operator(}) directive(public) type(boolean) ident(includes)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(item)operator(\)) operator({) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) directive(final) ident(IRubyObject) ident(value)operator(;) keyword(try) operator({) ident(value) operator(=) ident(values)operator([)ident(i)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(continue)operator(;) operator(}) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(value)operator(,) ident(item)operator(\))operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** rb_ary_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(int) ident(h) operator(=) ident(realLength)operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(h) operator(=) operator(()ident(h) operator(<)operator(<) integer(1)operator(\)) operator(|) operator(()ident(h) operator(<) integer(0) operator(?) integer(1) operator(:) integer(0)operator(\))operator(;) directive(final) ident(IRubyObject) ident(value)operator(;) keyword(try) operator({) ident(value) operator(=) ident(values)operator([)ident(i)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(continue)operator(;) operator(}) ident(h) operator(^=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(value)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(HASH)operator(,) stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(h)operator(\))operator(;) operator(}) comment(/** rb_ary_store * */) directive(public) directive(final) ident(IRubyObject) ident(store)operator(()type(long) ident(index)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(index) operator(<) integer(0)operator(\)) operator({) ident(index) operator(+=) ident(realLength)operator(;) keyword(if) operator(()ident(index) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) operator(()ident(index) operator(-) ident(realLength)operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(index) operator(>=) ident(realLength)operator(\)) operator({) keyword(if) operator(()ident(index) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) type(long) ident(newLength) operator(=) ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(;) keyword(if) operator(()ident(newLength) operator(<) ident(ARRAY_DEFAULT_SIZE)operator(\)) ident(newLength) operator(=) ident(ARRAY_DEFAULT_SIZE)operator(;) ident(newLength) operator(+=) ident(index)operator(;) keyword(if) operator(()ident(index) operator(>=) pre_type(Integer)operator(.)ident(MAX_VALUE) operator(||) ident(newLength) operator(>=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(realloc)operator(()operator(()type(int)operator(\)) ident(newLength)operator(\))operator(;) operator(}) ident(realLength) operator(=) operator(()type(int)operator(\)) ident(index) operator(+) integer(1)operator(;) operator(}) keyword(try) operator({) ident(values)operator([)operator(()type(int)operator(\)) ident(index)operator(]) operator(=) ident(value)operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** rb_ary_elt * */) directive(private) directive(final) ident(IRubyObject) ident(elt)operator(()type(long) ident(offset)operator(\)) operator({) keyword(if) operator(()ident(offset) operator(<) integer(0) operator(||) ident(offset) operator(>=) ident(realLength)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) operator(()type(int)operator(\))ident(offset)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_entry * */) directive(public) directive(final) ident(IRubyObject) ident(entry)operator(()type(long) ident(offset)operator(\)) operator({) keyword(return) operator(()ident(offset) operator(<) integer(0) operator(\)) operator(?) ident(elt)operator(()ident(offset) operator(+) ident(realLength)operator(\)) operator(:) ident(elt)operator(()ident(offset)operator(\))operator(;) operator(}) comment(/** rb_ary_entry * */) directive(public) directive(final) ident(IRubyObject) ident(entry)operator(()type(int) ident(offset)operator(\)) operator({) keyword(return) operator(()ident(offset) operator(<) integer(0) operator(\)) operator(?) ident(elt)operator(()ident(offset) operator(+) ident(realLength)operator(\)) operator(:) ident(elt)operator(()ident(offset)operator(\))operator(;) operator(}) directive(public) directive(final) ident(IRubyObject) ident(eltInternal)operator(()type(int) ident(offset)operator(\)) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) ident(offset)operator(])operator(;) operator(}) directive(public) directive(final) ident(IRubyObject) ident(eltInternalSet)operator(()type(int) ident(offset)operator(,) ident(IRubyObject) ident(item)operator(\)) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) ident(offset)operator(]) operator(=) ident(item)operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(fetch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(fetch)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(fetch)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_ary_fetch * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(fetch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) type(long) ident(index) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(index) operator(<) integer(0)operator(\)) ident(index) operator(+=) ident(realLength)operator(;) keyword(if) operator(()ident(index) operator(<) integer(0) operator(||) ident(index) operator(>=) ident(realLength)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(arg0)operator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(index) operator(+) stringoperator(\))operator(;) operator(}) keyword(try) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) operator(()type(int)operator(\)) ident(index)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_fetch * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(fetch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(BLOCK_BEATS_DEFAULT_VALUE)operator(,) stringoperator(\))operator(;) type(long) ident(index) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(index) operator(<) integer(0)operator(\)) ident(index) operator(+=) ident(realLength)operator(;) keyword(if) operator(()ident(index) operator(<) integer(0) operator(||) ident(index) operator(>=) ident(realLength)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(arg0)operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) keyword(try) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) operator(()type(int)operator(\)) ident(index)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_to_ary * */) directive(private) directive(static) ident(RubyArray) ident(aryToAry)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubyArray)operator(\)) keyword(return) operator(()ident(RubyArray)operator(\)) ident(obj)operator(;) keyword(if) operator(()ident(obj)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) keyword(return) ident(obj)operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(RubyArray) ident(arr) operator(=) keyword(new) ident(RubyArray)operator(()ident(obj)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) comment(// possibly should not in object space) ident(arr)operator(.)ident(alloc)operator(()integer(1)operator(\))operator(;) ident(arr)operator(.)ident(values)operator([)integer(0)operator(]) operator(=) ident(obj)operator(;) ident(arr)operator(.)ident(realLength) operator(=) integer(1)operator(;) keyword(return) ident(arr)operator(;) operator(}) comment(/** rb_ary_splice * */) directive(private) directive(final) type(void) ident(splice)operator(()type(long) ident(beg)operator(,) type(long) ident(len)operator(,) ident(IRubyObject) ident(rpl)operator(\)) operator({) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(len) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(+=) ident(realLength)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(-=) ident(realLength)operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(beg) operator(+) stringoperator(\))operator(;) operator(}) operator(}) directive(final) ident(RubyArray) ident(rplArr)operator(;) directive(final) type(int) ident(rlen)operator(;) keyword(if) operator(()ident(rpl) operator(==) pre_constant(null) operator(||) ident(rpl)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(rplArr) operator(=) pre_constant(null)operator(;) ident(rlen) operator(=) integer(0)operator(;) operator(}) keyword(else) operator({) ident(rplArr) operator(=) ident(aryToAry)operator(()ident(rpl)operator(\))operator(;) ident(rlen) operator(=) ident(rplArr)operator(.)ident(realLength)operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(>=) ident(realLength)operator(\)) operator({) ident(len) operator(=) ident(beg) operator(+) ident(rlen)operator(;) keyword(if) operator(()ident(len) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) type(int) ident(tryNewLength) operator(=) ident(values)operator(.)ident(length) operator(+) operator(()ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(\))operator(;) ident(realloc)operator(()ident(len) operator(>) ident(tryNewLength) operator(?) operator(()type(int)operator(\))ident(len) operator(:) ident(tryNewLength)operator(\))operator(;) operator(}) ident(realLength) operator(=) operator(()type(int)operator(\)) ident(len)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(realLength)operator(\)) ident(len) operator(=) ident(realLength) operator(-) ident(beg)operator(;) type(long) ident(alen) operator(=) ident(realLength) operator(+) ident(rlen) operator(-) ident(len)operator(;) keyword(if) operator(()ident(alen) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) type(int) ident(tryNewLength) operator(=) ident(values)operator(.)ident(length) operator(+) operator(()ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(\))operator(;) ident(realloc)operator(()ident(alen) operator(>) ident(tryNewLength) operator(?) operator(()type(int)operator(\))ident(alen) operator(:) ident(tryNewLength)operator(\))operator(;) operator(}) keyword(if) operator(()ident(len) operator(!=) ident(rlen)operator(\)) operator({) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) operator(()type(int)operator(\)) operator(()ident(beg) operator(+) ident(len)operator(\))operator(,) ident(values)operator(,) operator(()type(int)operator(\)) ident(beg) operator(+) ident(rlen)operator(,) ident(realLength) operator(-) operator(()type(int)operator(\)) operator(()ident(beg) operator(+) ident(len)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength) operator(=) operator(()type(int)operator(\)) ident(alen)operator(;) operator(}) operator(}) keyword(if) operator(()ident(rlen) operator(>) integer(0)operator(\)) operator({) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(rplArr)operator(.)ident(values)operator(,) ident(rplArr)operator(.)ident(begin)operator(,) ident(values)operator(,) operator(()type(int)operator(\)) ident(beg)operator(,) ident(rlen)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** rb_ary_splice * */) directive(private) directive(final) type(void) ident(spliceOne)operator(()type(long) ident(beg)operator(,) type(long) ident(len)operator(,) ident(IRubyObject) ident(rpl)operator(\)) operator({) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(len) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(+=) ident(realLength)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(-=) ident(realLength)operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(beg) operator(+) stringoperator(\))operator(;) operator(}) operator(}) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(>=) ident(realLength)operator(\)) operator({) ident(len) operator(=) ident(beg) operator(+) integer(1)operator(;) keyword(if) operator(()ident(len) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) type(int) ident(tryNewLength) operator(=) ident(values)operator(.)ident(length) operator(+) operator(()ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(\))operator(;) ident(realloc)operator(()ident(len) operator(>) ident(tryNewLength) operator(?) operator(()type(int)operator(\))ident(len) operator(:) ident(tryNewLength)operator(\))operator(;) operator(}) ident(realLength) operator(=) operator(()type(int)operator(\)) ident(len)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(realLength)operator(\)) ident(len) operator(=) ident(realLength) operator(-) ident(beg)operator(;) type(int) ident(alen) operator(=) ident(realLength) operator(+) integer(1) operator(-) operator(()type(int)operator(\))ident(len)operator(;) keyword(if) operator(()ident(alen) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) type(int) ident(tryNewLength) operator(=) ident(values)operator(.)ident(length) operator(+) operator(()ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(\))operator(;) ident(realloc)operator(()ident(alen) operator(>) ident(tryNewLength) operator(?) ident(alen) operator(:) ident(tryNewLength)operator(\))operator(;) operator(}) keyword(if) operator(()ident(len) operator(!=) integer(1)operator(\)) operator({) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) operator(()type(int)operator(\)) operator(()ident(beg) operator(+) ident(len)operator(\))operator(,) ident(values)operator(,) operator(()type(int)operator(\)) ident(beg) operator(+) integer(1)operator(,) ident(realLength) operator(-) operator(()type(int)operator(\)) operator(()ident(beg) operator(+) ident(len)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength) operator(=) ident(alen)operator(;) operator(}) operator(}) keyword(try) operator({) ident(values)operator([)operator(()type(int)operator(\))ident(beg)operator(]) operator(=) ident(rpl)operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(insert)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) operator(}) comment(/** rb_ary_insert * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(insert)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_insert * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(insert)operator(()ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) type(long) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) operator(-)integer(1)operator(\)) ident(pos) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) ident(pos)operator(++)operator(;) ident(spliceOne)operator(()ident(pos)operator(,) integer(0)operator(,) ident(arg2)operator(\))operator(;) comment(// rb_ary_new4) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_insert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(insert)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) keyword(return) local_variable(this)operator(;) type(long) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) operator(-)integer(1)operator(\)) ident(pos) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) ident(pos)operator(++)operator(;) ident(RubyArray) ident(inserted) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) ident(inserted)operator(.)ident(values) operator(=) ident(args)operator(;) ident(inserted)operator(.)ident(begin) operator(=) integer(1)operator(;) ident(inserted)operator(.)ident(realLength) operator(=) ident(args)operator(.)ident(length) operator(-) integer(1)operator(;) ident(splice)operator(()ident(pos)operator(,) integer(0)operator(,) ident(inserted)operator(\))operator(;) comment(// rb_ary_new4) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_dup * */) directive(public) directive(final) ident(RubyArray) ident(aryDup)operator(()operator(\)) operator({) ident(RubyArray) ident(dup) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(;) ident(dup)operator(.)ident(flags) operator(|=) ident(flags) operator(&) ident(TAINTED_F)operator(;) comment(// from DUP_SETUP) comment(// rb_copy_generic_ivar from DUP_SETUP here ...unlikely..) keyword(return) ident(dup)operator(;) operator(}) comment(/** rb_ary_transpose * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(transpose)operator(()operator(\)) operator({) ident(RubyArray) ident(tmp)operator(,) ident(result) operator(=) pre_constant(null)operator(;) type(int) ident(alen) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(alen) operator(==) integer(0)operator(\)) keyword(return) ident(aryDup)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(elen) operator(=) operator(-)integer(1)operator(;) type(int) ident(end) operator(=) ident(begin) operator(+) ident(alen)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(end)operator(;) ident(i)operator(++)operator(\)) operator({) ident(tmp) operator(=) ident(elt)operator(()ident(i)operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(elen) operator(<) integer(0)operator(\)) operator({) ident(elen) operator(=) ident(tmp)operator(.)ident(realLength)operator(;) ident(result) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(elen)operator(\))operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(elen)operator(;) ident(j)operator(++)operator(\)) operator({) ident(result)operator(.)ident(store)operator(()ident(j)operator(,) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(alen)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(elen) operator(!=) ident(tmp)operator(.)ident(realLength)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIndexError)operator(()string operator(+) ident(tmp)operator(.)ident(realLength) operator(+) string operator(+) ident(elen) operator(+) stringoperator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(elen)operator(;) ident(j)operator(++)operator(\)) operator({) operator(()operator(()ident(RubyArray)operator(\)) ident(result)operator(.)ident(elt)operator(()ident(j)operator(\))operator(\))operator(.)ident(store)operator(()ident(i) operator(-) ident(begin)operator(,) ident(tmp)operator(.)ident(elt)operator(()ident(j)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_values_at (internal\) * */) directive(private) directive(final) ident(IRubyObject) ident(values_at)operator(()type(long) ident(olen)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyArray) ident(result) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(entry)operator(()operator(()operator(()ident(RubyFixnum)operator(\))ident(args)operator([)ident(i)operator(])operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(;) keyword(continue)operator(;) operator(}) type(long) ident(beglen)type([])operator(;) keyword(if) operator(()operator(!)operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyRange)operator(\))operator(\)) operator({) operator(}) keyword(else) keyword(if) operator(()operator(()ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(args)operator([)ident(i)operator(])operator(\))operator(.)ident(begLen)operator(()ident(olen)operator(,) integer(0)operator(\))operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(continue)operator(;) operator(}) keyword(else) operator({) type(int) ident(beg) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(0)operator(])operator(;) type(int) ident(len) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(1)operator(])operator(;) type(int) ident(end) operator(=) ident(begin) operator(+) ident(len)operator(;) keyword(for) operator(()type(int) ident(j) operator(=) ident(begin)operator(;) ident(j) operator(<) ident(end)operator(;) ident(j)operator(++)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(entry)operator(()ident(j) operator(+) ident(beg)operator(\))operator(\))operator(;) operator(}) keyword(continue)operator(;) operator(}) ident(result)operator(.)ident(append)operator(()ident(entry)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_values_at * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(values_at)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(values_at)operator(()ident(realLength)operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** rb_ary_subseq * */) directive(public) ident(IRubyObject) ident(subseq)operator(()type(long) ident(beg)operator(,) type(long) ident(len)operator(\)) operator({) keyword(if) operator(()ident(beg) operator(>) ident(realLength) operator(||) ident(beg) operator(<) integer(0) operator(||) ident(len) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(realLength)operator(\)) operator({) ident(len) operator(=) ident(realLength) operator(-) ident(beg)operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) ident(len) operator(=) integer(0)operator(;) operator(}) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) keyword(return) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) integer(0)operator(\))operator(;) keyword(return) ident(makeShared)operator(()ident(begin) operator(+) operator(()type(int)operator(\)) ident(beg)operator(,) operator(()type(int)operator(\)) ident(len)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_subseq * */) directive(public) ident(IRubyObject) ident(subseqLight)operator(()type(long) ident(beg)operator(,) type(long) ident(len)operator(\)) operator({) keyword(if) operator(()ident(beg) operator(>) ident(realLength) operator(||) ident(beg) operator(<) integer(0) operator(||) ident(len) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(realLength)operator(\)) operator({) ident(len) operator(=) ident(realLength) operator(-) ident(beg)operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) ident(len) operator(=) integer(0)operator(;) operator(}) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) keyword(return) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) ident(makeShared)operator(()ident(begin) operator(+) operator(()type(int)operator(\)) ident(beg)operator(,) operator(()type(int)operator(\)) ident(len)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_ary_length * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(length)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(realLength)operator(\))operator(;) operator(}) comment(/** rb_ary_push - specialized rb_ary_store * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(append)operator(()ident(IRubyObject) ident(item)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) ident(values)operator(.)ident(length)operator(\)) operator({) keyword(if) operator(()ident(realLength) operator(==) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) type(long) ident(newLength) operator(=) ident(values)operator(.)ident(length) operator(+) operator(()ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(\))operator(;) keyword(if) operator(() ident(newLength) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE) operator(\)) operator({) ident(newLength) operator(=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(;) operator(})keyword(else) keyword(if) operator(() ident(newLength) operator(<) ident(ARRAY_DEFAULT_SIZE) operator(\)) operator({) ident(newLength) operator(=) ident(ARRAY_DEFAULT_SIZE)operator(;) operator(}) ident(realloc)operator(()operator(()type(int)operator(\)) ident(newLength)operator(\))operator(;) operator(}) keyword(try) operator({) ident(values)operator([)ident(realLength)operator(++)operator(]) operator(=) ident(item)operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_push_m * FIXME: Whis is this named "push_m"? */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(push_m)operator(()ident(IRubyObject)type([]) ident(items)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(items)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(append)operator(()ident(items)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_pop * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pop)operator(()operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(isShared)operator(\)) operator({) keyword(try) operator({) keyword(return) ident(values)operator([)ident(begin) operator(+) operator(--)ident(realLength)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) type(int) ident(index) operator(=) ident(begin) operator(+) operator(--)ident(realLength)operator(;) keyword(try) operator({) directive(final) ident(IRubyObject) ident(obj) operator(=) ident(values)operator([)ident(index)operator(])operator(;) ident(values)operator([)ident(index)operator(]) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** rb_ary_shift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(shift)operator(()operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(obj)operator(;) keyword(try) operator({) ident(obj) operator(=) ident(values)operator([)ident(begin)operator(])operator(;) ident(values)operator([)ident(begin)operator(]) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(isShared) operator(=) pre_constant(true)operator(;) ident(begin)operator(++)operator(;) ident(realLength)operator(--)operator(;) keyword(return) ident(obj)operator(;) operator(}) comment(/** rb_ary_unshift * */) directive(public) ident(RubyArray) ident(unshift)operator(()ident(IRubyObject) ident(item)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) ident(values)operator(.)ident(length)operator(\)) operator({) type(int) ident(newLength) operator(=) ident(values)operator(.)ident(length) operator(>)operator(>) integer(1)operator(;) keyword(if) operator(()ident(newLength) operator(<) ident(ARRAY_DEFAULT_SIZE)operator(\)) ident(newLength) operator(=) ident(ARRAY_DEFAULT_SIZE)operator(;) ident(newLength) operator(+=) ident(values)operator(.)ident(length)operator(;) ident(realloc)operator(()ident(newLength)operator(\))operator(;) operator(}) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) integer(0)operator(,) ident(values)operator(,) integer(1)operator(,) ident(realLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength)operator(++)operator(;) ident(values)operator([)integer(0)operator(]) operator(=) ident(item)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_unshift_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(unshift_m)operator(()ident(IRubyObject)type([]) ident(items)operator(\)) operator({) type(long) ident(len) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(items)operator(.)ident(length) operator(==) integer(0)operator(\)) keyword(return) local_variable(this)operator(;) ident(store)operator(()ident(len) operator(+) ident(items)operator(.)ident(length) operator(-) integer(1)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(try) operator({) comment(// it's safe to use zeroes here since modified by store(\)) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) integer(0)operator(,) ident(values)operator(,) ident(items)operator(.)ident(length)operator(,) operator(()type(int)operator(\)) ident(len)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(items)operator(,) integer(0)operator(,) ident(values)operator(,) integer(0)operator(,) ident(items)operator(.)ident(length)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_includes * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(include_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(item)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(includes)operator(()ident(context)operator(,) ident(item)operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_frozen_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyBoolean) ident(frozen_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isFrozen)operator(()operator(\)) operator(||) operator(()ident(flags) operator(&) ident(TMPLOCK_ARR_F)operator(\)) operator(!=) integer(0)operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(aref)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(aref)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_ary_aref */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyFixnum)operator(\)) keyword(return) ident(entry)operator(()operator(()operator(()ident(RubyFixnum)operator(\))ident(arg0)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubySymbol)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) type(long)type([]) ident(beglen)operator(;) keyword(if) operator(()operator(!)operator(()ident(arg0) keyword(instanceof) ident(RubyRange)operator(\))operator(\)) operator({) operator(}) keyword(else) keyword(if) operator(()operator(()ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(arg0)operator(\))operator(.)ident(begLen)operator(()ident(realLength)operator(,) integer(0)operator(\))operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(subseq)operator(()ident(beglen)operator([)integer(0)operator(])operator(,) ident(beglen)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(return) ident(entry)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_aref */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubySymbol)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) type(long) ident(beg) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) ident(beg) operator(+=) ident(realLength)operator(;) keyword(return) ident(subseq)operator(()ident(beg)operator(,) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg1)operator(\))operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(aset)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(2)operator(:) keyword(return) ident(aset)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) integer(3)operator(:) keyword(return) ident(aset)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_aset * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(aset)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(store)operator(()operator(()operator(()ident(RubyFixnum)operator(\))ident(arg0)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(,) ident(arg1)operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRange)operator(\)) operator({) type(long)type([]) ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(arg0)operator(\))operator(.)ident(begLen)operator(()ident(realLength)operator(,) integer(1)operator(\))operator(;) ident(splice)operator(()ident(beglen)operator([)integer(0)operator(])operator(,) ident(beglen)operator([)integer(1)operator(])operator(,) ident(arg1)operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubySymbol)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) ident(store)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(,) ident(arg1)operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) comment(/** rb_ary_aset * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(aset)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubySymbol)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(arg1) keyword(instanceof) ident(RubySymbol)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) ident(splice)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(,) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg1)operator(\))operator(,) ident(arg2)operator(\))operator(;) keyword(return) ident(arg2)operator(;) operator(}) comment(/** rb_ary_at * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(at)operator(()ident(IRubyObject) ident(pos)operator(\)) operator({) keyword(return) ident(entry)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(pos)operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_concat * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(concat)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(obj)operator(.)ident(convertToArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(ary)operator(.)ident(realLength) operator(>) integer(0)operator(\)) ident(splice)operator(()ident(realLength)operator(,) integer(0)operator(,) ident(ary)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** inspect_ary * */) directive(private) ident(IRubyObject) ident(inspectAry)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(ByteList) ident(buffer) operator(=) keyword(new) ident(ByteList)operator(()operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) type(boolean) ident(tainted) operator(=) ident(isTaint)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(i) operator(>) integer(0)operator(\)) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(inspect)operator(()ident(context)operator(,) ident(values)operator([)ident(begin) operator(+) ident(i)operator(])operator(\))operator(;) keyword(if) operator(()ident(str)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(tainted) operator(=) pre_constant(true)operator(;) ident(buffer)operator(.)ident(append)operator(()ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buffer)operator(\))operator(;) keyword(if) operator(()ident(tainted)operator(\)) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_ary_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(inspectAry)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(first)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(first)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(first)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_ary_first * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(first)operator(()operator(\)) operator({) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(values)operator([)ident(begin)operator(])operator(;) operator(}) comment(/** rb_ary_first * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(first)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) type(long) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(n) operator(>) ident(realLength)operator(\)) operator({) ident(n) operator(=) ident(realLength)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(n) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(makeShared)operator(()ident(begin)operator(,) operator(()type(int)operator(\)) ident(n)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(last)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(last)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(last)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_ary_last * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(last)operator(()operator(\)) operator({) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(values)operator([)ident(begin) operator(+) ident(realLength) operator(-) integer(1)operator(])operator(;) operator(}) comment(/** rb_ary_last * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(last)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) type(long) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(n) operator(>) ident(realLength)operator(\)) operator({) ident(n) operator(=) ident(realLength)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(n) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(makeShared)operator(()ident(begin) operator(+) ident(realLength) operator(-) operator(()type(int)operator(\)) ident(n)operator(,) operator(()type(int)operator(\)) ident(n)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getArray)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_each * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(begin) operator(+) ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_each_index * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_index)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_reverse_each * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(reverse_each)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(len) operator(=) ident(realLength)operator(;) keyword(while)operator(()ident(len)operator(--) operator(>) integer(0)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(begin) operator(+) ident(len)operator(])operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(<) ident(len)operator(\)) ident(len) operator(=) ident(realLength)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(private) ident(IRubyObject) ident(inspectJoin)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyArray) ident(tmp)operator(,) ident(IRubyObject) ident(sep)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) comment(// If already inspecting, there is no need to register/unregister again.) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) operator({) keyword(return) ident(tmp)operator(.)ident(join)operator(()ident(context)operator(,) ident(sep)operator(\))operator(;) operator(}) keyword(try) operator({) ident(runtime)operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(tmp)operator(.)ident(join)operator(()ident(context)operator(,) ident(sep)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) comment(/** rb_ary_join * */) directive(public) ident(RubyString) ident(join)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(sep)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) integer(0)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) type(boolean) ident(taint) operator(=) ident(isTaint)operator(()operator(\)) operator(||) ident(sep)operator(.)ident(isTaint)operator(()operator(\))operator(;) type(long) ident(len) operator(=) integer(1)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(value)operator(;) keyword(try) operator({) ident(value) operator(=) ident(values)operator([)ident(i)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(tmp) operator(=) ident(value)operator(.)ident(checkStringType)operator(()operator(\))operator(;) ident(len) operator(+=) ident(tmp)operator(.)ident(isNil)operator(()operator(\)) operator(?) integer(10) operator(:) operator(()operator(()ident(RubyString)operator(\)) ident(tmp)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(RubyString) ident(strSep) operator(=) pre_constant(null)operator(;) keyword(if) operator(()operator(!)ident(sep)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(sep) operator(=) ident(strSep) operator(=) ident(sep)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(len) operator(+=) ident(strSep)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(*) operator(()ident(realLength) operator(-) integer(1)operator(\))operator(;) operator(}) ident(ByteList) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()operator(()type(int)operator(\))ident(len)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(tmp)operator(;) keyword(try) operator({) ident(tmp) operator(=) ident(values)operator([)ident(i)operator(])operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(tmp) keyword(instanceof) ident(RubyString)operator(\)) operator({) comment(// do nothing) operator(}) keyword(else) keyword(if) operator(()ident(tmp) keyword(instanceof) ident(RubyArray)operator(\)) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()ident(tmp)operator(\))operator(\)) operator({) ident(tmp) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(tmp) operator(=) ident(inspectJoin)operator(()ident(context)operator(,) operator(()ident(RubyArray)operator(\))ident(tmp)operator(,) ident(sep)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(tmp) operator(=) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(tmp)operator(\))operator(;) operator(}) keyword(if) operator(()ident(i) operator(>) ident(begin) operator(&&) operator(!)ident(sep)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(buf)operator(.)ident(append)operator(()ident(strSep)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(buf)operator(.)ident(append)operator(()ident(tmp)operator(.)ident(asString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(taint) operator(=) pre_constant(true)operator(;) operator(}) ident(RubyString) ident(result) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(buf)operator(\))operator(;) keyword(if) operator(()ident(taint)operator(\)) ident(result)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_ary_join_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyString) ident(join_m)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(int) ident(argc) operator(=) ident(args)operator(.)ident(length)operator(;) ident(IRubyObject) ident(sep) operator(=) operator(()ident(argc) operator(==) integer(1)operator(\)) operator(?) ident(args)operator([)integer(0)operator(]) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(return) ident(join)operator(()ident(context)operator(,) ident(sep)operator(\))operator(;) operator(}) comment(/** rb_ary_to_a * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) keyword(if)operator(()ident(getMetaClass)operator(()operator(\)) operator(!=) ident(getRuntime)operator(()operator(\))operator(.)ident(getArray)operator(()operator(\))operator(\)) operator({) ident(RubyArray) ident(dup) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\))operator(;) ident(isShared) operator(=) pre_constant(true)operator(;) ident(dup)operator(.)ident(isShared) operator(=) pre_constant(true)operator(;) ident(dup)operator(.)ident(values) operator(=) ident(values)operator(;) ident(dup)operator(.)ident(realLength) operator(=) ident(realLength)operator(;) ident(dup)operator(.)ident(begin) operator(=) ident(begin)operator(;) keyword(return) ident(dup)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_ary)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyArray) ident(convertToArray)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(checkArrayType)operator(()operator(\))operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_equal * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(obj)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)ident(obj)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(obj)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) ident(RubyArray) ident(ary) operator(=) operator(()ident(RubyArray)operator(\)) ident(obj)operator(;) keyword(if) operator(()ident(realLength) operator(!=) ident(ary)operator(.)ident(realLength)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(long) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(equalInternal)operator(()ident(context)operator(,) ident(elt)operator(()ident(i)operator(\))operator(,) ident(ary)operator(.)ident(elt)operator(()ident(i)operator(\))operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_eql * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(obj)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyArray) ident(ary) operator(=) operator(()ident(RubyArray)operator(\)) ident(obj)operator(;) keyword(if) operator(()ident(realLength) operator(!=) ident(ary)operator(.)ident(realLength)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(eqlInternal)operator(()ident(context)operator(,) ident(elt)operator(()ident(i)operator(\))operator(,) ident(ary)operator(.)ident(elt)operator(()ident(i)operator(\))operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_compact_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(compact_bang)operator(()operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) type(int) ident(p) operator(=) integer(0)operator(;) type(int) ident(t) operator(=) integer(0)operator(;) type(int) ident(end) operator(=) ident(p) operator(+) ident(realLength)operator(;) keyword(while) operator(()ident(t) operator(<) ident(end)operator(\)) operator({) keyword(if) operator(()ident(values)operator([)ident(t)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(t)operator(++)operator(;) operator(}) keyword(else) operator({) ident(values)operator([)ident(p)operator(++)operator(]) operator(=) ident(values)operator([)ident(t)operator(++)operator(])operator(;) operator(}) operator(}) keyword(if) operator(()ident(realLength) operator(==) ident(p)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(realloc)operator(()ident(p)operator(\))operator(;) ident(realLength) operator(=) ident(p)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_compact * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(compact)operator(()operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(aryDup)operator(()operator(\))operator(;) ident(ary)operator(.)ident(compact_bang)operator(()operator(\))operator(;) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_empty_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(empty_p)operator(()operator(\)) operator({) keyword(return) ident(realLength) operator(==) integer(0) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_clear * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rb_clear)operator(()operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if)operator(()ident(isShared)operator(\)) operator({) ident(alloc)operator(()ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) ident(isShared) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(values)operator(.)ident(length) operator(>) ident(ARRAY_DEFAULT_SIZE) operator(<)operator(<) integer(1)operator(\))operator({) ident(alloc)operator(()ident(ARRAY_DEFAULT_SIZE) operator(<)operator(<) integer(1)operator(\))operator(;) operator(}) keyword(else) operator({) directive(final) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(try) operator({) pre_type(Arrays)operator(.)ident(fill)operator(()ident(values)operator(,) ident(begin)operator(,) ident(begin) operator(+) ident(realLength)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) ident(begin) operator(=) integer(0)operator(;) ident(realLength) operator(=) integer(0)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_fill * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(fill)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject) ident(item) operator(=) pre_constant(null)operator(;) ident(IRubyObject) ident(begObj) operator(=) pre_constant(null)operator(;) ident(IRubyObject) ident(lenObj) operator(=) pre_constant(null)operator(;) type(int) ident(argc) operator(=) ident(args)operator(.)ident(length)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(0)operator(,) integer(2)operator(\))operator(;) ident(item) operator(=) pre_constant(null)operator(;) ident(begObj) operator(=) ident(argc) operator(>) integer(0) operator(?) ident(args)operator([)integer(0)operator(]) operator(:) pre_constant(null)operator(;) ident(lenObj) operator(=) ident(argc) operator(>) integer(1) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) pre_constant(null)operator(;) ident(argc)operator(++)operator(;) operator(}) keyword(else) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(1)operator(,) integer(3)operator(\))operator(;) ident(item) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(begObj) operator(=) ident(argc) operator(>) integer(1) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) pre_constant(null)operator(;) ident(lenObj) operator(=) ident(argc) operator(>) integer(2) operator(?) ident(args)operator([)integer(2)operator(]) operator(:) pre_constant(null)operator(;) operator(}) type(int) ident(beg) operator(=) integer(0)operator(,) ident(end) operator(=) integer(0)operator(,) ident(len) operator(=) integer(0)operator(;) keyword(switch) operator(()ident(argc)operator(\)) operator({) keyword(case) integer(1)operator(:) ident(beg) operator(=) integer(0)operator(;) ident(len) operator(=) ident(realLength)operator(;) keyword(break)operator(;) keyword(case) integer(2)operator(:) keyword(if) operator(()ident(begObj) keyword(instanceof) ident(RubyRange)operator(\)) operator({) type(long)type([]) ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(begObj)operator(\))operator(.)ident(begLen)operator(()ident(realLength)operator(,) integer(1)operator(\))operator(;) ident(beg) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(0)operator(])operator(;) ident(len) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(1)operator(])operator(;) keyword(break)operator(;) operator(}) comment(/* fall through */) keyword(case) integer(3)operator(:) ident(beg) operator(=) ident(begObj)operator(.)ident(isNil)operator(()operator(\)) operator(?) integer(0) operator(:) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(begObj)operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(=) ident(realLength) operator(+) ident(beg)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) ident(beg) operator(=) integer(0)operator(;) operator(}) ident(len) operator(=) operator(()ident(lenObj) operator(==) pre_constant(null) operator(||) ident(lenObj)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator(?) ident(realLength) operator(-) ident(beg) operator(:) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(lenObj)operator(\))operator(;) comment(// TODO: In MRI 1.9, an explicit check for negative length is) comment(// added here. IndexError is raised when length is negative.) comment(// See [ruby-core:12953] for more details.) comment(//) comment(// New note: This is actually under re-evaluation,) comment(// see [ruby-core:17483].) keyword(break)operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) comment(// See [ruby-core:17483]) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(len) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE) operator(-) ident(beg)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(end) operator(=) ident(beg) operator(+) ident(len)operator(;) keyword(if) operator(()ident(end) operator(>) ident(realLength)operator(\)) operator({) keyword(if) operator(()ident(end) operator(>=) ident(values)operator(.)ident(length)operator(\)) ident(realloc)operator(()ident(end)operator(\))operator(;) ident(realLength) operator(=) ident(end)operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(beg)operator(;) ident(i) operator(<) ident(end)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(\))operator(;) keyword(if) operator(()ident(i) operator(>=) ident(realLength)operator(\)) keyword(break)operator(;) keyword(try) operator({) ident(values)operator([)ident(i)operator(]) operator(=) ident(v)operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(len) operator(>) integer(0)operator(\)) operator({) keyword(try) operator({) pre_type(Arrays)operator(.)ident(fill)operator(()ident(values)operator(,) ident(beg)operator(,) ident(beg) operator(+) ident(len)operator(,) ident(item)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_index * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(,) ident(obj)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(i) operator(-) ident(begin)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_rindex * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(rindex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(i) operator(=) ident(realLength)operator(;) keyword(while) operator(()ident(i)operator(--) operator(>) integer(0)operator(\)) operator({) keyword(if) operator(()ident(i) operator(>) ident(realLength)operator(\)) operator({) ident(i) operator(=) ident(realLength)operator(;) keyword(continue)operator(;) operator(}) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(values)operator([)ident(begin) operator(+) ident(i)operator(])operator(,) ident(obj)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_indexes * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(indexes)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(RubyArray) ident(ary) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) ident(IRubyObject)type([]) ident(arefArgs) operator(=) keyword(new) ident(IRubyObject)operator([)integer(1)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(arefArgs)operator([)integer(0)operator(]) operator(=) ident(args)operator([)ident(i)operator(])operator(;) ident(ary)operator(.)ident(append)operator(()ident(aref)operator(()ident(arefArgs)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_reverse_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(reverse_bang)operator(()operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) directive(final) type(int) ident(realLength) operator(=) local_variable(this)operator(.)ident(realLength)operator(;) directive(final) ident(IRubyObject)type([]) ident(values) operator(=) local_variable(this)operator(.)ident(values)operator(;) keyword(try) operator({) keyword(if) operator(()ident(realLength) operator(>) integer(1)operator(\)) operator({) type(int) ident(p1) operator(=) integer(0)operator(;) type(int) ident(p2) operator(=) ident(p1) operator(+) ident(realLength) operator(-) integer(1)operator(;) keyword(while) operator(()ident(p1) operator(<) ident(p2)operator(\)) operator({) directive(final) ident(IRubyObject) ident(tmp) operator(=) ident(values)operator([)ident(p1)operator(])operator(;) ident(values)operator([)ident(p1)operator(++)operator(]) operator(=) ident(values)operator([)ident(p2)operator(])operator(;) ident(values)operator([)ident(p2)operator(--)operator(]) operator(=) ident(tmp)operator(;) operator(}) operator(}) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_reverse_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(reverse)operator(()operator(\)) operator({) keyword(return) ident(aryDup)operator(()operator(\))operator(.)ident(reverse_bang)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_collect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(collect)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(;) ident(RubyArray) ident(collect) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(realLength)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(collect)operator(.)ident(append)operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) ident(collect)operator(;) operator(}) comment(/** rb_ary_collect_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(collect_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,) ident(len) operator(=) ident(realLength)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(store)operator(()ident(i)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(begin) operator(+) ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_select * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(result) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(realLength)operator(\))operator(;) keyword(if) operator(()ident(isShared)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) ident(result)operator(.)ident(append)operator(()ident(elt)operator(()ident(i) operator(-) ident(begin)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) ident(result)operator(.)ident(append)operator(()ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_ary_delete * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(delete)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(item)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(i2) operator(=) integer(0)operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i1) operator(=) integer(0)operator(;) ident(i1) operator(<) ident(realLength)operator(;) ident(i1)operator(++)operator(\)) operator({) ident(IRubyObject) ident(e) operator(=) ident(values)operator([)ident(begin) operator(+) ident(i1)operator(])operator(;) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(e)operator(,) ident(item)operator(\))operator(\)) keyword(continue)operator(;) keyword(if) operator(()ident(i1) operator(!=) ident(i2)operator(\)) ident(store)operator(()ident(i2)operator(,) ident(e)operator(\))operator(;) ident(i2)operator(++)operator(;) operator(}) keyword(if) operator(()ident(realLength) operator(==) ident(i2)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(item)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) directive(final) type(int) ident(realLength) operator(=) local_variable(this)operator(.)ident(realLength)operator(;) directive(final) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) directive(final) ident(IRubyObject)type([]) ident(values) operator(=) local_variable(this)operator(.)ident(values)operator(;) keyword(if) operator(()ident(realLength) operator(>) ident(i2)operator(\)) operator({) keyword(try) operator({) pre_type(Arrays)operator(.)ident(fill)operator(()ident(values)operator(,) ident(begin) operator(+) ident(i2)operator(,) ident(begin) operator(+) ident(realLength)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(realLength) operator(=) ident(i2)operator(;) keyword(if) operator(()ident(i2) operator(<)operator(<) integer(1) operator(<) ident(values)operator(.)ident(length) operator(&&) ident(values)operator(.)ident(length) operator(>) ident(ARRAY_DEFAULT_SIZE)operator(\)) ident(realloc)operator(()ident(i2) operator(<)operator(<) integer(1)operator(\))operator(;) operator(}) keyword(return) ident(item)operator(;) operator(}) comment(/** rb_ary_delete_at * */) directive(private) directive(final) ident(IRubyObject) ident(delete_at)operator(()type(int) ident(pos)operator(\)) operator({) type(int) ident(len) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(len)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) ident(pos) operator(+=) ident(len)operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(modify)operator(()operator(\))operator(;) ident(IRubyObject) ident(obj) operator(=) ident(values)operator([)ident(pos)operator(])operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) ident(pos) operator(+) integer(1)operator(,) ident(values)operator(,) ident(pos)operator(,) ident(len) operator(-) operator(()ident(pos) operator(+) integer(1)operator(\))operator(\))operator(;) ident(values)operator([)ident(realLength)operator(-)integer(1)operator(]) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength)operator(--)operator(;) keyword(return) ident(obj)operator(;) operator(}) comment(/** rb_ary_delete_at_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(delete_at)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(delete_at)operator(()operator(()type(int)operator(\)) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(obj)operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_reject_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(reject)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(aryDup)operator(()operator(\))operator(;) ident(ary)operator(.)ident(reject_bang)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_reject_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(reject_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(i2) operator(=) integer(0)operator(;) ident(modify)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i1) operator(=) integer(0)operator(;) ident(i1) operator(<) ident(realLength)operator(;) ident(i1)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(values)operator([)ident(i1)operator(])operator(;) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(v)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(continue)operator(;) keyword(if) operator(()ident(i1) operator(!=) ident(i2)operator(\)) ident(store)operator(()ident(i2)operator(,) ident(v)operator(\))operator(;) ident(i2)operator(++)operator(;) operator(}) keyword(if) operator(()ident(realLength) operator(==) ident(i2)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(i2) operator(<) ident(realLength)operator(\)) operator({) keyword(try) operator({) pre_type(Arrays)operator(.)ident(fill)operator(()ident(values)operator(,) ident(i2)operator(,) ident(realLength)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(realLength) operator(=) ident(i2)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_delete_if * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(delete_if)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(reject_bang)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_zip * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(zip)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(args)operator([)ident(i)operator(]) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToArray)operator(()operator(\))operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyArray) ident(tmp) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(args)operator(.)ident(length) operator(+) integer(1)operator(\))operator(;) ident(tmp)operator(.)ident(append)operator(()ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(args)operator(.)ident(length)operator(;) ident(j)operator(++)operator(\)) operator({) ident(tmp)operator(.)ident(append)operator(()operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)ident(j)operator(])operator(\))operator(.)ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(tmp)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(int) ident(len) operator(=) ident(realLength)operator(;) ident(RubyArray) ident(result) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(len)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyArray) ident(tmp) operator(=) keyword(new) ident(RubyArray)operator(()ident(runtime)operator(,) ident(args)operator(.)ident(length) operator(+) integer(1)operator(\))operator(;) ident(tmp)operator(.)ident(append)operator(()ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(args)operator(.)ident(length)operator(;) ident(j)operator(++)operator(\)) operator({) ident(tmp)operator(.)ident(append)operator(()operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)ident(j)operator(])operator(\))operator(.)ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) ident(result)operator(.)ident(append)operator(()ident(tmp)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_ary_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(RubyArray) ident(ary2) operator(=) ident(obj)operator(.)ident(convertToArray)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(realLength)operator(;) keyword(if) operator(()ident(len) operator(>) ident(ary2)operator(.)ident(realLength)operator(\)) ident(len) operator(=) ident(ary2)operator(.)ident(realLength)operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(elt)operator(()ident(i)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(ary2)operator(.)ident(elt)operator(()ident(i)operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(v) keyword(instanceof) ident(RubyFixnum)operator(\)) operator(||) operator(()operator(()ident(RubyFixnum)operator(\)) ident(v)operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(!=) integer(0)operator(\)) keyword(return) ident(v)operator(;) operator(}) ident(len) operator(=) ident(realLength) operator(-) ident(ary2)operator(.)ident(realLength)operator(;) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(len) operator(>) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(slice_bang)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(slice_bang)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_ary_slice_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRange)operator(\)) operator({) type(long)type([]) ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(arg0)operator(\))operator(.)ident(begLen)operator(()ident(realLength)operator(,) integer(1)operator(\))operator(;) type(long) ident(pos) operator(=) ident(beglen)operator([)integer(0)operator(])operator(;) type(long) ident(len) operator(=) ident(beglen)operator([)integer(1)operator(])operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) ident(pos) operator(=) ident(realLength) operator(+) ident(pos)operator(;) ident(arg0) operator(=) ident(subseq)operator(()ident(pos)operator(,) ident(len)operator(\))operator(;) ident(splice)operator(()ident(pos)operator(,) ident(len)operator(,) pre_constant(null)operator(\))operator(;) keyword(return) ident(arg0)operator(;) operator(}) keyword(return) ident(delete_at)operator(()operator(()type(int)operator(\)) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(\))operator(;) operator(}) comment(/** rb_ary_slice_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) type(long) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) type(long) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) ident(pos) operator(=) ident(realLength) operator(+) ident(pos)operator(;) ident(arg1) operator(=) ident(subseq)operator(()ident(pos)operator(,) ident(len)operator(\))operator(;) ident(splice)operator(()ident(pos)operator(,) ident(len)operator(,) pre_constant(null)operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) comment(/** rb_ary_assoc * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(assoc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(values)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(v) keyword(instanceof) ident(RubyArray)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) operator(()ident(RubyArray)operator(\))ident(v)operator(;) keyword(if) operator(()ident(arr)operator(.)ident(realLength) operator(>) integer(0) operator(&&) ident(equalInternal)operator(()ident(context)operator(,) ident(arr)operator(.)ident(values)operator([)ident(arr)operator(.)ident(begin)operator(])operator(,) ident(key)operator(\))operator(\)) keyword(return) ident(arr)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_ary_rassoc * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(rassoc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(values)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(v) keyword(instanceof) ident(RubyArray)operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) operator(()ident(RubyArray)operator(\))ident(v)operator(;) keyword(if) operator(()ident(arr)operator(.)ident(realLength) operator(>) integer(1) operator(&&) ident(equalInternal)operator(()ident(context)operator(,) ident(arr)operator(.)ident(values)operator([)ident(arr)operator(.)ident(begin) operator(+) integer(1)operator(])operator(,) ident(value)operator(\))operator(\)) keyword(return) ident(arr)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** flatten * */) directive(private) directive(final) type(int) ident(flatten)operator(()ident(ThreadContext) ident(context)operator(,) type(int) ident(index)operator(,) ident(RubyArray) ident(ary2)operator(,) ident(RubyArray) ident(memo)operator(\)) operator({) type(int) ident(i) operator(=) ident(index)operator(;) type(int) ident(n)operator(;) type(int) ident(lim) operator(=) ident(index) operator(+) ident(ary2)operator(.)ident(realLength)operator(;) ident(IRubyObject) ident(id) operator(=) ident(ary2)operator(.)ident(id)operator(()operator(\))operator(;) keyword(if) operator(()ident(memo)operator(.)ident(includes)operator(()ident(context)operator(,) ident(id)operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) ident(memo)operator(.)ident(append)operator(()ident(id)operator(\))operator(;) ident(splice)operator(()ident(index)operator(,) integer(1)operator(,) ident(ary2)operator(\))operator(;) keyword(while) operator(()ident(i) operator(<) ident(lim)operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(elt)operator(()ident(i)operator(\))operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(n) operator(=) ident(flatten)operator(()ident(context)operator(,) ident(i)operator(,) operator(()ident(RubyArray)operator(\)) ident(tmp)operator(,) ident(memo)operator(\))operator(;) ident(i) operator(+=) ident(n)operator(;) ident(lim) operator(+=) ident(n)operator(;) operator(}) ident(i)operator(++)operator(;) operator(}) ident(memo)operator(.)ident(pop)operator(()operator(\))operator(;) keyword(return) ident(lim) operator(-) ident(index) operator(-) integer(1)operator(;) comment(/* returns number of increased items */) operator(}) comment(/** rb_ary_flatten_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(flatten_bang)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(int) ident(i) operator(=) integer(0)operator(;) ident(RubyArray) ident(memo) operator(=) pre_constant(null)operator(;) keyword(while) operator(()ident(i) operator(<) ident(realLength)operator(\)) operator({) ident(IRubyObject) ident(ary2) operator(=) ident(values)operator([)ident(begin) operator(+) ident(i)operator(])operator(;) ident(IRubyObject) ident(tmp) operator(=) ident(ary2)operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(memo) operator(==) pre_constant(null)operator(\)) operator({) ident(memo) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) ident(memo)operator(.)ident(values) operator(=) ident(reserve)operator(()ident(ARRAY_DEFAULT_SIZE)operator(\))operator(;) operator(}) ident(i) operator(+=) ident(flatten)operator(()ident(context)operator(,) ident(i)operator(,) operator(()ident(RubyArray)operator(\)) ident(tmp)operator(,) ident(memo)operator(\))operator(;) operator(}) ident(i)operator(++)operator(;) operator(}) keyword(if) operator(()ident(memo) operator(==) pre_constant(null)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_flatten * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(flatten)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(aryDup)operator(()operator(\))operator(;) ident(ary)operator(.)ident(flatten_bang)operator(()ident(context)operator(\))operator(;) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_nitems * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nitems)operator(()operator(\)) operator({) type(int) ident(n) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(values)operator([)ident(i)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(n)operator(++)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(n)operator(\))operator(;) operator(}) comment(/** rb_ary_plus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(RubyArray) ident(y) operator(=) ident(obj)operator(.)ident(convertToArray)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(realLength) operator(+) ident(y)operator(.)ident(realLength)operator(;) ident(RubyArray) ident(z) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(len)operator(\))operator(;) keyword(try) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) ident(begin)operator(,) ident(z)operator(.)ident(values)operator(,) integer(0)operator(,) ident(realLength)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(y)operator(.)ident(values)operator(,) ident(y)operator(.)ident(begin)operator(,) ident(z)operator(.)ident(values)operator(,) ident(realLength)operator(,) ident(y)operator(.)ident(realLength)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(z)operator(.)ident(realLength) operator(=) ident(len)operator(;) keyword(return) ident(z)operator(;) operator(}) comment(/** rb_ary_times * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_times)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(times)operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(times)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(join)operator(()ident(context)operator(,) ident(tmp)operator(\))operator(;) type(long) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(times)operator(\))operator(;) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) keyword(return) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) integer(0)operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(if) operator(()pre_type(Long)operator(.)ident(MAX_VALUE) operator(/) ident(len) operator(<) ident(realLength)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(len) operator(*=) ident(realLength)operator(;) ident(RubyArray) ident(ary2) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(len)operator(\))operator(;) ident(ary2)operator(.)ident(realLength) operator(=) operator(()type(int)operator(\)) ident(len)operator(;) keyword(try) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i) operator(+=) ident(realLength)operator(\)) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) ident(begin)operator(,) ident(ary2)operator(.)ident(values)operator(,) ident(i)operator(,) ident(realLength)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(ArrayIndexOutOfBoundsException) ident(e)operator(\)) operator({) ident(concurrentModification)operator(()operator(\))operator(;) operator(}) ident(ary2)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(ary2)operator(;) operator(}) comment(/** ary_make_hash * */) directive(private) directive(final) ident(RubyHash) ident(makeHash)operator(()ident(RubyArray) ident(ary2)operator(\)) operator({) ident(RubyHash) ident(hash) operator(=) keyword(new) ident(RubyHash)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(hash)operator(.)ident(fastASet)operator(()ident(values)operator([)ident(i)operator(])operator(,) ident(NEVER)operator(\))operator(;) operator(}) keyword(if) operator(()ident(ary2) operator(!=) pre_constant(null)operator(\)) operator({) ident(begin) operator(=) ident(ary2)operator(.)ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(ary2)operator(.)ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(hash)operator(.)ident(fastASet)operator(()ident(ary2)operator(.)ident(values)operator([)ident(i)operator(])operator(,) ident(NEVER)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(hash)operator(;) operator(}) comment(/** rb_ary_uniq_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(uniq_bang)operator(()operator(\)) operator({) ident(RubyHash) ident(hash) operator(=) ident(makeHash)operator(()pre_constant(null)operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(==) ident(hash)operator(.)ident(size)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(j) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(elt)operator(()ident(i)operator(\))operator(;) keyword(if) operator(()ident(hash)operator(.)ident(fastDelete)operator(()ident(v)operator(\))operator(\)) ident(store)operator(()ident(j)operator(++)operator(,) ident(v)operator(\))operator(;) operator(}) ident(realLength) operator(=) ident(j)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_ary_uniq * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(uniq)operator(()operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(aryDup)operator(()operator(\))operator(;) ident(ary)operator(.)ident(uniq_bang)operator(()operator(\))operator(;) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_diff * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_diff)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyHash) ident(hash) operator(=) ident(other)operator(.)ident(convertToArray)operator(()operator(\))operator(.)ident(makeHash)operator(()pre_constant(null)operator(\))operator(;) ident(RubyArray) ident(ary3) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(hash)operator(.)ident(fastARef)operator(()ident(values)operator([)ident(i)operator(])operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(continue)operator(;) ident(ary3)operator(.)ident(append)operator(()ident(elt)operator(()ident(i) operator(-) ident(begin)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(ary3)operator(;) operator(}) comment(/** rb_ary_and * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_and)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyArray) ident(ary2) operator(=) ident(other)operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(RubyHash) ident(hash) operator(=) ident(ary2)operator(.)ident(makeHash)operator(()pre_constant(null)operator(\))operator(;) ident(RubyArray) ident(ary3) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(realLength) operator(<) ident(ary2)operator(.)ident(realLength) operator(?) ident(realLength) operator(:) ident(ary2)operator(.)ident(realLength)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(elt)operator(()ident(i)operator(\))operator(;) keyword(if) operator(()ident(hash)operator(.)ident(fastDelete)operator(()ident(v)operator(\))operator(\)) ident(ary3)operator(.)ident(append)operator(()ident(v)operator(\))operator(;) operator(}) keyword(return) ident(ary3)operator(;) operator(}) comment(/** rb_ary_or * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_or)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyArray) ident(ary2) operator(=) ident(other)operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(RubyHash) ident(set) operator(=) ident(makeHash)operator(()ident(ary2)operator(\))operator(;) ident(RubyArray) ident(ary3) operator(=) keyword(new) ident(RubyArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(realLength) operator(+) ident(ary2)operator(.)ident(realLength)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(elt)operator(()ident(i)operator(\))operator(;) keyword(if) operator(()ident(set)operator(.)ident(fastDelete)operator(()ident(v)operator(\))operator(\)) ident(ary3)operator(.)ident(append)operator(()ident(v)operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(ary2)operator(.)ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(ary2)operator(.)ident(elt)operator(()ident(i)operator(\))operator(;) keyword(if) operator(()ident(set)operator(.)ident(fastDelete)operator(()ident(v)operator(\))operator(\)) ident(ary3)operator(.)ident(append)operator(()ident(v)operator(\))operator(;) operator(}) keyword(return) ident(ary3)operator(;) operator(}) comment(/** rb_ary_sort * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(sort)operator(()ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(aryDup)operator(()operator(\))operator(;) ident(ary)operator(.)ident(sort_bang)operator(()ident(block)operator(\))operator(;) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_ary_sort_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(sort_bang)operator(()ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(realLength) operator(>) integer(1)operator(\)) operator({) ident(flags) operator(|=) ident(TMPLOCK_ARR_F)operator(;) keyword(try) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) pre_type(Arrays)operator(.)ident(sort)operator(()ident(values)operator(,) integer(0)operator(,) ident(realLength)operator(,) keyword(new) ident(BlockComparator)operator(()ident(block)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(Arrays)operator(.)ident(sort)operator(()ident(values)operator(,) integer(0)operator(,) ident(realLength)operator(,) keyword(new) ident(DefaultComparator)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(flags) operator(&=) operator(~)ident(TMPLOCK_ARR_F)operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(final) type(class) class(BlockComparator) directive(implements) pre_type(Comparator) operator({) directive(private) ident(Block) ident(block)operator(;) directive(public) ident(BlockComparator)operator(()ident(Block) ident(block)operator(\)) operator({) local_variable(this)operator(.)ident(block) operator(=) ident(block)operator(;) operator(}) directive(public) type(int) ident(compare)operator(()pre_type(Object) ident(o1)operator(,) pre_type(Object) ident(o2)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(obj1) operator(=) operator(()ident(IRubyObject)operator(\)) ident(o1)operator(;) ident(IRubyObject) ident(obj2) operator(=) operator(()ident(IRubyObject)operator(\)) ident(o2)operator(;) ident(IRubyObject) ident(ret) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(obj1)operator(,) ident(obj2)operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(true)operator(\))operator(;) type(int) ident(n) operator(=) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(context)operator(,) ident(ret)operator(,) ident(obj1)operator(,) ident(obj2)operator(\))operator(;) comment(//TODO: ary_sort_check should be done here) keyword(return) ident(n)operator(;) operator(}) operator(}) directive(static) directive(final) type(class) class(DefaultComparator) directive(implements) pre_type(Comparator) operator({) directive(public) type(int) ident(compare)operator(()pre_type(Object) ident(o1)operator(,) pre_type(Object) ident(o2)operator(\)) operator({) keyword(if) operator(()ident(o1) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(o2) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(compareFixnums)operator(()ident(o1)operator(,) ident(o2)operator(\))operator(;) operator(}) keyword(if) operator(()ident(o1) keyword(instanceof) ident(RubyString) operator(&&) ident(o2) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyString)operator(\)) ident(o1)operator(\))operator(.)ident(op_cmp)operator(()operator(()ident(RubyString)operator(\)) ident(o2)operator(\))operator(;) operator(}) comment(//TODO: ary_sort_check should be done here) keyword(return) ident(compareOthers)operator(()operator(()ident(IRubyObject)operator(\))ident(o1)operator(,) operator(()ident(IRubyObject)operator(\))ident(o2)operator(\))operator(;) operator(}) directive(private) type(int) ident(compareFixnums)operator(()pre_type(Object) ident(o1)operator(,) pre_type(Object) ident(o2)operator(\)) operator({) type(long) ident(a) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(o1)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(b) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(o2)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(a) operator(>) ident(b)operator(\)) operator({) keyword(return) integer(1)operator(;) operator(}) keyword(if) operator(()ident(a) operator(<) ident(b)operator(\)) operator({) keyword(return) operator(-)integer(1)operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) directive(private) type(int) ident(compareOthers)operator(()ident(IRubyObject) ident(o1)operator(,) ident(IRubyObject) ident(o2)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(o1)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(ret) operator(=) ident(o1)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(o2)operator(\))operator(;) type(int) ident(n) operator(=) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(context)operator(,) ident(ret)operator(,) ident(o1)operator(,) ident(o2)operator(\))operator(;) comment(//TODO: ary_sort_check should be done here) keyword(return) ident(n)operator(;) operator(}) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyArray) ident(array)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) exception(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(array)operator(\))operator(;) ident(output)operator(.)ident(writeInt)operator(()ident(array)operator(.)ident(getList)operator(()operator(\))operator(.)ident(size)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(array)operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(output)operator(.)ident(dumpObject)operator(()operator(()ident(IRubyObject)operator(\)) ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyArray) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyArray) ident(result) operator(=) ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) type(int) ident(size) operator(=) ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(size)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * @see org.jruby.util.Pack#pack */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyString) ident(pack)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(RubyString) ident(iFmt) operator(=) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) keyword(return) ident(Pack)operator(.)ident(pack)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) ident(iFmt)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) pre_type(List)operator(.)ident(class)operator(;) operator(}) comment(// Satisfy java.util.List interface (for Java integration\)) directive(public) type(int) ident(size)operator(()operator(\)) operator({) keyword(return) ident(realLength)operator(;) operator(}) directive(public) type(boolean) ident(isEmpty)operator(()operator(\)) operator({) keyword(return) ident(realLength) operator(==) integer(0)operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()pre_type(Object) ident(element)operator(\)) operator({) keyword(return) ident(indexOf)operator(()ident(element)operator(\)) operator(!=) operator(-)integer(1)operator(;) operator(}) directive(public) pre_type(Object)type([]) ident(toArray)operator(()operator(\)) operator({) pre_type(Object)type([]) ident(array) operator(=) keyword(new) pre_type(Object)operator([)ident(realLength)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) ident(array)operator([)ident(i) operator(-) ident(begin)operator(]) operator(=) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(values)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) ident(array)operator(;) operator(}) directive(public) pre_type(Object)type([]) ident(toArray)operator(()directive(final) pre_type(Object)type([]) ident(arg)operator(\)) operator({) pre_type(Object)type([]) ident(array) operator(=) ident(arg)operator(;) keyword(if) operator(()ident(array)operator(.)ident(length) operator(<) ident(realLength)operator(\)) operator({) pre_type(Class) ident(type) operator(=) ident(array)operator(.)ident(getClass)operator(()operator(\))operator(.)ident(getComponentType)operator(()operator(\))operator(;) ident(array) operator(=) operator(()pre_type(Object)type([])operator(\)) pre_type(Array)operator(.)ident(newInstance)operator(()ident(type)operator(,) ident(realLength)operator(\))operator(;) operator(}) type(int) ident(length) operator(=) ident(realLength) operator(-) ident(begin)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(array)operator([)ident(i)operator(]) operator(=) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(values)operator([)ident(i) operator(+) ident(begin)operator(])operator(\))operator(;) operator(}) keyword(return) ident(array)operator(;) operator(}) directive(public) type(boolean) ident(add)operator(()pre_type(Object) ident(element)operator(\)) operator({) ident(append)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()pre_type(Object) ident(element)operator(\)) operator({) ident(IRubyObject) ident(deleted) operator(=) ident(delete)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(deleted)operator(.)ident(isNil)operator(()operator(\)) operator(?) pre_constant(false) operator(:) pre_constant(true)operator(;) comment(// TODO: is this correct ?) operator(}) directive(public) type(boolean) ident(containsAll)operator(()pre_type(Collection) ident(c)operator(\)) operator({) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(c)operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) keyword(if) operator(()ident(indexOf)operator(()ident(iter)operator(.)ident(next)operator(()operator(\))operator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(boolean) ident(addAll)operator(()pre_type(Collection) ident(c)operator(\)) operator({) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(c)operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(add)operator(()ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) operator(!)ident(c)operator(.)ident(isEmpty)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(addAll)operator(()type(int) ident(index)operator(,) pre_type(Collection) ident(c)operator(\)) operator({) pre_type(Iterator) ident(iter) operator(=) ident(c)operator(.)ident(iterator)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(index)operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(add)operator(()ident(i)operator(,) ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) operator(!)ident(c)operator(.)ident(isEmpty)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(removeAll)operator(()pre_type(Collection) ident(c)operator(\)) operator({) type(boolean) ident(listChanged) operator(=) pre_constant(false)operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(c)operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) keyword(if) operator(()ident(remove)operator(()ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(\)) operator({) ident(listChanged) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) ident(listChanged)operator(;) operator(}) directive(public) type(boolean) ident(retainAll)operator(()pre_type(Collection) ident(c)operator(\)) operator({) type(boolean) ident(listChanged) operator(=) pre_constant(false)operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(Object) ident(element) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(c)operator(.)ident(contains)operator(()ident(element)operator(\))operator(\)) operator({) ident(remove)operator(()ident(element)operator(\))operator(;) ident(listChanged) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) ident(listChanged)operator(;) operator(}) directive(public) pre_type(Object) ident(get)operator(()type(int) ident(index)operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()operator(()ident(IRubyObject)operator(\)) ident(elt)operator(()ident(index)operator(\))operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(set)operator(()type(int) ident(index)operator(,) pre_type(Object) ident(element)operator(\)) operator({) keyword(return) ident(store)operator(()ident(index)operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(\))operator(;) operator(}) comment(// TODO: make more efficient by not creating IRubyArray[]) directive(public) type(void) ident(add)operator(()type(int) ident(index)operator(,) pre_type(Object) ident(element)operator(\)) operator({) ident(insert)operator(()keyword(new) ident(IRubyObject)type([])operator({)ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(index)operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(})operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(remove)operator(()type(int) ident(index)operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(delete_at)operator(()ident(index)operator(\))operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(int) ident(indexOf)operator(()pre_type(Object) ident(element)operator(\)) operator({) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(if) operator(()ident(element) operator(!=) pre_constant(null)operator(\)) operator({) ident(IRubyObject) ident(convertedElement) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin)operator(;) ident(i) operator(<) ident(begin) operator(+) ident(realLength)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(convertedElement)operator(.)ident(equals)operator(()ident(values)operator([)ident(i)operator(])operator(\))operator(\)) operator({) keyword(return) ident(i)operator(;) operator(}) operator(}) operator(}) keyword(return) operator(-)integer(1)operator(;) operator(}) directive(public) type(int) ident(lastIndexOf)operator(()pre_type(Object) ident(element)operator(\)) operator({) type(int) ident(begin) operator(=) local_variable(this)operator(.)ident(begin)operator(;) keyword(if) operator(()ident(element) operator(!=) pre_constant(null)operator(\)) operator({) ident(IRubyObject) ident(convertedElement) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(element)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(begin) operator(+) ident(realLength) operator(-) integer(1)operator(;) ident(i) operator(>=) ident(begin)operator(;) ident(i)operator(--)operator(\)) operator({) keyword(if) operator(()ident(convertedElement)operator(.)ident(equals)operator(()ident(values)operator([)ident(i)operator(])operator(\))operator(\)) operator({) keyword(return) ident(i)operator(;) operator(}) operator(}) operator(}) keyword(return) operator(-)integer(1)operator(;) operator(}) directive(public) type(class) class(RubyArrayConversionIterator) directive(implements) pre_type(Iterator) operator({) directive(protected) type(int) ident(index) operator(=) integer(0)operator(;) directive(protected) type(int) ident(last) operator(=) operator(-)integer(1)operator(;) directive(public) type(boolean) ident(hasNext)operator(()operator(\)) operator({) keyword(return) ident(index) operator(<) ident(realLength)operator(;) operator(}) directive(public) pre_type(Object) ident(next)operator(()operator(\)) operator({) ident(IRubyObject) ident(element) operator(=) ident(elt)operator(()ident(index)operator(\))operator(;) ident(last) operator(=) ident(index)operator(++)operator(;) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(element)operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(void) ident(remove)operator(()operator(\)) operator({) keyword(if) operator(()ident(last) operator(==) operator(-)integer(1)operator(\)) keyword(throw) keyword(new) exception(IllegalStateException)operator(()operator(\))operator(;) ident(delete_at)operator(()ident(last)operator(\))operator(;) keyword(if) operator(()ident(last) operator(<) ident(index)operator(\)) ident(index)operator(--)operator(;) ident(last) operator(=) operator(-)integer(1)operator(;) operator(}) operator(}) directive(public) pre_type(Iterator) ident(iterator)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(RubyArrayConversionIterator)operator(()operator(\))operator(;) operator(}) directive(final) type(class) class(RubyArrayConversionListIterator) directive(extends) ident(RubyArrayConversionIterator) directive(implements) pre_type(ListIterator) operator({) directive(public) ident(RubyArrayConversionListIterator)operator(()operator(\)) operator({) operator(}) directive(public) ident(RubyArrayConversionListIterator)operator(()type(int) ident(index)operator(\)) operator({) local_variable(this)operator(.)ident(index) operator(=) ident(index)operator(;) operator(}) directive(public) type(boolean) ident(hasPrevious)operator(()operator(\)) operator({) keyword(return) ident(index) operator(>=) integer(0)operator(;) operator(}) directive(public) pre_type(Object) ident(previous)operator(()operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()operator(()ident(IRubyObject)operator(\)) ident(elt)operator(()ident(last) operator(=) operator(--)ident(index)operator(\))operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(int) ident(nextIndex)operator(()operator(\)) operator({) keyword(return) ident(index)operator(;) operator(}) directive(public) type(int) ident(previousIndex)operator(()operator(\)) operator({) keyword(return) ident(index) operator(-) integer(1)operator(;) operator(}) directive(public) type(void) ident(set)operator(()pre_type(Object) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(last) operator(==) operator(-)integer(1)operator(\)) keyword(throw) keyword(new) exception(IllegalStateException)operator(()operator(\))operator(;) ident(store)operator(()ident(last)operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(obj)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(add)operator(()pre_type(Object) ident(obj)operator(\)) operator({) ident(insert)operator(()keyword(new) ident(IRubyObject)type([]) operator({) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(index)operator(++)operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(obj)operator(\)) operator(})operator(\))operator(;) ident(last) operator(=) operator(-)integer(1)operator(;) operator(}) operator(}) directive(public) pre_type(ListIterator) ident(listIterator)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(RubyArrayConversionListIterator)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(ListIterator) ident(listIterator)operator(()type(int) ident(index)operator(\)) operator({) keyword(return) keyword(new) ident(RubyArrayConversionListIterator)operator(()ident(index)operator(\))operator(;) operator(}) comment(// TODO: list.subList(from, to\).clear(\) is supposed to clear the sublist from the list.) comment(// How can we support this operation?) directive(public) pre_type(List) ident(subList)operator(()type(int) ident(fromIndex)operator(,) type(int) ident(toIndex)operator(\)) operator({) keyword(if) operator(()ident(fromIndex) operator(<) integer(0) operator(||) ident(toIndex) operator(>) ident(size)operator(()operator(\)) operator(||) ident(fromIndex) operator(>) ident(toIndex)operator(\)) operator({) keyword(throw) keyword(new) exception(IndexOutOfBoundsException)operator(()operator(\))operator(;) operator(}) ident(IRubyObject) ident(subList) operator(=) ident(subseq)operator(()ident(fromIndex)operator(,) ident(toIndex) operator(-) ident(fromIndex) operator(+) integer(1)operator(\))operator(;) keyword(return) ident(subList)operator(.)ident(isNil)operator(()operator(\)) operator(?) pre_constant(null) operator(:) operator(()pre_type(List)operator(\)) ident(subList)operator(;) operator(}) directive(public) type(void) ident(clear)operator(()operator(\)) operator({) ident(rb_clear)operator(()operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.math.BigDecimal)operator(;) keyword(import) include(java.math.BigInteger)operator(;) keyword(import) include(java.math.MathContext)operator(;) keyword(import) include(java.math.RoundingMode)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.regex.Matcher)operator(;) keyword(import) include(java.util.regex.Pattern)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyConstant)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallbackFactory)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * @author Ola Bini */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyBigDecimal) directive(extends) ident(RubyNumeric) operator({) directive(private) directive(static) directive(final) ident(ObjectAllocator) ident(BIGDECIMAL_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_DOWN) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_DOWN)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_CEILING) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_CEILING)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_UP) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_UP)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_HALF_DOWN) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_HALF_DOWN)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_HALF_EVEN) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_HALF_EVEN)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_HALF_UP) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_HALF_UP)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_FLOOR) operator(=) pre_type(BigDecimal)operator(.)ident(ROUND_FLOOR)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_POSITIVE_INFINITE)operator(=)integer(3)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_OVERFLOW)operator(=)integer(1)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_POSITIVE_ZERO)operator(=)integer(1)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_ALL)operator(=)integer(255)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_NEGATIVE_FINITE)operator(=)operator(-)integer(2)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_UNDERFLOW)operator(=)integer(4)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_NaN)operator(=)integer(0)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(BASE)operator(=)integer(10000)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(ROUND_MODE)operator(=)integer(256)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_POSITIVE_FINITE)operator(=)integer(2)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_INFINITY)operator(=)integer(1)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_NEGATIVE_INFINITE)operator(=)operator(-)integer(3)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_ZERODIVIDE)operator(=)integer(1)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(SIGN_NEGATIVE_ZERO)operator(=)operator(-)integer(1)operator(;) annotation(@JRubyConstant) directive(public) directive(final) directive(static) type(int) ident(EXCEPTION_NaN)operator(=)integer(2)operator(;) comment(// Static constants) directive(private) directive(static) directive(final) pre_type(BigDecimal) ident(TWO) operator(=) keyword(new) pre_type(BigDecimal)operator(()integer(2)operator(\))operator(;) directive(private) directive(static) directive(final) type(double) ident(SQRT_10) operator(=) float(3.162277660168379332)operator(;) directive(public) directive(static) ident(RubyClass) ident(createBigDecimal)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(result) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,)ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(,) ident(BIGDECIMAL_ALLOCATOR)operator(\))operator(;) ident(CallbackFactory) ident(callbackFactory) operator(=) ident(runtime)operator(.)ident(callbackFactory)operator(()ident(RubyBigDecimal)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(BigDecimalKernelMethods)operator(.)ident(class)operator(\))operator(;) ident(result)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(result)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(result)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ROUND_HALF_UP)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyBigDecimal)operator(.)ident(class)operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedConstants)operator(()ident(RubyBigDecimal)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(private) type(boolean) ident(isNaN) operator(=) pre_constant(false)operator(;) directive(private) type(int) ident(infinitySign) operator(=) integer(0)operator(;) directive(private) type(int) ident(zeroSign) operator(=) integer(0)operator(;) directive(private) pre_type(BigDecimal) ident(value)operator(;) directive(public) pre_type(BigDecimal) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(public) ident(RubyBigDecimal)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) directive(public) ident(RubyBigDecimal)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(BigDecimal) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(\))operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) directive(public) directive(static) type(class) class(BigDecimalKernelMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newBigDecimal)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyBigDecimal)operator(.)ident(newBigDecimal)operator(()ident(recv)operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyBigDecimal) ident(newBigDecimal)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(newInstance)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(ver)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(dump)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(RubyString) ident(precision) operator(=) ident(RubyString)operator(.)ident(newUnicodeString)operator(()ident(args)operator([)integer(0)operator(])operator(.)ident(getRuntime)operator(()operator(\))operator(,) stringoperator(\))operator(;) ident(RubyString) ident(str) operator(=) local_variable(this)operator(.)ident(asString)operator(()operator(\))operator(;) keyword(return) ident(precision)operator(.)ident(append)operator(()ident(str)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBigDecimal) ident(load)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(from)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyBigDecimal) ident(rubyBigDecimal) operator(=) operator(()ident(RubyBigDecimal)operator(\)) operator(()operator(()operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(.)ident(allocate)operator(()operator(\))operator(\))operator(;) pre_type(String) ident(precisionAndValue) operator(=) ident(from)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(;) pre_type(String) ident(value) operator(=) ident(precisionAndValue)operator(.)ident(substring)operator(()ident(precisionAndValue)operator(.)ident(indexOf)operator(()stringoperator(\))operator(+)integer(1)operator(\))operator(;) ident(rubyBigDecimal)operator(.)ident(value) operator(=) keyword(new) pre_type(BigDecimal)operator(()ident(value)operator(\))operator(;) keyword(return) ident(rubyBigDecimal)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(double_fig)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(20)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(limit)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyModule) ident(c) operator(=) operator(()ident(RubyModule)operator(\))ident(recv)operator(;) ident(IRubyObject) ident(nCur) operator(=) ident(c)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(IRubyObject) ident(arg) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(if) operator(()operator(!)ident(arg)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(arg) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(arg)operator(,) ident(runtime)operator(.)ident(getFixnum)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()integer(0) operator(>) operator(()operator(()ident(RubyFixnum)operator(\))ident(arg)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(c)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(arg)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(nCur)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(mode)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) comment(// FIXME: I doubt any of the constants referenced in this method) comment(// are ever redefined -- should compare to the known values, rather) comment(// than do an expensive constant lookup.) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyClass) ident(clazz) operator(=) ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyModule) ident(c) operator(=) operator(()ident(RubyModule)operator(\))ident(recv)operator(;) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(runtime)operator(,) ident(args)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) ident(IRubyObject) ident(mode) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(IRubyObject) ident(value) operator(=) ident(args)operator([)integer(1)operator(])operator(;) keyword(if) operator(()operator(!)operator(()ident(mode) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(mode)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) type(long) ident(longMode) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(mode)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(EXCEPTION_ALL) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(longMode) operator(&) ident(EXCEPTION_ALL)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(c)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator(&&) operator(!)operator(()ident(value) keyword(instanceof) ident(RubyBoolean)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyFixnum) ident(currentExceptionMode) operator(=) operator(()ident(RubyFixnum)operator(\))ident(c)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) ident(RubyFixnum) ident(newExceptionMode) operator(=) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) ident(currentExceptionMode)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) ident(RubyFixnum) ident(EXCEPTION_INFINITY) operator(=) operator(()ident(RubyFixnum)operator(\))ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(longMode) operator(&) ident(EXCEPTION_INFINITY)operator(.)ident(getLongValue)operator(()operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(newExceptionMode) operator(=) operator(()ident(value)operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator(?) operator(()ident(RubyFixnum)operator(\))ident(currentExceptionMode)operator(.)ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(EXCEPTION_INFINITY)operator(\)) operator(:) operator(()ident(RubyFixnum)operator(\))ident(currentExceptionMode)operator(.)ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) operator(~)operator(()ident(EXCEPTION_INFINITY)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(RubyFixnum) ident(EXCEPTION_NaN) operator(=) operator(()ident(RubyFixnum)operator(\))ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(longMode) operator(&) ident(EXCEPTION_NaN)operator(.)ident(getLongValue)operator(()operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(newExceptionMode) operator(=) operator(()ident(value)operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator(?) operator(()ident(RubyFixnum)operator(\))ident(currentExceptionMode)operator(.)ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(EXCEPTION_NaN)operator(\)) operator(:) operator(()ident(RubyFixnum)operator(\))ident(currentExceptionMode)operator(.)ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) operator(~)operator(()ident(EXCEPTION_NaN)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(c)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(newExceptionMode)operator(\))operator(;) keyword(return) ident(newExceptionMode)operator(;) operator(}) type(long) ident(ROUND_MODE) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(longMode) operator(==) ident(ROUND_MODE)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(c)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(value) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(mode)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyFixnum) ident(roundingMode) operator(=) operator(()ident(RubyFixnum)operator(\))ident(value)operator(;) keyword(if) operator(()ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\)) operator(||) ident(roundingMode) operator(==) ident(clazz)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(\)) operator({) ident(c)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,) ident(roundingMode)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(c)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) directive(private) pre_type(RoundingMode) ident(getRoundingMode)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyFixnum) ident(roundingMode) operator(=) operator(()ident(RubyFixnum)operator(\))ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\)) operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(;) keyword(return) pre_type(RoundingMode)operator(.)ident(valueOf)operator(()operator(()type(int)operator(\))ident(roundingMode)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(RubyBigDecimal) ident(getVpValue)operator(()ident(IRubyObject) ident(v)operator(,) type(boolean) ident(must)operator(\)) operator({) keyword(if)operator(()ident(v) keyword(instanceof) ident(RubyBigDecimal)operator(\)) operator({) keyword(return) operator(()ident(RubyBigDecimal)operator(\))ident(v)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(v) keyword(instanceof) ident(RubyFixnum) operator(||) ident(v) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) pre_type(String) ident(s) operator(=) ident(v)operator(.)ident(toString)operator(()operator(\))operator(;) keyword(return) ident(newInstance)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,)keyword(new) ident(IRubyObject)type([])operator({)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(s)operator(\))operator(})operator(\))operator(;) operator(}) keyword(if)operator(()ident(must)operator(\)) operator({) pre_type(String) ident(err)operator(;) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(err) operator(=) ident(inspect)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(err) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseName)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(err) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(private) directive(final) directive(static) pre_type(Pattern) ident(INFINITY_PATTERN) operator(=) pre_type(Pattern)operator(.)ident(compile)operator(()stringoperator(\))operator(;) directive(private) directive(final) directive(static) pre_type(Pattern) ident(NUMBER_PATTERN) operator(=) pre_type(Pattern)operator(.)ident(compile)operator(()stringoperator(\))operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBigDecimal) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) pre_type(BigDecimal) ident(decimal)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(decimal) operator(=) keyword(new) pre_type(BigDecimal)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(String) ident(strValue) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(strValue) operator(=) ident(strValue)operator(.)ident(trim)operator(()operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(strValue)operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) pre_type(Matcher) ident(m) operator(=) ident(INFINITY_PATTERN)operator(.)ident(matcher)operator(()ident(strValue)operator(\))operator(;) keyword(if) operator(()ident(m)operator(.)ident(matches)operator(()operator(\))operator(\)) operator({) type(int) ident(sign) operator(=) integer(1)operator(;) pre_type(String) ident(signGroup) operator(=) ident(m)operator(.)ident(group)operator(()integer(1)operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(signGroup)operator(\))operator(\)) operator({) ident(sign) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(return) ident(newInfinity)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(sign)operator(\))operator(;) operator(}) comment(// Clean-up string representation so that it could be understood) comment(// by Java's BigDecimal. Not terribly efficient for now.) comment(// 1. MRI allows d and D as exponent separators) ident(strValue) operator(=) ident(strValue)operator(.)ident(replaceFirst)operator(()stringoperator(,) stringoperator(\))operator(;) comment(// 2. MRI allows underscores anywhere) ident(strValue) operator(=) ident(strValue)operator(.)ident(replaceAll)operator(()stringoperator(,) stringoperator(\))operator(;) comment(// 3. MRI ignores the trailing junk) ident(strValue) operator(=) ident(NUMBER_PATTERN)operator(.)ident(matcher)operator(()ident(strValue)operator(\))operator(.)ident(replaceFirst)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(decimal) operator(=) keyword(new) pre_type(BigDecimal)operator(()ident(strValue)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NumberFormatException) ident(e)operator(\)) operator({) ident(decimal) operator(=) keyword(new) pre_type(BigDecimal)operator(()integer(0)operator(\))operator(;) operator(}) keyword(if) operator(()ident(decimal)operator(.)ident(signum)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) comment(// MRI behavior: -0 and +0 are two different things) keyword(if) operator(()ident(strValue)operator(.)ident(matches)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(newZero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(newZero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(1)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(decimal)operator(\))operator(;) operator(}) directive(private) directive(static) ident(RubyBigDecimal) ident(newZero)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(sign)operator(\)) operator({) ident(RubyBigDecimal) ident(rbd) operator(=) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) pre_type(BigDecimal)operator(.)ident(ZERO)operator(\))operator(;) keyword(if) operator(()ident(sign) operator(<) integer(0)operator(\)) operator({) ident(rbd)operator(.)ident(zeroSign) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(else) operator({) ident(rbd)operator(.)ident(zeroSign) operator(=) integer(1)operator(;) operator(}) keyword(return) ident(rbd)operator(;) operator(}) directive(private) directive(static) ident(RubyBigDecimal) ident(newNaN)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyBigDecimal) ident(rbd) operator(=) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) pre_type(BigDecimal)operator(.)ident(ZERO)operator(\))operator(;) ident(rbd)operator(.)ident(isNaN) operator(=) pre_constant(true)operator(;) keyword(return) ident(rbd)operator(;) operator(}) directive(private) directive(static) ident(RubyBigDecimal) ident(newInfinity)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(sign)operator(\)) operator({) ident(RubyBigDecimal) ident(rbd) operator(=) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) pre_type(BigDecimal)operator(.)ident(ZERO)operator(\))operator(;) keyword(if) operator(()ident(sign) operator(<) integer(0)operator(\)) operator({) ident(rbd)operator(.)ident(infinitySign) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(else) operator({) ident(rbd)operator(.)ident(infinitySign) operator(=) integer(1)operator(;) operator(}) keyword(return) ident(rbd)operator(;) operator(}) directive(private) ident(RubyBigDecimal) ident(setResult)operator(()operator(\)) operator({) keyword(return) ident(setResult)operator(()integer(0)operator(\))operator(;) operator(}) directive(private) ident(RubyBigDecimal) ident(setResult)operator(()type(int) ident(scale)operator(\)) operator({) type(int) ident(prec) operator(=) ident(RubyFixnum)operator(.)ident(fix2int)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(\))operator(;) type(int) ident(prec2) operator(=) pre_type(Math)operator(.)ident(max)operator(()ident(scale)operator(,)ident(prec)operator(\))operator(;) keyword(if)operator(()ident(prec2) operator(>) integer(0) operator(&&) local_variable(this)operator(.)ident(value)operator(.)ident(scale)operator(()operator(\)) operator(>) operator(()ident(prec2)operator(-)ident(getExponent)operator(()operator(\))operator(\))operator(\)) operator({) local_variable(this)operator(.)ident(value) operator(=) local_variable(this)operator(.)ident(value)operator(.)ident(setScale)operator(()ident(prec2)operator(-)ident(getExponent)operator(()operator(\))operator(,)pre_type(BigDecimal)operator(.)ident(ROUND_HALF_UP)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) comment(// TODO: full-precision remainder is 1000x slower than MRI!) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(||) ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(arg)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(arg)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isInfinity)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(// Java and MRI definitions of modulo are different.) pre_type(BigDecimal) ident(modulo) operator(=) ident(value)operator(.)ident(remainder)operator(()ident(val)operator(.)ident(value)operator(\))operator(;) keyword(if) operator(()ident(modulo)operator(.)ident(signum)operator(()operator(\)) operator(*) ident(val)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) ident(modulo) operator(=) ident(modulo)operator(.)ident(add)operator(()ident(val)operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(modulo)operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(remainder)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) comment(// TODO: full-precision remainder is 1000x slower than MRI!) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(||) ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(arg)operator(,)pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(arg)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isInfinity)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(// Java and MRI definitions of remainder are the same.) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(value)operator(.)ident(remainder)operator(()ident(val)operator(.)ident(value)operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(mult2)operator(()ident(context)operator(,) ident(arg)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(mult2)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(b)operator(,) ident(IRubyObject) ident(n)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(b)operator(,)pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) comment(// TODO: what about n arg?) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(b)operator(\))operator(;) operator(}) type(int) ident(digits) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(n)operator(\))operator(;) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(if) operator(()operator(()ident(isInfinity)operator(()operator(\)) operator(&&) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator(||) operator(()ident(isZero)operator(()operator(\)) operator(&&) ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isZero)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator({) type(int) ident(sign1) operator(=) ident(isZero)operator(()operator(\))operator(?) ident(zeroSign) operator(:) ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) type(int) ident(sign2) operator(=) ident(val)operator(.)ident(isZero)operator(()operator(\)) operator(?) ident(val)operator(.)ident(zeroSign) operator(:) ident(val)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) keyword(return) ident(newZero)operator(()ident(runtime)operator(,) ident(sign1) operator(*) ident(sign2)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) type(int) ident(sign1) operator(=) ident(isInfinity)operator(()operator(\)) operator(?) ident(infinitySign) operator(:) ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) type(int) ident(sign2) operator(=) ident(val)operator(.)ident(isInfinity)operator(()operator(\)) operator(?) ident(val)operator(.)ident(infinitySign) operator(:) ident(val)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) keyword(return) ident(newInfinity)operator(()ident(runtime)operator(,) ident(sign1) operator(*) ident(sign2)operator(\))operator(;) operator(}) pre_type(BigDecimal) ident(res) operator(=) ident(value)operator(.)ident(multiply)operator(()ident(val)operator(.)ident(value)operator(\))operator(;) keyword(if) operator(()ident(res)operator(.)ident(precision)operator(()operator(\)) operator(>) ident(digits)operator(\)) operator({) comment(// TODO: rounding mode should not be hard-coded. See #mode.) ident(res) operator(=) ident(res)operator(.)ident(round)operator(()keyword(new) pre_type(MathContext)operator(()ident(digits)operator(,) pre_type(RoundingMode)operator(.)ident(HALF_UP)operator(\))operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(res)operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_pow)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(arg) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(arg)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) type(int) ident(times) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(times) operator(<) integer(0)operator(\)) operator({) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(signum)operator(()operator(\))operator(\))operator(;) operator(}) comment(// Note: MRI has a very non-trivial way of calculating the precision,) comment(// so we use very simple approximation here:) type(int) ident(precision) operator(=) operator(()operator(-)ident(times) operator(+) integer(4)operator(\)) operator(*) operator(()ident(getAllDigits)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(+) integer(4)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(pow)operator(()ident(times)operator(,) keyword(new) pre_type(MathContext)operator(()ident(precision)operator(,) pre_type(RoundingMode)operator(.)ident(HALF_UP)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(pow)operator(()ident(times)operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(b)operator(\)) operator({) keyword(return) ident(addInternal)operator(()ident(context)operator(,) ident(b)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(add2)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(b)operator(,) ident(IRubyObject) ident(digits)operator(\)) operator({) keyword(return) ident(addInternal)operator(()ident(context)operator(,) ident(b)operator(,) stringoperator(,) ident(digits)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addInternal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(b)operator(,) pre_type(String) ident(op)operator(,) ident(IRubyObject) ident(digits)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(prec) operator(=) ident(getPositiveInt)operator(()ident(context)operator(,) ident(digits)operator(\))operator(;) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(b)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) comment(// TODO:) comment(// MRI behavior: Call "+" or "add", depending on the call.) comment(// But this leads to exceptions when Floats are added. See:) comment(// http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/17374) comment(// return callCoerced(context, op, b, true\); -- this is MRI behavior.) comment(// We'll use ours for now, thus providing an ability to add Floats.) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(b)operator(,) pre_constant(true)operator(\))operator(;) operator(}) ident(IRubyObject) ident(res) operator(=) ident(handleAddSpecialValues)operator(()ident(val)operator(\))operator(;) keyword(if) operator(()ident(res) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(res)operator(;) operator(}) pre_type(RoundingMode) ident(roundMode) operator(=) ident(getRoundingMode)operator(()ident(runtime)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(value)operator(.)ident(add)operator(() ident(val)operator(.)ident(value)operator(,) keyword(new) pre_type(MathContext)operator(()ident(prec)operator(,) ident(roundMode)operator(\))operator(\))operator(\))operator(;) comment(// TODO: why this: .setResult(\);) operator(}) directive(private) type(int) ident(getPositiveInt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(int) ident(value) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(arg)operator(,) ident(runtime)operator(.)ident(getFixnum)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(handleAddSpecialValues)operator(()ident(RubyBigDecimal) ident(val)operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(// TODO: don't calculate the same value 3 times) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(isInfinity)operator(()operator(\)) operator(?) local_variable(this) operator(:) ident(val)operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(==) integer(0)operator(\)) operator({) type(int) ident(sign) operator(=) ident(infinitySign) operator(+) ident(val)operator(.)ident(infinitySign)operator(;) keyword(if) operator(()ident(sign) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(sign)operator(\))operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uplus)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_minus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(arg)operator(,) pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(arg)operator(\))operator(;) operator(}) ident(RubyBigDecimal) ident(res) operator(=) ident(handleMinusSpecialValues)operator(()ident(val)operator(\))operator(;) keyword(if) operator(()ident(res) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(res)operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(value)operator(.)ident(subtract)operator(()ident(val)operator(.)ident(value)operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(sub2)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(b)operator(,) ident(IRubyObject) ident(n)operator(\)) operator({) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(b)operator(,) pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(b)operator(\))operator(;) operator(}) ident(RubyBigDecimal) ident(res) operator(=) ident(handleMinusSpecialValues)operator(()ident(val)operator(\))operator(;) keyword(if) operator(()ident(res) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(res)operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(value)operator(.)ident(subtract)operator(()ident(val)operator(.)ident(value)operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) directive(private) ident(RubyBigDecimal) ident(handleMinusSpecialValues)operator(()ident(RubyBigDecimal) ident(val)operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(// TODO: 3 times calculate the same value below) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(<) integer(0)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(*) ident(val)operator(.)ident(infinitySign) operator(==) integer(0)operator(\)) operator({) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(val)operator(.)ident(infinitySign) operator(*) operator(-)integer(1)operator(\))operator(;) operator(}) type(int) ident(sign) operator(=) ident(infinitySign) operator(+) ident(val)operator(.)ident(infinitySign)operator(;) keyword(if) operator(()ident(sign) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(sign)operator(\))operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uminus)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(runtime)operator(,) operator(-)ident(infinitySign)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newZero)operator(()ident(runtime)operator(,) operator(-)ident(zeroSign)operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(negate)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(op_quo)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) comment(// regular division with some default precision) comment(// TODO: proper algorithm to set the precision) keyword(return) ident(op_div)operator(()ident(context)operator(,) ident(other)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(200)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) comment(// integer division) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isZero)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(.)ident(value)operator(.)ident(divideToIntegralValue)operator(()ident(val)operator(.)ident(value)operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) ident(IRubyObject) ident(digits)operator(\)) operator({) comment(// TODO: take BigDecimal.mode into account.) type(int) ident(scale) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(digits)operator(\))operator(;) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) operator(()ident(isZero)operator(()operator(\)) operator(&&) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator({) type(int) ident(sign1) operator(=) ident(isInfinity)operator(()operator(\)) operator(?) ident(infinitySign) operator(:) ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(sign1) operator(*) ident(val)operator(.)ident(zeroSign)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(&&) operator(!)ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign) operator(*) ident(val)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(isInfinity)operator(()operator(\)) operator(&&) ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newZero)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(signum)operator(()operator(\)) operator(*) ident(val)operator(.)ident(infinitySign)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(&&) ident(val)operator(.)ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(scale) operator(==) integer(0)operator(\)) operator({) comment(// MRI behavior: "If digits is 0, the result is the same as the / operator.") keyword(return) ident(op_quo)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(else) operator({) comment(// TODO: better algorithm to set precision needed) type(int) ident(prec) operator(=) pre_type(Math)operator(.)ident(max)operator(()integer(200)operator(,) ident(scale)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(divide)operator(()ident(val)operator(.)ident(value)operator(,) keyword(new) pre_type(MathContext)operator(()ident(prec)operator(,) pre_type(RoundingMode)operator(.)ident(HALF_UP)operator(\))operator(\))operator(\))operator(.)ident(setResult)operator(()ident(scale)operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(r)operator(,) type(char) ident(op)operator(\)) operator({) type(int) ident(e) operator(=) integer(0)operator(;) ident(RubyBigDecimal) ident(rb) operator(=) ident(getVpValue)operator(()ident(r)operator(,)pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(rb) operator(==) pre_constant(null)operator(\)) operator({) ident(IRubyObject) ident(ee) operator(=) ident(callCoerced)operator(()ident(context)operator(,) string)delimiter(")>operator(,)ident(r)operator(\))operator(;) keyword(if)operator(()ident(ee)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(e) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(ee)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(|) ident(rb)operator(.)ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(!=) integer(0) operator(||) ident(rb)operator(.)ident(infinitySign) operator(!=) integer(0)operator(\)) operator({) ident(e) operator(=) ident(infinitySign) operator(-) ident(rb)operator(.)ident(infinitySign)operator(;) operator(}) keyword(else) operator({) ident(e) operator(=) ident(value)operator(.)ident(compareTo)operator(()ident(rb)operator(.)ident(value)operator(\))operator(;) operator(}) operator(}) keyword(switch)operator(()ident(op)operator(\)) operator({) keyword(case) stringoperator(:) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(e)operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(e)operator(==)integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(e)operator(!=)integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(e)operator(>=)integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) string)delimiter(')>operator(:) keyword(return) operator(()ident(e)operator(>) integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(e)operator(<=)integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(e)operator(<) integer(0)operator(\))operator(?)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(:)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)string)delimiter(')>operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(cmp)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(abs)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(runtime)operator(,) integer(1)operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(abs)operator(()operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(ceil)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign)operator(\))operator(;) operator(}) type(int) ident(n) operator(=) integer(0)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(scale)operator(()operator(\)) operator(>) ident(n)operator(\)) operator({) comment(// rounding neccessary) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(setScale)operator(()ident(n)operator(,) pre_type(RoundingMode)operator(.)ident(CEILING)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(coerce)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(obj)operator(;) keyword(if)operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(obj) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(other)operator(,)ident(to_f)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(obj) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(getVpValue)operator(()ident(other)operator(,) pre_constant(true)operator(\))operator(,)local_variable(this)operator(\))operator(;) operator(}) keyword(return) ident(obj)operator(;) operator(}) directive(public) type(double) ident(getDoubleValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(doubleValue)operator(()operator(\))operator(;) operator(}) directive(public) type(long) ident(getLongValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(longValue)operator(()operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric) ident(multiplyWith)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyInteger) ident(value)operator(\)) operator({) keyword(return) operator(()ident(RubyNumeric)operator(\))ident(op_mul)operator(()ident(context)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric) ident(multiplyWith)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFloat) ident(value)operator(\)) operator({) keyword(return) operator(()ident(RubyNumeric)operator(\))ident(op_mul)operator(()ident(context)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric) ident(multiplyWith)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyBignum) ident(value)operator(\)) operator({) keyword(return) operator(()ident(RubyNumeric)operator(\))ident(op_mul)operator(()ident(context)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) comment(// TODO: full-precision divmod is 1000x slower than MRI!) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(||) ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(newNaN)operator(()ident(runtime)operator(\))operator(,) ident(newNaN)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) ident(RubyBigDecimal) ident(val) operator(=) ident(getVpValue)operator(()ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(callCoerced)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isInfinity)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isNaN)operator(()operator(\)) operator(||) ident(val)operator(.)ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(newNaN)operator(()ident(runtime)operator(\))operator(,) ident(newNaN)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) comment(// Java and MRI definitions of divmod are different. ) pre_type(BigDecimal)type([]) ident(divmod) operator(=) ident(value)operator(.)ident(divideAndRemainder)operator(()ident(val)operator(.)ident(value)operator(\))operator(;) pre_type(BigDecimal) ident(div) operator(=) ident(divmod)operator([)integer(0)operator(])operator(;) pre_type(BigDecimal) ident(mod) operator(=) ident(divmod)operator([)integer(1)operator(])operator(;) keyword(if) operator(()ident(mod)operator(.)ident(signum)operator(()operator(\)) operator(*) ident(val)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) ident(div) operator(=) ident(div)operator(.)ident(subtract)operator(()pre_type(BigDecimal)operator(.)ident(ONE)operator(\))operator(;) ident(mod) operator(=) ident(mod)operator(.)ident(add)operator(()ident(val)operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(div)operator(\))operator(,) keyword(new) ident(RubyBigDecimal)operator(()ident(runtime)operator(,) ident(mod)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(exponent)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getExponent)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(finite_p)operator(()operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(!)ident(isInfinity)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(floor)operator(()ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign)operator(\))operator(;) operator(}) type(int) ident(n) operator(=) integer(0)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(scale)operator(()operator(\)) operator(>) ident(n)operator(\)) operator({) comment(// rounding neccessary) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(setScale)operator(()ident(n)operator(,) pre_type(RoundingMode)operator(.)ident(FLOOR)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(frac)operator(()operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign)operator(\))operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(scale)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(value)operator(.)ident(precision)operator(()operator(\)) operator(<) ident(value)operator(.)ident(scale)operator(()operator(\))operator(\)) operator({) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) pre_type(BigDecimal) ident(val) operator(=) ident(value)operator(.)ident(subtract)operator(()operator(()operator(()ident(RubyBigDecimal)operator(\))ident(fix)operator(()operator(\))operator(\))operator(.)ident(value)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(val)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(infinite_p)operator(()operator(\)) operator({) keyword(if) operator(()ident(infinitySign) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(infinitySign)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) pre_type(StringBuilder) ident(val) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(.)ident(append)operator(()pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(val)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()local_variable(this)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(val)operator(.)ident(append)operator(()ident(getSignificantDigits)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) type(int) ident(len) operator(=) ident(getAllDigits)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) type(int) ident(pow) operator(=) ident(len) operator(/) integer(4)operator(;) ident(val)operator(.)ident(append)operator(()operator(()ident(pow) operator(+) integer(1)operator(\)) operator(*) integer(4)operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(val)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nan_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isNaN)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nonzero_p)operator(()operator(\)) operator({) keyword(return) ident(isZero)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(precs)operator(()operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject)type([]) ident(array) operator(=) keyword(new) ident(IRubyObject)operator([)integer(2)operator(])operator(;) ident(array)operator([)integer(0)operator(]) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(getSignificantDigits)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\))operator(;) type(int) ident(len) operator(=) ident(getAllDigits)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) type(int) ident(pow) operator(=) ident(len) operator(/) integer(4)operator(;) ident(array)operator([)integer(1)operator(]) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()operator(()ident(pow) operator(+) integer(1)operator(\)) operator(*) integer(4)operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(array)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(round)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(int) ident(scale) operator(=) ident(args)operator(.)ident(length) operator(>) integer(0) operator(?) ident(num2int)operator(()ident(args)operator([)integer(0)operator(])operator(\)) operator(:) integer(0)operator(;) type(int) ident(mode) operator(=) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator(?) ident(javaRoundingModeFromRubyRoundingMode)operator(()ident(args)operator([)integer(1)operator(])operator(\)) operator(:) pre_type(BigDecimal)operator(.)ident(ROUND_HALF_UP)operator(;) comment(// JRUBY-914: Java 1.4 BigDecimal does not allow a negative scale, so we have to simulate it) keyword(if) operator(()ident(scale) operator(<) integer(0)operator(\)) operator({) comment(// shift the decimal point just to the right of the digit to be rounded to (divide by 10**(abs(scale\)\)\)) comment(// -1 -> 10's digit, -2 -> 100's digit, etc.) pre_type(BigDecimal) ident(normalized) operator(=) ident(value)operator(.)ident(movePointRight)operator(()ident(scale)operator(\))operator(;) comment(// ...round to that digit) pre_type(BigDecimal) ident(rounded) operator(=) ident(normalized)operator(.)ident(setScale)operator(()integer(0)operator(,)ident(mode)operator(\))operator(;) comment(// ...and shift the result back to the left (multiply by 10**(abs(scale\)\)\)) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(rounded)operator(.)ident(movePointLeft)operator(()ident(scale)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(setScale)operator(()ident(scale)operator(,) ident(mode)operator(\))operator(\))operator(;) operator(}) operator(}) comment(//this relies on the Ruby rounding enumerations == Java ones, which they (currently\) all are) directive(private) type(int) ident(javaRoundingModeFromRubyRoundingMode)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(num2int)operator(()ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sign)operator(()operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(infinitySign) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(zeroSign) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(value)operator(.)ident(signum)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(split)operator(()operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject)type([]) ident(array) operator(=) keyword(new) ident(IRubyObject)operator([)integer(4)operator(])operator(;) comment(// sign) directive(final) ident(RubyFixnum) ident(sign)operator(;) keyword(if) operator(()ident(isNaN)operator(\)) operator({) ident(sign) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) ident(sign) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(infinitySign)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\))operator({) ident(sign) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(zeroSign)operator(\))operator(;) operator(}) keyword(else) operator({) ident(sign) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(signum)operator(()operator(\))operator(\))operator(;) operator(}) ident(array)operator([)integer(0)operator(]) operator(=) ident(sign)operator(;) comment(// significant digits and exponent) directive(final) ident(RubyString) ident(digits)operator(;) directive(final) ident(RubyFixnum) ident(exp)operator(;) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) ident(digits) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(exp) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) ident(digits) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(exp) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\))operator({) ident(digits) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(exp) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) operator({) comment(// normalize the value) ident(digits) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(getSignificantDigits)operator(()operator(\))operator(\))operator(;) ident(exp) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(getExponent)operator(()operator(\))operator(\))operator(;) operator(}) ident(array)operator([)integer(1)operator(]) operator(=) ident(digits)operator(;) ident(array)operator([)integer(3)operator(]) operator(=) ident(exp)operator(;) comment(// base) ident(array)operator([)integer(2)operator(]) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()integer(10)operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(array)operator(\))operator(;) operator(}) comment(// it doesn't handle special cases) directive(private) pre_type(String) ident(getSignificantDigits)operator(()operator(\)) operator({) comment(// TODO: no need to calculate every time.) pre_type(BigDecimal) ident(val) operator(=) ident(value)operator(.)ident(abs)operator(()operator(\))operator(.)ident(stripTrailingZeros)operator(()operator(\))operator(;) keyword(return) ident(val)operator(.)ident(unscaledValue)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(private) pre_type(String) ident(getAllDigits)operator(()operator(\)) operator({) comment(// TODO: no need to calculate every time.) pre_type(BigDecimal) ident(val) operator(=) ident(value)operator(.)ident(abs)operator(()operator(\))operator(;) keyword(return) ident(val)operator(.)ident(unscaledValue)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) comment(// it doesn't handle special cases) directive(private) type(int) ident(getExponent)operator(()operator(\)) operator({) comment(// TODO: no need to calculate every time.) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) integer(0)operator(;) operator(}) pre_type(BigDecimal) ident(val) operator(=) ident(value)operator(.)ident(abs)operator(()operator(\))operator(.)ident(stripTrailingZeros)operator(()operator(\))operator(;) keyword(return) ident(val)operator(.)ident(precision)operator(()operator(\)) operator(-) ident(val)operator(.)ident(scale)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(sqrt)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFloatDomainError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(()ident(isInfinity)operator(()operator(\)) operator(&&) ident(infinitySign) operator(<) integer(0)operator(\)) operator(||) ident(value)operator(.)ident(signum)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFloatDomainError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\)) operator(&&) ident(infinitySign) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(runtime)operator(,) integer(1)operator(\))operator(;) operator(}) comment(// NOTE: MRI's sqrt precision is limited by 100,) comment(// but we allow values more than 100.) type(int) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(n) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(n) operator(+=) integer(4)operator(;) comment(// just in case, add a bit of extra precision) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(bigSqrt)operator(()local_variable(this)operator(.)ident(value)operator(,) keyword(new) pre_type(MathContext)operator(()ident(n)operator(,) pre_type(RoundingMode)operator(.)ident(HALF_UP)operator(\))operator(\))operator(\))operator(.)ident(setResult)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Double)operator(.)ident(NaN)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign) operator(<) integer(0) operator(?) pre_type(Double)operator(.)ident(NEGATIVE_INFINITY) operator(:) pre_type(Double)operator(.)ident(POSITIVE_INFINITY)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(zeroSign) operator(<) integer(0) operator(?) operator(-)float(0.0) operator(:) float(0.0)operator(\))operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(doubleValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(to_int)operator(()operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(()operator(\)) operator(||) ident(infinitySign) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(int2fix)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(longValueExact)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ArithmeticException) ident(ae)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(toBigInteger)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) pre_type(String) ident(removeTrailingZeroes)operator(()pre_type(String) ident(in)operator(\)) operator({) keyword(while)operator(()ident(in)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(in)operator(.)ident(charAt)operator(()ident(in)operator(.)ident(length)operator(()operator(\))operator(-)integer(1)operator(\))operator(==)stringoperator(\)) operator({) ident(in) operator(=) ident(in)operator(.)ident(substring)operator(()integer(0)operator(,)ident(in)operator(.)ident(length)operator(()operator(\))operator(-)integer(1)operator(\))operator(;) operator(}) keyword(return) ident(in)operator(;) operator(}) directive(public) directive(static) type(boolean) ident(formatHasLeadingPlus)operator(()pre_type(String) ident(format)operator(\)) operator({) keyword(return) ident(format)operator(.)ident(startsWith)operator(()stringoperator(\))operator(;) operator(}) directive(public) directive(static) type(boolean) ident(formatHasLeadingSpace)operator(()pre_type(String) ident(format)operator(\)) operator({) keyword(return) ident(format)operator(.)ident(startsWith)operator(()stringoperator(\))operator(;) operator(}) directive(public) directive(static) type(boolean) ident(formatHasFloatingPointNotation)operator(()pre_type(String) ident(format)operator(\)) operator({) keyword(return) ident(format)operator(.)ident(endsWith)operator(()stringoperator(\))operator(;) operator(}) directive(public) directive(static) type(int) ident(formatFractionalDigitGroups)operator(()pre_type(String) ident(format)operator(\)) operator({) type(int) ident(groups) operator(=) integer(0)operator(;) pre_type(Pattern) ident(p) operator(=) pre_type(Pattern)operator(.)ident(compile)operator(()stringoperator(\))operator(;) pre_type(Matcher) ident(m) operator(=) ident(p)operator(.)ident(matcher)operator(()ident(format)operator(\))operator(;) keyword(if) operator(()ident(m)operator(.)ident(matches)operator(()operator(\))operator(\)) operator({) ident(groups) operator(=) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(m)operator(.)ident(group)operator(()integer(2)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(groups)operator(;) operator(}) directive(private) type(boolean) ident(hasArg)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(args)operator(.)ident(length) operator(!=) integer(0) operator(&&) operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(;) operator(}) directive(private) pre_type(String) ident(format)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(private) pre_type(String) ident(firstArgument)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(hasArg)operator(()ident(args)operator(\))operator(\)) operator({) keyword(return) ident(format)operator(()ident(args)operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(private) type(boolean) ident(posSpace)operator(()pre_type(String) ident(arg)operator(\)) operator({) keyword(if) operator(()pre_constant(null) operator(!=) ident(arg)operator(\)) operator({) keyword(return) ident(formatHasLeadingSpace)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(private) type(boolean) ident(posSign)operator(()pre_type(String) ident(arg)operator(\)) operator({) keyword(if) operator(()pre_constant(null) operator(!=) ident(arg)operator(\)) operator({) keyword(return) ident(formatHasLeadingPlus)operator(()ident(arg)operator(\)) operator(||) ident(posSpace)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(private) type(boolean) ident(asEngineering)operator(()pre_type(String) ident(arg)operator(\)) operator({) keyword(if) operator(()pre_constant(null) operator(!=) ident(arg)operator(\)) operator({) keyword(return) operator(!)ident(formatHasFloatingPointNotation)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) directive(private) type(int) ident(groups)operator(()pre_type(String) ident(arg)operator(\)) operator({) keyword(if) operator(()pre_constant(null) operator(!=) ident(arg)operator(\)) operator({) keyword(return) ident(formatFractionalDigitGroups)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) directive(private) type(boolean) ident(isZero)operator(()operator(\)) operator({) keyword(return) operator(!)ident(isNaN)operator(()operator(\)) operator(&&) operator(!)ident(isInfinity)operator(()operator(\)) operator(&&) operator(()ident(value)operator(.)ident(signum)operator(()operator(\)) operator(==) integer(0)operator(\))operator(;) operator(}) directive(private) type(boolean) ident(isNaN)operator(()operator(\)) operator({) keyword(return) ident(isNaN)operator(;) operator(}) directive(private) type(boolean) ident(isInfinity)operator(()operator(\)) operator({) keyword(return) ident(infinitySign) operator(!=) integer(0)operator(;) operator(}) directive(private) pre_type(String) ident(unscaledValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(abs)operator(()operator(\))operator(.)ident(unscaledValue)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(engineeringValue)operator(()pre_type(String) ident(arg)operator(\)) operator({) type(int) ident(exponent) operator(=) ident(getExponent)operator(()operator(\))operator(;) type(int) ident(signum) operator(=) ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) pre_type(StringBuilder) ident(build) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(build)operator(.)ident(append)operator(()ident(signum) operator(==) operator(-)integer(1) operator(?) string operator(:) operator(()ident(signum) operator(==) integer(1) operator(?) operator(()ident(posSign)operator(()ident(arg)operator(\)) operator(?) operator(()ident(posSpace)operator(()ident(arg)operator(\)) operator(?) string operator(:) stringoperator(\)) operator(:) stringoperator(\)) operator(:) stringoperator(\))operator(\))operator(;) ident(build)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if) operator(()integer(0) operator(==) ident(groups)operator(()ident(arg)operator(\))operator(\)) operator({) pre_type(String) ident(s) operator(=) ident(removeTrailingZeroes)operator(()ident(unscaledValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(s)operator(\))operator(\)) operator({) ident(build)operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(build)operator(.)ident(append)operator(()ident(s)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) type(int) ident(index) operator(=) integer(0)operator(;) pre_type(String) ident(sep) operator(=) stringoperator(;) keyword(while) operator(()ident(index) operator(<) ident(unscaledValue)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\)) operator({) type(int) ident(next) operator(=) ident(index) operator(+) ident(groups)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(next) operator(>) ident(unscaledValue)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(next) operator(=) ident(unscaledValue)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(build)operator(.)ident(append)operator(()ident(sep)operator(\))operator(.)ident(append)operator(()ident(unscaledValue)operator(()operator(\))operator(.)ident(substring)operator(()ident(index)operator(,) ident(next)operator(\))operator(\))operator(;) ident(sep) operator(=) stringoperator(;) ident(index) operator(+=) ident(groups)operator(()ident(arg)operator(\))operator(;) operator(}) operator(}) ident(build)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(exponent)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(build)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(floatingPointValue)operator(()pre_type(String) ident(arg)operator(\)) operator({) pre_type(String) ident(values)type([]) operator(=) ident(value)operator(.)ident(abs)operator(()operator(\))operator(.)ident(stripTrailingZeros)operator(()operator(\))operator(.)ident(toPlainString)operator(()operator(\))operator(.)ident(split)operator(()stringoperator(\))operator(;) pre_type(String) ident(whole) operator(=) stringoperator(;) keyword(if) operator(()ident(values)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(whole) operator(=) ident(values)operator([)integer(0)operator(])operator(;) operator(}) pre_type(String) ident(after) operator(=) stringoperator(;) keyword(if) operator(()ident(values)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(after) operator(=) ident(values)operator([)integer(1)operator(])operator(;) operator(}) type(int) ident(signum) operator(=) ident(value)operator(.)ident(signum)operator(()operator(\))operator(;) pre_type(StringBuilder) ident(build) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(build)operator(.)ident(append)operator(()ident(signum) operator(==) operator(-)integer(1) operator(?) string operator(:) operator(()ident(signum) operator(==) integer(1) operator(?) operator(()ident(posSign)operator(()ident(arg)operator(\)) operator(?) operator(()ident(posSpace)operator(()ident(arg)operator(\)) operator(?) string operator(:) stringoperator(\)) operator(:) stringoperator(\)) operator(:) stringoperator(\))operator(\))operator(;) keyword(if) operator(()ident(groups)operator(()ident(arg)operator(\)) operator(==) integer(0)operator(\)) operator({) ident(build)operator(.)ident(append)operator(()ident(whole)operator(\))operator(;) keyword(if) operator(()pre_constant(null) operator(!=) ident(after)operator(\)) operator({) ident(build)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(after)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) type(int) ident(index) operator(=) integer(0)operator(;) pre_type(String) ident(sep) operator(=) stringoperator(;) keyword(while) operator(()ident(index) operator(<) ident(whole)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) type(int) ident(next) operator(=) ident(index) operator(+) ident(groups)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(next) operator(>) ident(whole)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(next) operator(=) ident(whole)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(build)operator(.)ident(append)operator(()ident(sep)operator(\))operator(.)ident(append)operator(()ident(whole)operator(.)ident(substring)operator(()ident(index)operator(,) ident(next)operator(\))operator(\))operator(;) ident(sep) operator(=) stringoperator(;) ident(index) operator(+=) ident(groups)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(if) operator(()pre_constant(null) operator(!=) ident(after)operator(\)) operator({) ident(build)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(index) operator(=) integer(0)operator(;) ident(sep) operator(=) stringoperator(;) keyword(while) operator(()ident(index) operator(<) ident(after)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) type(int) ident(next) operator(=) ident(index) operator(+) ident(groups)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(next) operator(>) ident(after)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(next) operator(=) ident(after)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) ident(build)operator(.)ident(append)operator(()ident(sep)operator(\))operator(.)ident(append)operator(()ident(after)operator(.)ident(substring)operator(()ident(index)operator(,) ident(next)operator(\))operator(\))operator(;) ident(sep) operator(=) stringoperator(;) ident(index) operator(+=) ident(groups)operator(()ident(arg)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(build)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) pre_type(String) ident(arg) operator(=) ident(firstArgument)operator(()ident(args)operator(\))operator(;) keyword(if) operator(()ident(isNaN)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(infinitySign) operator(!=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(infinitySign) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(isZero)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(zero) operator(=) stringoperator(;) keyword(if) operator(()ident(zeroSign) operator(<) integer(0)operator(\)) operator({) ident(zero) operator(=) string operator(+) ident(zero)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(zero)operator(\))operator(;) operator(}) keyword(if)operator(()ident(asEngineering)operator(()ident(arg)operator(\))operator(\)) operator({) keyword(return) ident(engineeringValue)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(floatingPointValue)operator(()ident(arg)operator(\))operator(;) operator(}) operator(}) comment(// Note: #fix has only no-arg form, but truncate allows optional parameter.) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(fix)operator(()operator(\)) operator({) keyword(return) ident(truncate)operator(()ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(truncate)operator(()operator(\)) operator({) keyword(return) ident(truncate)operator(()ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(truncate)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(isNaN)operator(\)) operator({) keyword(return) ident(newNaN)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(isInfinity)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newInfinity)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(infinitySign)operator(\))operator(;) operator(}) type(int) ident(n) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) type(int) ident(precision) operator(=) ident(value)operator(.)ident(precision)operator(()operator(\)) operator(-) ident(value)operator(.)ident(scale)operator(()operator(\)) operator(+) ident(n)operator(;) keyword(if) operator(()ident(precision) operator(>) integer(0)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(round)operator(()keyword(new) pre_type(MathContext)operator(()ident(precision)operator(,) pre_type(RoundingMode)operator(.)ident(DOWN)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) comment(// TODO: proper sign) keyword(return) keyword(new) ident(RubyBigDecimal)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(BigDecimal)operator(.)ident(ZERO)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(zero_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isZero)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Returns the correctly rounded square root of a positive * BigDecimal. This method performs the fast Square Root by * Coupled Newton Iteration algorithm by Timm Ahrendt, from * the book "Pi, unleashed" by Jörg Arndt in a neat loop. *

* The code is based on Frans Lelieveld's code , used here with * permission. * * @param squarD The number to get the root from. * @param rootMC Precision and rounding mode. * @return the root of the argument number * @throws ArithmeticException * if the argument number is negative * @throws IllegalArgumentException * if rootMC has precision 0 */) directive(public) directive(static) pre_type(BigDecimal) ident(bigSqrt)operator(()pre_type(BigDecimal) ident(squarD)operator(,) pre_type(MathContext) ident(rootMC)operator(\)) operator({) comment(// General number and precision checking) type(int) ident(sign) operator(=) ident(squarD)operator(.)ident(signum)operator(()operator(\))operator(;) keyword(if) operator(()ident(sign) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(throw) keyword(new) exception(ArithmeticException)operator(()string operator(+) ident(squarD)operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(sign) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(squarD)operator(.)ident(round)operator(()ident(rootMC)operator(\))operator(;) operator(}) type(int) ident(prec) operator(=) ident(rootMC)operator(.)ident(getPrecision)operator(()operator(\))operator(;) comment(// the requested precision) keyword(if) operator(()ident(prec) operator(==) integer(0)operator(\)) operator({) keyword(throw) keyword(new) exception(IllegalArgumentException)operator(()stringoperator(\))operator(;) operator(}) comment(// Initial precision is that of double numbers 2^63/2 ~ 4E18) type(int) ident(BITS) operator(=) integer(62)operator(;) comment(// 63-1 an even number of number bits) type(int) ident(nInit) operator(=) integer(16)operator(;) comment(// precision seems 16 to 18 digits) pre_type(MathContext) ident(nMC) operator(=) keyword(new) pre_type(MathContext)operator(()integer(18)operator(,) pre_type(RoundingMode)operator(.)ident(HALF_DOWN)operator(\))operator(;) comment(// Iteration variables, for the square root x and the reciprocal v) pre_type(BigDecimal) ident(x) operator(=) pre_constant(null)operator(,) ident(e) operator(=) pre_constant(null)operator(;) comment(// initial x: x0 ~ sqrt(\)) pre_type(BigDecimal) ident(v) operator(=) pre_constant(null)operator(,) ident(g) operator(=) pre_constant(null)operator(;) comment(// initial v: v0 = 1/(2*x\)) comment(// Estimate the square root with the foremost 62 bits of squarD) pre_type(BigInteger) ident(bi) operator(=) ident(squarD)operator(.)ident(unscaledValue)operator(()operator(\))operator(;) comment(// bi and scale are a tandem) type(int) ident(biLen) operator(=) ident(bi)operator(.)ident(bitLength)operator(()operator(\))operator(;) type(int) ident(shift) operator(=) pre_type(Math)operator(.)ident(max)operator(()integer(0)operator(,) ident(biLen) operator(-) ident(BITS) operator(+) operator(()ident(biLen)operator(%)integer(2) operator(==) integer(0) operator(?) integer(0) operator(:) integer(1)operator(\))operator(\))operator(;) comment(// even shift..) ident(bi) operator(=) ident(bi)operator(.)ident(shiftRight)operator(()ident(shift)operator(\))operator(;) comment(// ..floors to 62 or 63 bit BigInteger) type(double) ident(root) operator(=) pre_type(Math)operator(.)ident(sqrt)operator(()ident(bi)operator(.)ident(doubleValue)operator(()operator(\))operator(\))operator(;) pre_type(BigDecimal) ident(halfBack) operator(=) keyword(new) pre_type(BigDecimal)operator(()pre_type(BigInteger)operator(.)ident(ONE)operator(.)ident(shiftLeft)operator(()ident(shift)operator(/)integer(2)operator(\))operator(\))operator(;) type(int) ident(scale) operator(=) ident(squarD)operator(.)ident(scale)operator(()operator(\))operator(;) keyword(if) operator(()ident(scale) operator(%) integer(2) operator(==) integer(1)operator(\)) operator({) ident(root) operator(*=) ident(SQRT_10)operator(;) comment(// 5 -> 2, -5 -> -3 need half a scale more..) operator(}) ident(scale) operator(=) operator(()type(int)operator(\)) pre_type(Math)operator(.)ident(floor)operator(()ident(scale)operator(/)integer(2)operator(.)operator(\))operator(;) comment(// ..where 100 -> 10 shifts the scale) comment(// Initial x - use double root - multiply by halfBack to unshift - set new scale) ident(x) operator(=) keyword(new) pre_type(BigDecimal)operator(()ident(root)operator(,) ident(nMC)operator(\))operator(;) ident(x) operator(=) ident(x)operator(.)ident(multiply)operator(()ident(halfBack)operator(,) ident(nMC)operator(\))operator(;) comment(// x0 ~ sqrt(\)) keyword(if) operator(()ident(scale) operator(!=) integer(0)operator(\)) operator({) ident(x) operator(=) ident(x)operator(.)ident(movePointLeft)operator(()ident(scale)operator(\))operator(;) operator(}) keyword(if) operator(()ident(prec) operator(<) ident(nInit)operator(\)) operator({) comment(// for prec 15 root x0 must surely be OK) keyword(return) ident(x)operator(.)ident(round)operator(()ident(rootMC)operator(\))operator(;) comment(// return small prec roots without iterations) operator(}) comment(// Initial v - the reciprocal) ident(v) operator(=) pre_type(BigDecimal)operator(.)ident(ONE)operator(.)ident(divide)operator(()ident(TWO)operator(.)ident(multiply)operator(()ident(x)operator(\))operator(,) ident(nMC)operator(\))operator(;) comment(// v0 = 1/(2*x\)) comment(// Collect iteration precisions beforehand) pre_type(List)operator(<)pre_type(Integer)operator(>) ident(nPrecs) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(Integer)operator(>)operator(()operator(\))operator(;) keyword(assert) ident(nInit) operator(>) integer(3) operator(:) stringoperator(;) comment(// assume nInit = 16 <= prec) comment(// Let m be the exact digits precision in an earlier! loop) keyword(for) operator(()type(int) ident(m) operator(=) ident(prec) operator(+) integer(1)operator(;) ident(m) operator(>) ident(nInit)operator(;) ident(m) operator(=) ident(m)operator(/)integer(2) operator(+) operator(()ident(m) operator(>) integer(100) operator(?) integer(1) operator(:) integer(2)operator(\))operator(\)) operator({) ident(nPrecs)operator(.)ident(add)operator(()ident(m)operator(\))operator(;) operator(}) comment(// The loop of "Square Root by Coupled Newton Iteration") keyword(for) operator(()type(int) ident(i) operator(=) ident(nPrecs)operator(.)ident(size)operator(()operator(\)) operator(-) integer(1)operator(;) ident(i) operator(>) operator(-)integer(1)operator(;) ident(i)operator(--)operator(\)) operator({) comment(// Increase precision - next iteration supplies n exact digits) ident(nMC) operator(=) keyword(new) pre_type(MathContext)operator(()ident(nPrecs)operator(.)ident(get)operator(()ident(i)operator(\))operator(,) operator(()ident(i)operator(%)integer(2) operator(==) integer(1)operator(\)) operator(?) pre_type(RoundingMode)operator(.)ident(HALF_UP) operator(:) pre_type(RoundingMode)operator(.)ident(HALF_DOWN)operator(\))operator(;) comment(// Next x // e = d - x^2) ident(e) operator(=) ident(squarD)operator(.)ident(subtract)operator(()ident(x)operator(.)ident(multiply)operator(()ident(x)operator(,) ident(nMC)operator(\))operator(,) ident(nMC)operator(\))operator(;) keyword(if) operator(()ident(i) operator(!=) integer(0)operator(\)) operator({) ident(x) operator(=) ident(x)operator(.)ident(add)operator(()ident(e)operator(.)ident(multiply)operator(()ident(v)operator(,) ident(nMC)operator(\))operator(\))operator(;) comment(// x += e*v ~ sqrt(\)) operator(}) keyword(else) operator({) ident(x) operator(=) ident(x)operator(.)ident(add)operator(()ident(e)operator(.)ident(multiply)operator(()ident(v)operator(,) ident(rootMC)operator(\))operator(,) ident(rootMC)operator(\))operator(;) comment(// root x is ready!) keyword(break)operator(;) operator(}) comment(// Next v // g = 1 - 2*x*v) ident(g) operator(=) pre_type(BigDecimal)operator(.)ident(ONE)operator(.)ident(subtract)operator(()ident(TWO)operator(.)ident(multiply)operator(()ident(x)operator(\))operator(.)ident(multiply)operator(()ident(v)operator(,) ident(nMC)operator(\))operator(\))operator(;) ident(v) operator(=) ident(v)operator(.)ident(add)operator(()ident(g)operator(.)ident(multiply)operator(()ident(v)operator(,) ident(nMC)operator(\))operator(\))operator(;) comment(// v += g*v ~ 1/2/sqrt(\)) operator(}) keyword(return) ident(x)operator(;) comment(// return sqrt(squarD\) with precision of rootMC) operator(}) operator(})comment(// RubyBigdecimal) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.math.BigDecimal)operator(;) keyword(import) include(java.math.BigInteger)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyBignum) directive(extends) ident(RubyInteger) operator({) directive(public) directive(static) ident(RubyClass) ident(createBignumClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(bignum) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getInteger)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setBignum)operator(()ident(bignum)operator(\))operator(;) ident(bignum)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(BIGNUM)operator(;) ident(bignum)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyBignum)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(bignum)operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(BIT_SIZE) operator(=) integer(64)operator(;) directive(private) directive(static) directive(final) type(long) ident(MAX) operator(=) operator(()integer(1L) operator(<)operator(<) operator(()ident(BIT_SIZE) operator(-) integer(1)operator(\))operator(\)) operator(-) integer(1)operator(;) directive(private) directive(static) directive(final) pre_type(BigInteger) ident(LONG_MAX) operator(=) pre_type(BigInteger)operator(.)ident(valueOf)operator(()ident(MAX)operator(\))operator(;) directive(private) directive(static) directive(final) pre_type(BigInteger) ident(LONG_MIN) operator(=) pre_type(BigInteger)operator(.)ident(valueOf)operator(()operator(-)ident(MAX) operator(-) integer(1)operator(\))operator(;) directive(private) directive(final) pre_type(BigInteger) ident(value)operator(;) directive(public) ident(RubyBignum)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(BigInteger) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getBignum)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(BIGNUM)operator(;) operator(}) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) pre_type(BigInteger)operator(.)ident(class)operator(;) operator(}) directive(public) directive(static) ident(RubyBignum) ident(newBignum)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(value)operator(\)) operator({) keyword(return) ident(newBignum)operator(()ident(runtime)operator(,) pre_type(BigInteger)operator(.)ident(valueOf)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyBignum) ident(newBignum)operator(()ident(Ruby) ident(runtime)operator(,) type(double) ident(value)operator(\)) operator({) keyword(return) ident(newBignum)operator(()ident(runtime)operator(,) keyword(new) pre_type(BigDecimal)operator(()ident(value)operator(\))operator(.)ident(toBigInteger)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyBignum) ident(newBignum)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(BigInteger) ident(value)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBignum)operator(()ident(runtime)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyBignum) ident(newBignum)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(value)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBignum)operator(()ident(runtime)operator(,) keyword(new) pre_type(BigInteger)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) directive(public) type(double) ident(getDoubleValue)operator(()operator(\)) operator({) keyword(return) ident(big2dbl)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) type(long) ident(getLongValue)operator(()operator(\)) operator({) keyword(return) ident(big2long)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** Getter for property value. * @return Value of property value. */) directive(public) pre_type(BigInteger) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) comment(/* ================ * Utility Methods * ================ */) comment(/* If the value will fit in a Fixnum, return one of those. */) comment(/** rb_big_norm * */) directive(public) directive(static) ident(RubyInteger) ident(bignorm)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(BigInteger) ident(bi)operator(\)) operator({) keyword(if) operator(()ident(bi)operator(.)ident(compareTo)operator(()ident(LONG_MIN)operator(\)) operator(<) integer(0) operator(||) ident(bi)operator(.)ident(compareTo)operator(()ident(LONG_MAX)operator(\)) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(newBignum)operator(()ident(runtime)operator(,) ident(bi)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(bi)operator(.)ident(longValue)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big2long * */) directive(public) directive(static) type(long) ident(big2long)operator(()ident(RubyBignum) ident(value)operator(\)) operator({) pre_type(BigInteger) ident(big) operator(=) ident(value)operator(.)ident(getValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(big)operator(.)ident(compareTo)operator(()ident(LONG_MIN)operator(\)) operator(<) integer(0) operator(||) ident(big)operator(.)ident(compareTo)operator(()ident(LONG_MAX)operator(\)) operator(>) integer(0)operator(\)) operator({) keyword(throw) ident(value)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(big)operator(.)ident(longValue)operator(()operator(\))operator(;) operator(}) comment(/** rb_big2dbl * */) directive(public) directive(static) type(double) ident(big2dbl)operator(()ident(RubyBignum) ident(value)operator(\)) operator({) pre_type(BigInteger) ident(big) operator(=) ident(value)operator(.)ident(getValue)operator(()operator(\))operator(;) type(double) ident(dbl) operator(=) ident(convertToDouble)operator(()ident(big)operator(\))operator(;) keyword(if) operator(()ident(dbl) operator(==) pre_type(Double)operator(.)ident(NEGATIVE_INFINITY) operator(||) ident(dbl) operator(==) pre_type(Double)operator(.)ident(POSITIVE_INFINITY)operator(\)) operator({) ident(value)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(BIGNUM_FROM_FLOAT_RANGE)operator(,) stringoperator(\))operator(;) operator(}) keyword(return) ident(dbl)operator(;) operator(}) directive(private) ident(IRubyObject) ident(checkShiftDown)operator(()ident(RubyBignum) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(==) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(value)operator(.)ident(compareTo)operator(()ident(LONG_MIN)operator(\)) operator(<) integer(0) operator(||) ident(value)operator(.)ident(compareTo)operator(()ident(LONG_MAX)operator(\)) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(other)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(>=) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * BigInteger#doubleValue is _really_ slow currently. * This is faster, and mostly correct (?\) */) directive(static) type(double) ident(convertToDouble)operator(()pre_type(BigInteger) ident(bigint)operator(\)) operator({) type(byte)type([]) ident(arr) operator(=) ident(bigint)operator(.)ident(toByteArray)operator(()operator(\))operator(;) type(double) ident(res) operator(=) integer(0)operator(;) type(double) ident(acc) operator(=) integer(1)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(arr)operator(.)ident(length) operator(-) integer(1)operator(;) ident(i) operator(>) integer(0) operator(;) ident(i)operator(--)operator(\)) operator({) ident(res) operator(+=) operator(()type(double)operator(\)) operator(()ident(arr)operator([)ident(i)operator(]) operator(&) hex(0xff)operator(\)) operator(*) ident(acc)operator(;) ident(acc) operator(*=) integer(256)operator(;) operator(}) ident(res) operator(+=) operator(()type(double)operator(\)) ident(arr)operator([)integer(0)operator(]) operator(*) ident(acc)operator(;) comment(// final byte sign is significant) keyword(return) ident(res)operator(;) operator(}) comment(/** rb_int2big * */) directive(public) directive(static) pre_type(BigInteger) ident(fix2big)operator(()ident(RubyFixnum) ident(arg)operator(\)) operator({) keyword(return) pre_type(BigInteger)operator(.)ident(valueOf)operator(()ident(arg)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** rb_big_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(int) ident(base) operator(=) ident(args)operator(.)ident(length) operator(==) integer(0) operator(?) integer(10) operator(:) ident(num2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(base) operator(<) integer(2) operator(||) ident(base) operator(>) integer(36)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(base)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(getValue)operator(()operator(\))operator(.)ident(toString)operator(()ident(base)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_coerce * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(coerce)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(getValue)operator(()operator(\))operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) comment(/** rb_big_uminus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uminus)operator(()operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(negate)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_plus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(addFixnum)operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(addBignum)operator(()operator(()ident(RubyBignum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(addFloat)operator(()operator(()ident(RubyFloat)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(return) ident(addOther)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addFixnum)operator(()ident(RubyFixnum) ident(other)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(add)operator(()ident(fix2big)operator(()ident(other)operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addBignum)operator(()ident(RubyBignum) ident(other)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(add)operator(()ident(other)operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addFloat)operator(()ident(RubyFloat) ident(other)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(+) ident(other)operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addOther)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_big_minus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_minus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(subtractFixnum)operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(subtractBignum)operator(()operator(()ident(RubyBignum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(subtractFloat)operator(()operator(()ident(RubyFloat)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(return) ident(subtractOther)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractFixnum)operator(()ident(RubyFixnum) ident(other)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(subtract)operator(()ident(fix2big)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractBignum)operator(()ident(RubyBignum) ident(other)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(subtract)operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractFloat)operator(()ident(RubyFloat) ident(other)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(-) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractOther)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_big_mul * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(multiply)operator(()ident(fix2big)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(multiply)operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(*) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** * rb_big_divide. Shared part for both "/" and "div" operations. */) directive(private) ident(IRubyObject) ident(op_divide)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) pre_type(String) ident(op)operator(\)) operator({) keyword(assert) operator(()stringoperator(.)ident(equals)operator(()ident(op)operator(\)) operator(||) stringoperator(.)ident(equals)operator(()ident(op)operator(\))operator(\))operator(;) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(div) operator(=) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(/) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(op)operator(\))operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(/) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(dbl2num)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(div)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) ident(op)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(otherValue)operator(.)ident(equals)operator(()pre_type(BigInteger)operator(.)ident(ZERO)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) pre_type(BigInteger)type([]) ident(results) operator(=) ident(value)operator(.)ident(divideAndRemainder)operator(()ident(otherValue)operator(\))operator(;) keyword(if) operator(()operator(()ident(value)operator(.)ident(signum)operator(()operator(\)) operator(*) ident(otherValue)operator(.)ident(signum)operator(()operator(\))operator(\)) operator(==) operator(-)integer(1) operator(&&) ident(results)operator([)integer(1)operator(])operator(.)ident(signum)operator(()operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(results)operator([)integer(0)operator(])operator(.)ident(subtract)operator(()pre_type(BigInteger)operator(.)ident(ONE)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(results)operator([)integer(0)operator(])operator(\))operator(;) operator(}) comment(/** rb_big_div * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(op_divide)operator(()ident(context)operator(,) ident(other)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_big_idiv * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_idiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(op_divide)operator(()ident(context)operator(,) ident(other)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_big_divmod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(otherValue)operator(.)ident(equals)operator(()pre_type(BigInteger)operator(.)ident(ZERO)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) pre_type(BigInteger)type([]) ident(results) operator(=) ident(value)operator(.)ident(divideAndRemainder)operator(()ident(otherValue)operator(\))operator(;) keyword(if) operator(()operator(()ident(value)operator(.)ident(signum)operator(()operator(\)) operator(*) ident(otherValue)operator(.)ident(signum)operator(()operator(\))operator(\)) operator(==) operator(-)integer(1) operator(&&) ident(results)operator([)integer(1)operator(])operator(.)ident(signum)operator(()operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(results)operator([)integer(0)operator(]) operator(=) ident(results)operator([)integer(0)operator(])operator(.)ident(subtract)operator(()pre_type(BigInteger)operator(.)ident(ONE)operator(\))operator(;) ident(results)operator([)integer(1)operator(]) operator(=) ident(otherValue)operator(.)ident(add)operator(()ident(results)operator([)integer(1)operator(])operator(\))operator(;) operator(}) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(bignorm)operator(()ident(runtime)operator(,) ident(results)operator([)integer(0)operator(])operator(\))operator(,) ident(bignorm)operator(()ident(runtime)operator(,) ident(results)operator([)integer(1)operator(])operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_modulo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(otherValue)operator(.)ident(equals)operator(()pre_type(BigInteger)operator(.)ident(ZERO)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) pre_type(BigInteger) ident(result) operator(=) ident(value)operator(.)ident(mod)operator(()ident(otherValue)operator(.)ident(abs)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(otherValue)operator(.)ident(signum)operator(()operator(\)) operator(==) operator(-)integer(1) operator(&&) ident(result)operator(.)ident(signum)operator(()operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(result) operator(=) ident(otherValue)operator(.)ident(add)operator(()ident(result)operator(\))operator(;) operator(}) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) operator(}) comment(/** rb_big_remainder * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(remainder)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(otherValue)operator(.)ident(equals)operator(()pre_type(BigInteger)operator(.)ident(ZERO)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(remainder)operator(()ident(otherValue)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_quo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(quo)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\)) operator(/) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** rb_big_pow * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_pow)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) type(double) ident(d)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(RubyFixnum) ident(fix) operator(=) operator(()ident(RubyFixnum)operator(\)) ident(other)operator(;) type(long) ident(fixValue) operator(=) ident(fix)operator(.)ident(getLongValue)operator(()operator(\))operator(;) comment(// MRI issuses warning here on (RBIGNUM(x\)->len * SIZEOF_BDIGITS * yy > 1024*1024\)) keyword(if) operator(()operator(()operator(()ident(value)operator(.)ident(bitLength)operator(()operator(\)) operator(+) integer(7)operator(\)) operator(/) integer(8)operator(\)) operator(*) integer(4) operator(*) pre_type(Math)operator(.)ident(abs)operator(()ident(fixValue)operator(\)) operator(>) integer(1024) operator(*) integer(1024)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MAY_BE_TOO_BIG)operator(,) stringoperator(,) ident(fixValue)operator(\))operator(;) operator(}) keyword(if) operator(()ident(fixValue) operator(>=) integer(0)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(pow)operator(()operator(()type(int)operator(\)) ident(fixValue)operator(\))operator(\))operator(;) comment(// num2int is also implemented) operator(}) keyword(else) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(big2dbl)operator(()local_variable(this)operator(\))operator(,) operator(()type(double)operator(\))ident(fixValue)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(d) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MAY_BE_TOO_BIG)operator(,) stringoperator(,) ident(d)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(d) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(big2dbl)operator(()local_variable(this)operator(\))operator(,) ident(d)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_pow * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(op_pow_19)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) type(double) ident(d)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(RubyFixnum) ident(fix) operator(=) operator(()ident(RubyFixnum)operator(\)) ident(other)operator(;) type(long) ident(fixValue) operator(=) ident(fix)operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(fixValue) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalRaw)operator(()ident(runtime)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(// MRI issuses warning here on (RBIGNUM(x\)->len * SIZEOF_BDIGITS * yy > 1024*1024\)) keyword(if) operator(()operator(()operator(()ident(value)operator(.)ident(bitLength)operator(()operator(\)) operator(+) integer(7)operator(\)) operator(/) integer(8)operator(\)) operator(*) integer(4) operator(*) pre_type(Math)operator(.)ident(abs)operator(()ident(fixValue)operator(\)) operator(>) integer(1024) operator(*) integer(1024)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MAY_BE_TOO_BIG)operator(,) stringoperator(,) ident(fixValue)operator(\))operator(;) operator(}) keyword(if) operator(()ident(fixValue) operator(>=) integer(0)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(runtime)operator(,) ident(value)operator(.)ident(pow)operator(()operator(()type(int)operator(\)) ident(fixValue)operator(\))operator(\))operator(;) comment(// num2int is also implemented) operator(}) keyword(else) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(big2dbl)operator(()local_variable(this)operator(\))operator(,) operator(()type(double)operator(\))ident(fixValue)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(if) operator(()ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalRaw)operator(()ident(runtime)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) ident(d) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MAY_BE_TOO_BIG)operator(,) stringoperator(,) ident(d)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(d) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(RubyNumeric)operator(.)ident(dbl2num)operator(()ident(runtime)operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(big2dbl)operator(()local_variable(this)operator(\))operator(,) ident(d)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_and * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_and)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(other) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(and)operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(and)operator(()ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_big_or * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_or)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(other) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(or)operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) comment(// no bignorm here needed) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(or)operator(()ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_big_xor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_xor)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(other) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(xor)operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(xor)operator(()pre_type(BigInteger)operator(.)ident(valueOf)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_big_neg * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_neg)operator(()operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(not)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_lshift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_lshift)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) type(long) ident(shift)operator(;) type(boolean) ident(neg) operator(=) pre_constant(false)operator(;) keyword(for) operator(()operator(;)operator(;)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(shift) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(shift) operator(<) integer(0)operator(\)) operator({) ident(neg) operator(=) pre_constant(true)operator(;) ident(shift) operator(=) operator(-)ident(shift)operator(;) operator(}) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(RubyBignum) ident(otherBignum) operator(=) operator(()ident(RubyBignum)operator(\))ident(other)operator(;) keyword(if) operator(()ident(otherBignum)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(otherBignum)operator(.)ident(checkShiftDown)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(tmp)operator(;) ident(neg) operator(=) pre_constant(true)operator(;) operator(}) ident(shift) operator(=) ident(big2long)operator(()ident(otherBignum)operator(\))operator(;) keyword(break)operator(;) operator(}) ident(other) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) operator(}) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(neg) operator(?) ident(value)operator(.)ident(shiftRight)operator(()operator(()type(int)operator(\))ident(shift)operator(\)) operator(:) ident(value)operator(.)ident(shiftLeft)operator(()operator(()type(int)operator(\))ident(shift)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_rshift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string>)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_rshift)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) type(long) ident(shift)operator(;) type(boolean) ident(neg) operator(=) pre_constant(false)operator(;) keyword(for) operator(()operator(;)operator(;)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(shift) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(shift) operator(<) integer(0)operator(\)) operator({) ident(neg) operator(=) pre_constant(true)operator(;) ident(shift) operator(=) operator(-)ident(shift)operator(;) operator(}) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(RubyBignum) ident(otherBignum) operator(=) operator(()ident(RubyBignum)operator(\))ident(other)operator(;) keyword(if) operator(()ident(otherBignum)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(>=) integer(0)operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(otherBignum)operator(.)ident(checkShiftDown)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(tmp)operator(;) operator(}) keyword(else) operator({) ident(neg) operator(=) pre_constant(true)operator(;) operator(}) ident(shift) operator(=) ident(big2long)operator(()ident(otherBignum)operator(\))operator(;) keyword(break)operator(;) operator(}) ident(other) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) operator(}) keyword(return) ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(neg) operator(?) ident(value)operator(.)ident(shiftLeft)operator(()operator(()type(int)operator(\))ident(shift)operator(\)) operator(:) ident(value)operator(.)ident(shiftRight)operator(()operator(()type(int)operator(\))ident(shift)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_aref * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyFixnum) ident(op_aref)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(if) operator(()operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(>=) integer(0) operator(||) ident(value)operator(.)ident(signum)operator(()operator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) type(long) ident(position) operator(=) ident(num2long)operator(()ident(other)operator(\))operator(;) keyword(if) operator(()ident(position) operator(<) integer(0) operator(||) ident(position) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(value)operator(.)ident(testBit)operator(()operator(()type(int)operator(\))ident(position)operator(\)) operator(?) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(dbl_cmp)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big2dbl)operator(()local_variable(this)operator(\))operator(,) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(coerceCmp)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) comment(// wow, the only time we can use the java protocol ;\) ) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(compareTo)operator(()ident(otherValue)operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_eq * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) pre_type(BigInteger) ident(otherValue)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(otherValue) operator(=) ident(fix2big)operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) ident(otherValue) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(a) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(a)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(a) operator(==) ident(big2dbl)operator(()local_variable(this)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(other)operator(.)ident(op_eqq)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(compareTo)operator(()ident(otherValue)operator(\)) operator(==) integer(0)operator(\))operator(;) operator(}) comment(/** rb_big_eql * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(value)operator(.)ident(compareTo)operator(()operator(()operator(()ident(RubyBignum)operator(\))ident(other)operator(\))operator(.)ident(value)operator(\)) operator(==) integer(0) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_big_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_to_f * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_abs * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(abs)operator(()operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(abs)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_big_size * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(size)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(()ident(value)operator(.)ident(bitLength)operator(()operator(\)) operator(+) integer(7)operator(\)) operator(/) integer(8)operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyBignum) ident(bignum)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) exception(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(bignum)operator(\))operator(;) ident(output)operator(.)ident(write)operator(()ident(bignum)operator(.)ident(value)operator(.)ident(signum)operator(()operator(\)) operator(>=) integer(0) operator(?) string operator(:) stringoperator(\))operator(;) pre_type(BigInteger) ident(absValue) operator(=) ident(bignum)operator(.)ident(value)operator(.)ident(abs)operator(()operator(\))operator(;) type(byte)type([]) ident(digits) operator(=) ident(absValue)operator(.)ident(toByteArray)operator(()operator(\))operator(;) type(boolean) ident(oddLengthNonzeroStart) operator(=) operator(()ident(digits)operator(.)ident(length) operator(%) integer(2) operator(!=) integer(0) operator(&&) ident(digits)operator([)integer(0)operator(]) operator(!=) integer(0)operator(\))operator(;) type(int) ident(shortLength) operator(=) ident(digits)operator(.)ident(length) operator(/) integer(2)operator(;) keyword(if) operator(()ident(oddLengthNonzeroStart)operator(\)) operator({) ident(shortLength)operator(++)operator(;) operator(}) ident(output)operator(.)ident(writeInt)operator(()ident(shortLength)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<=) ident(shortLength) operator(*) integer(2) operator(&&) ident(i) operator(<=) ident(digits)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(output)operator(.)ident(write)operator(()ident(digits)operator([)ident(digits)operator(.)ident(length) operator(-) ident(i)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(oddLengthNonzeroStart)operator(\)) operator({) comment(// Pad with a 0) ident(output)operator(.)ident(write)operator(()integer(0)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyNumeric) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) exception(IOException) operator({) type(boolean) ident(positive) operator(=) ident(input)operator(.)ident(readUnsignedByte)operator(()operator(\)) operator(==) stringoperator(;) type(int) ident(shortLength) operator(=) ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(;) comment(// BigInteger required a sign byte in incoming array) type(byte)type([]) ident(digits) operator(=) keyword(new) type(byte)operator([)ident(shortLength) operator(*) integer(2) operator(+) integer(1)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(digits)operator(.)ident(length) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(1)operator(;) ident(i)operator(--)operator(\)) operator({) ident(digits)operator([)ident(i)operator(]) operator(=) ident(input)operator(.)ident(readSignedByte)operator(()operator(\))operator(;) operator(}) pre_type(BigInteger) ident(value) operator(=) keyword(new) pre_type(BigInteger)operator(()ident(digits)operator(\))operator(;) keyword(if) operator(()operator(!)ident(positive)operator(\)) operator({) ident(value) operator(=) ident(value)operator(.)ident(negate)operator(()operator(\))operator(;) operator(}) ident(RubyNumeric) ident(result) operator(=) ident(bignorm)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2005 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Binding)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyBinding) directive(extends) ident(RubyObject) operator({) directive(private) pre_type(Binding) ident(binding)operator(;) directive(public) ident(RubyBinding)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(Binding) ident(binding)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) local_variable(this)operator(.)ident(binding) operator(=) ident(binding)operator(;) operator(}) directive(private) ident(RubyBinding)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(BINDING_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyBinding) ident(instance) operator(=) keyword(new) ident(RubyBinding)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createBindingClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(bindingClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(BINDING_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setBinding)operator(()ident(bindingClass)operator(\))operator(;) ident(bindingClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyBinding)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(bindingClass)operator(;) operator(}) directive(public) pre_type(Binding) ident(getBinding)operator(()operator(\)) operator({) keyword(return) ident(binding)operator(;) operator(}) comment(// Proc class) directive(public) directive(static) ident(RubyBinding) ident(newBinding)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Binding) ident(binding)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBinding)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getBinding)operator(()operator(\))operator(,) ident(binding)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyBinding) ident(newBinding)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) comment(// FIXME: We should be cloning, not reusing: frame, scope, dynvars, and potentially iter/block info) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) pre_type(Binding) ident(binding) operator(=) keyword(new) pre_type(Binding)operator(()ident(frame)operator(,) ident(context)operator(.)ident(getBindingRubyClass)operator(()operator(\))operator(,) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(\))operator(;) keyword(return) keyword(new) ident(RubyBinding)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getBinding)operator(()operator(\))operator(,) ident(binding)operator(\))operator(;) operator(}) comment(/** * Create a binding appropriate for a bare "eval", by using the previous (caller's\) frame and current * scope. */) directive(public) directive(static) ident(RubyBinding) ident(newBindingForEval)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) comment(// This requires some explaining. We use Frame values when executing blocks to fill in ) comment(// various values in ThreadContext and EvalState.eval like rubyClass, cref, and self.) comment(// Largely, for an eval that is using the logical binding at a place where the eval is ) comment(// called we mostly want to use the current frames value for this. Most importantly, ) comment(// we need that self (JRUBY-858\) at this point. We also need to make sure that returns) comment(// jump to the right place (which happens to be the previous frame\). Lastly, we do not) comment(// want the current frames klazz since that will be the klazz represented of self. We) comment(// want the class right before the eval (well we could use cref class for this too I think\).) comment(// Once we end up having Frames created earlier I think the logic of stuff like this will) comment(// be better since we won't be worried about setting Frame to setup other variables/stacks) comment(// but just making sure Frame itself is correct...) pre_type(Frame) ident(previousFrame) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(;) pre_type(Frame) ident(currentFrame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(currentFrame)operator(.)ident(setKlazz)operator(()ident(previousFrame)operator(.)ident(getKlazz)operator(()operator(\))operator(\))operator(;) comment(// Set jump target to whatever the previousTarget thinks is good.) comment(// currentFrame.setJumpTarget(previousFrame.getJumpTarget(\) != null ? previousFrame.getJumpTarget(\) : previousFrame\);) pre_type(Binding) ident(binding) operator(=) keyword(new) pre_type(Binding)operator(()ident(previousFrame)operator(,) ident(context)operator(.)ident(getBindingRubyClass)operator(()operator(\))operator(,) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(return) keyword(new) ident(RubyBinding)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getBinding)operator(()operator(\))operator(,) ident(binding)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) comment(// FIXME: We should be cloning, not reusing: frame, scope, dynvars, and potentially iter/block info) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(binding) operator(=) keyword(new) pre_type(Binding)operator(()ident(frame)operator(,) ident(context)operator(.)ident(getBindingRubyClass)operator(()operator(\))operator(,) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyBinding) ident(otherBinding) operator(=) operator(()ident(RubyBinding)operator(\))ident(other)operator(;) ident(binding) operator(=) ident(otherBinding)operator(.)ident(binding)operator(;) keyword(return) local_variable(this)operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) type(class) class(RubyBoolean) directive(extends) ident(RubyObject) operator({) directive(public) ident(RubyBoolean)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) operator(()ident(value) operator(?) ident(runtime)operator(.)ident(getTrueClass)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalseClass)operator(()operator(\))operator(\))operator(,) comment(// Don't initialize with class) pre_constant(false)operator(\))operator(;) comment(// Don't put in object space) keyword(if) operator(()operator(!)ident(value)operator(\)) ident(flags) operator(=) ident(FALSE_F)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(FALSE_F)operator(\)) operator(==) integer(0) operator(?) ident(ClassIndex)operator(.)ident(TRUE) operator(:) ident(ClassIndex)operator(.)ident(FALSE)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyClass) ident(getSingletonClass)operator(()operator(\)) operator({) keyword(return) ident(metaClass)operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) type(boolean)operator(.)ident(class)operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createFalseClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(falseClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setFalseClass)operator(()ident(falseClass)operator(\))operator(;) ident(falseClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(FALSE)operator(;) ident(falseClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(False)operator(.)ident(class)operator(\))operator(;) ident(falseClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) keyword(return) ident(falseClass)operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createTrueClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(trueClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setTrueClass)operator(()ident(trueClass)operator(\))operator(;) ident(trueClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(TRUE)operator(;) ident(trueClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(True)operator(.)ident(class)operator(\))operator(;) ident(trueClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) keyword(return) ident(trueClass)operator(;) operator(}) directive(public) directive(static) ident(RubyBoolean) ident(newBoolean)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(value)operator(\)) operator({) keyword(return) ident(value) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) type(class) class(False) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_and)operator(()ident(IRubyObject) ident(f)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(f)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_or)operator(()ident(IRubyObject) ident(f)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(oth)operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(f)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(f)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_xor)operator(()ident(IRubyObject) ident(f)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(oth)operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(f)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(f)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_to_s)operator(()ident(IRubyObject) ident(f)operator(\)) operator({) keyword(return) ident(f)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(True) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_and)operator(()ident(IRubyObject) ident(t)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(oth)operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(t) operator(:) ident(t)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_or)operator(()ident(IRubyObject) ident(t)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(t)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_xor)operator(()ident(IRubyObject) ident(t)operator(,) ident(IRubyObject) ident(oth)operator(\)) operator({) keyword(return) ident(oth)operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(t)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(t)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_to_s)operator(()ident(IRubyObject) ident(t)operator(\)) operator({) keyword(return) ident(t)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(public) ident(RubyFixnum) ident(id)operator(()operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(FALSE_F)operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) integer(2)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(taint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) type(void) ident(marshalTo)operator(()ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(write)operator(()ident(isTrue)operator(()operator(\)) operator(?) string operator(:) stringoperator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004-2005 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.Collection)operator(;) keyword(import) include(java.util.Collections)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.JavaMethod)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallSite)operator(;) keyword(import) include(org.jruby.runtime.CallSite.InlineCachingCallSite)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ObjectMarshal)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.collections.WeakHashSet)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyClass) directive(extends) ident(RubyModule) operator({) directive(public) directive(static) directive(final) type(int) ident(CS_IDX_INITIALIZE) operator(=) integer(0)operator(;) directive(public) directive(static) directive(final) pre_type(String)type([]) ident(CS_NAMES) operator(=) operator({) string operator(})operator(;) directive(private) directive(final) ident(CallSite)type([]) ident(baseCallSites) operator(=) keyword(new) ident(CallSite)operator([)ident(CS_NAMES)operator(.)ident(length)operator(])operator(;) operator({) keyword(for)operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(CS_NAMES)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(baseCallSites)operator([)ident(i)operator(]) operator(=) keyword(new) ident(InlineCachingCallSite)operator(()ident(CS_NAMES)operator([)ident(i)operator(])operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(\))operator(;) operator(}) operator(}) directive(private) ident(CallSite)type([]) ident(extraCallSites)operator(;) directive(public) directive(static) type(void) ident(createClassClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(classClass)operator(\)) operator({) ident(classClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(CLASS)operator(;) ident(classClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyClass)operator(;) operator(}) operator(})operator(;) ident(classClass)operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(classClass)operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(classClass)operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(classClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyClass)operator(.)ident(class)operator(\))operator(;) ident(classClass)operator(.)ident(addMethod)operator(()stringoperator(,) keyword(new) ident(SpecificArityNew)operator(()ident(classClass)operator(,) pre_type(Visibility)operator(.)ident(PUBLIC)operator(\))operator(\))operator(;) comment(// This is a non-standard method; have we decided to start extending Ruby?) comment(//classClass.defineFastMethod("subclasses", callbackFactory.getFastOptMethod("subclasses"\)\);) comment(// FIXME: for some reason this dispatcher causes a VerifyError...) comment(//classClass.dispatcher = callbackFactory.createDispatcher(classClass\);) operator(}) directive(public) directive(static) directive(final) ident(ObjectAllocator) ident(CLASS_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyClass) ident(clazz) operator(=) keyword(new) ident(RubyClass)operator(()ident(runtime)operator(\))operator(;) ident(clazz)operator(.)ident(allocator) operator(=) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(;) comment(// Class.allocate object is not allocatable before it is initialized) keyword(return) ident(clazz)operator(;) operator(}) operator(})operator(;) directive(public) ident(ObjectAllocator) ident(getAllocator)operator(()operator(\)) operator({) keyword(return) ident(allocator)operator(;) operator(}) directive(public) type(void) ident(setAllocator)operator(()ident(ObjectAllocator) ident(allocator)operator(\)) operator({) local_variable(this)operator(.)ident(allocator) operator(=) ident(allocator)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(allocate)operator(()operator(\)) operator({) keyword(if) operator(()ident(superClass) operator(==) pre_constant(null)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) ident(IRubyObject) ident(obj) operator(=) ident(allocator)operator(.)ident(allocate)operator(()ident(runtime)operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(obj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(getRealClass)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(public) ident(CallSite)type([]) ident(getBaseCallSites)operator(()operator(\)) operator({) keyword(return) ident(baseCallSites)operator(;) operator(}) directive(public) ident(CallSite)type([]) ident(getExtraCallSites)operator(()operator(\)) operator({) keyword(return) ident(extraCallSites)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(CLASS)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isModule)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isClass)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isSingleton)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** boot_defclass * Create an initial Object meta class before Module and Kernel dependencies have * squirreled themselves together. * * @param runtime we need it * @return a half-baked meta class for object */) directive(public) directive(static) ident(RubyClass) ident(createBootstrapClass)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(\)) operator({) ident(RubyClass) ident(obj)operator(;) keyword(if) operator(()ident(superClass) operator(==) pre_constant(null) operator(\)) operator({) comment(// boot the Object class ) ident(obj) operator(=) keyword(new) ident(RubyClass)operator(()ident(runtime)operator(\))operator(;) ident(obj)operator(.)ident(marshal) operator(=) ident(DEFAULT_OBJECT_MARSHAL)operator(;) operator(}) keyword(else) operator({) comment(// boot the Module and Class classes) ident(obj) operator(=) keyword(new) ident(RubyClass)operator(()ident(runtime)operator(,) ident(superClass)operator(\))operator(;) operator(}) ident(obj)operator(.)ident(setAllocator)operator(()ident(allocator)operator(\))operator(;) ident(obj)operator(.)ident(setBaseName)operator(()ident(name)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(private) ident(ObjectAllocator) ident(allocator)operator(;) comment(// the default allocator) directive(protected) ident(ObjectMarshal) ident(marshal)operator(;) directive(private) pre_type(Set)operator(<)ident(RubyClass)operator(>) ident(subclasses)operator(;) comment(/** separate path for MetaClass and IncludedModuleWrapper construction * (rb_class_boot version for MetaClasses\) * no marshal, allocator initialization and addSubclass(this\) here! */) directive(protected) ident(RubyClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(,) ident(objectSpace)operator(\))operator(;) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) local_variable(this)operator(.)ident(superClass) operator(=) ident(superClass)operator(;) comment(// this is the only case it might be null here (in MetaClass construction\)) operator(}) comment(/** used by CLASS_ALLOCATOR (any Class' class will be a Class!\) * also used to bootstrap Object class */) directive(protected) ident(RubyClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) ident(index) operator(=) ident(ClassIndex)operator(.)ident(CLASS)operator(;) operator(}) comment(/** rb_class_boot (for plain Classes\) * also used to bootstrap Module and Class classes */) directive(protected) ident(RubyClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClazz)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(\))operator(;) ident(superClass) operator(=) ident(superClazz)operator(;) ident(marshal) operator(=) ident(superClazz)operator(.)ident(marshal)operator(;) comment(// use parent's marshal) ident(superClazz)operator(.)ident(addSubclass)operator(()local_variable(this)operator(\))operator(;) ident(infectBy)operator(()ident(superClass)operator(\))operator(;) operator(}) comment(/** * A constructor which allows passing in an array of supplementary call sites. */) directive(protected) ident(RubyClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClazz)operator(,) ident(CallSite)type([]) ident(extraCallSites)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(\))operator(;) local_variable(this)operator(.)ident(superClass) operator(=) ident(superClazz)operator(;) local_variable(this)operator(.)ident(marshal) operator(=) ident(superClazz)operator(.)ident(marshal)operator(;) comment(// use parent's marshal) ident(superClazz)operator(.)ident(addSubclass)operator(()local_variable(this)operator(\))operator(;) local_variable(this)operator(.)ident(extraCallSites) operator(=) ident(extraCallSites)operator(;) ident(infectBy)operator(()ident(superClass)operator(\))operator(;) operator(}) comment(/** * Construct a new class with the given name scoped under Object (global\) * and with Object as its immediate superclass. * Corresponds to rb_class_new in MRI. */) directive(public) directive(static) ident(RubyClass) ident(newClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(\)) operator({) keyword(if) operator(()ident(superClass) operator(==) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(superClass)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(return) keyword(new) ident(RubyClass)operator(()ident(runtime)operator(,) ident(superClass)operator(\))operator(;) operator(}) comment(/** * A variation on newClass that allow passing in an array of supplementary * call sites to improve dynamic invocation. */) directive(public) directive(static) ident(RubyClass) ident(newClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(CallSite)type([]) ident(extraCallSites)operator(\)) operator({) keyword(if) operator(()ident(superClass) operator(==) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(superClass)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(return) keyword(new) ident(RubyClass)operator(()ident(runtime)operator(,) ident(superClass)operator(,) ident(extraCallSites)operator(\))operator(;) operator(}) comment(/** * Construct a new class with the given name, allocator, parent class, * and containing class. If setParent is true, the class's parent will be * explicitly set to the provided parent (rather than the new class just * being assigned to a constant in that parent\). * Corresponds to rb_class_new/rb_define_class_id/rb_name_class/rb_set_class_path * in MRI. */) directive(public) directive(static) ident(RubyClass) ident(newClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(,) pre_type(String) ident(name)operator(,) ident(ObjectAllocator) ident(allocator)operator(,) ident(RubyModule) ident(parent)operator(,) type(boolean) ident(setParent)operator(\)) operator({) ident(RubyClass) ident(clazz) operator(=) ident(newClass)operator(()ident(runtime)operator(,) ident(superClass)operator(\))operator(;) ident(clazz)operator(.)ident(setBaseName)operator(()ident(name)operator(\))operator(;) ident(clazz)operator(.)ident(setAllocator)operator(()ident(allocator)operator(\))operator(;) ident(clazz)operator(.)ident(makeMetaClass)operator(()ident(superClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(setParent)operator(\)) ident(clazz)operator(.)ident(setParent)operator(()ident(parent)operator(\))operator(;) ident(parent)operator(.)ident(setConstant)operator(()ident(name)operator(,) ident(clazz)operator(\))operator(;) ident(clazz)operator(.)ident(inherit)operator(()ident(superClass)operator(\))operator(;) keyword(return) ident(clazz)operator(;) operator(}) comment(/** * A variation on newClass that allows passing in an array of supplementary * call sites to improve dynamic invocation performance. */) directive(public) directive(static) ident(RubyClass) ident(newClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(superClass)operator(,) pre_type(String) ident(name)operator(,) ident(ObjectAllocator) ident(allocator)operator(,) ident(RubyModule) ident(parent)operator(,) type(boolean) ident(setParent)operator(,) ident(CallSite)type([]) ident(extraCallSites)operator(\)) operator({) ident(RubyClass) ident(clazz) operator(=) ident(newClass)operator(()ident(runtime)operator(,) ident(superClass)operator(,) ident(extraCallSites)operator(\))operator(;) ident(clazz)operator(.)ident(setBaseName)operator(()ident(name)operator(\))operator(;) ident(clazz)operator(.)ident(setAllocator)operator(()ident(allocator)operator(\))operator(;) ident(clazz)operator(.)ident(makeMetaClass)operator(()ident(superClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(setParent)operator(\)) ident(clazz)operator(.)ident(setParent)operator(()ident(parent)operator(\))operator(;) ident(parent)operator(.)ident(setConstant)operator(()ident(name)operator(,) ident(clazz)operator(\))operator(;) ident(clazz)operator(.)ident(inherit)operator(()ident(superClass)operator(\))operator(;) keyword(return) ident(clazz)operator(;) operator(}) comment(/** rb_make_metaclass * */) annotation(@Override) directive(public) ident(RubyClass) ident(makeMetaClass)operator(()ident(RubyClass) ident(superClass)operator(\)) operator({) keyword(if) operator(()ident(isSingleton)operator(()operator(\))operator(\)) operator({) comment(// could be pulled down to RubyClass in future) ident(MetaClass) ident(klass) operator(=) keyword(new) ident(MetaClass)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(superClass)operator(\))operator(;) comment(// rb_class_boot) ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) ident(klass)operator(.)ident(setAttached)operator(()local_variable(this)operator(\))operator(;) ident(klass)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) ident(klass)operator(.)ident(setSuperClass)operator(()ident(getSuperClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) keyword(return) ident(klass)operator(;) operator(}) keyword(else) operator({) keyword(return) local_variable(super)operator(.)ident(makeMetaClass)operator(()ident(superClass)operator(\))operator(;) operator(}) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) type(int) ident(methodIndex)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(invoke)operator(()ident(context)operator(,) ident(self)operator(,) ident(name)operator(,) ident(args)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(notVisibleAndNotMethodMissing)operator(()ident(DynamicMethod) ident(method)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(caller)operator(,) ident(CallType) ident(callType)operator(\)) operator({) keyword(return) operator(!)ident(method)operator(.)ident(isCallableFrom)operator(()ident(caller)operator(,) ident(callType)operator(\)) operator(&&) operator(!)ident(name)operator(.)ident(equals)operator(()stringoperator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(assert) ident(args) operator(!=) pre_constant(null)operator(;) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(args)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(assert) ident(args) operator(!=) pre_constant(null)operator(;) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(args)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(CallType) ident(callType)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(CallType) ident(callType)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(CallType) ident(callType)operator(\)) operator({) keyword(assert) ident(args) operator(!=) pre_constant(null)operator(;) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(args)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(assert) ident(args) operator(!=) pre_constant(null)operator(;) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(args)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(CallType) ident(callType)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(CallType) ident(callType)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(CallType) ident(callType)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(caller) operator(=) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(caller)operator(,) ident(callType)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finvoke)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(shouldCallMethodMissing)operator(()ident(method)operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(\))operator(;) operator(}) directive(private) type(boolean) ident(shouldCallMethodMissing)operator(()ident(DynamicMethod) ident(method)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(;) operator(}) directive(private) type(boolean) ident(shouldCallMethodMissing)operator(()ident(DynamicMethod) ident(method)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(caller)operator(,) ident(CallType) ident(callType)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(isUndefined)operator(()operator(\)) operator(||) ident(notVisibleAndNotMethodMissing)operator(()ident(method)operator(,) ident(name)operator(,) ident(caller)operator(,) ident(callType)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(invokeInherited)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(subclass)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(searchMethod)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) ident(self)operator(,) ident(method)operator(,) stringoperator(,) ident(subclass)operator(,) ident(context)operator(.)ident(getFrameSelf)operator(()operator(\))operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(self)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) stringoperator(,) ident(subclass)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) comment(/** rb_class_new_instance * */) directive(public) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) ident(allocate)operator(()operator(\))operator(;) ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) comment(// TODO: replace this with a smarter generated invoker that can handle 0-N args) directive(public) directive(static) type(class) class(SpecificArityNew) directive(extends) ident(JavaMethod) operator({) directive(public) ident(SpecificArityNew)operator(()ident(RubyModule) ident(implClass)operator(,) pre_type(Visibility) ident(visibility)operator(\)) operator({) local_variable(super)operator(()ident(implClass)operator(,) ident(visibility)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(cls) operator(=) operator(()ident(RubyClass)operator(\))ident(self)operator(;) ident(IRubyObject) ident(obj) operator(=) ident(cls)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(cls)operator(.)ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(cls) operator(=) operator(()ident(RubyClass)operator(\))ident(self)operator(;) ident(IRubyObject) ident(obj) operator(=) ident(cls)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(cls)operator(.)ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(cls) operator(=) operator(()ident(RubyClass)operator(\))ident(self)operator(;) ident(IRubyObject) ident(obj) operator(=) ident(cls)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(cls)operator(.)ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(cls) operator(=) operator(()ident(RubyClass)operator(\))ident(self)operator(;) ident(IRubyObject) ident(obj) operator(=) ident(cls)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(cls)operator(.)ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(cls) operator(=) operator(()ident(RubyClass)operator(\))ident(self)operator(;) ident(IRubyObject) ident(obj) operator(=) ident(cls)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(cls)operator(.)ident(baseCallSites)operator([)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) operator(}) comment(/** rb_class_initialize * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(superClass) operator(!=) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(superObject)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(superObject) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(superObject) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(checkInheritable)operator(()ident(superObject)operator(\))operator(;) operator(}) ident(RubyClass) ident(superClazz) operator(=) operator(()ident(RubyClass)operator(\)) ident(superObject)operator(;) ident(superClass) operator(=) ident(superClazz)operator(;) ident(allocator) operator(=) ident(superClazz)operator(.)ident(allocator)operator(;) ident(makeMetaClass)operator(()ident(superClazz)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) ident(marshal) operator(=) ident(superClazz)operator(.)ident(marshal)operator(;) ident(superClazz)operator(.)ident(addSubclass)operator(()local_variable(this)operator(\))operator(;) local_variable(super)operator(.)ident(initialize)operator(()ident(block)operator(\))operator(;) ident(inherit)operator(()ident(superClazz)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_class_init_copy * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\))operator({) keyword(if) operator(()ident(superClass) operator(!=) pre_constant(null)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(original) keyword(instanceof) ident(MetaClass)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) local_variable(super)operator(.)ident(initialize_copy)operator(()ident(original)operator(\))operator(;) ident(allocator) operator(=) operator(()operator(()ident(RubyClass)operator(\))ident(original)operator(\))operator(.)ident(allocator)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(// TODO: Someday, enable.) comment(// @JRubyMethod(name = "subclasses", optional = 1\)) directive(public) ident(IRubyObject) ident(subclasses)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(boolean) ident(recursive) operator(=) pre_constant(false)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyBoolean)operator(\)) operator({) ident(recursive) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(subclasses)operator(()ident(recursive)operator(\))operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) operator(}) directive(public) pre_type(Collection) ident(subclasses)operator(()type(boolean) ident(includeDescendants)operator(\)) operator({) keyword(if) operator(()ident(subclasses) operator(!=) pre_constant(null)operator(\)) operator({) pre_type(Collection)operator(<)ident(RubyClass)operator(>) ident(mine) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(RubyClass)operator(>)operator(()ident(subclasses)operator(\))operator(;) keyword(if) operator(()ident(includeDescendants)operator(\)) operator({) keyword(for) operator(()ident(RubyClass) ident(i)operator(:) ident(subclasses)operator(\)) operator({) ident(mine)operator(.)ident(addAll)operator(()ident(i)operator(.)ident(subclasses)operator(()ident(includeDescendants)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(mine)operator(;) operator(}) keyword(else) operator({) keyword(return) pre_type(Collections)operator(.)ident(EMPTY_LIST)operator(;) operator(}) operator(}) directive(public) directive(synchronized) type(void) ident(addSubclass)operator(()ident(RubyClass) ident(subclass)operator(\)) operator({) keyword(if) operator(()ident(subclasses) operator(==) pre_constant(null)operator(\)) ident(subclasses) operator(=) keyword(new) ident(WeakHashSet)operator(<)ident(RubyClass)operator(>)operator(()operator(\))operator(;) ident(subclasses)operator(.)ident(add)operator(()ident(subclass)operator(\))operator(;) operator(}) directive(public) ident(Ruby) ident(getClassRuntime)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(;) operator(}) directive(public) ident(RubyClass) ident(getRealClass)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(inherited)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_class_inherited (reversed semantics!\) * */) directive(public) type(void) ident(inherit)operator(()ident(RubyClass) ident(superClazz)operator(\)) operator({) keyword(if) operator(()ident(superClazz) operator(==) pre_constant(null)operator(\)) ident(superClazz) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) ident(superClazz)operator(.)ident(invokeInherited)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(superClazz)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** Return the real super class of this class. * * rb_class_superclass * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(superclass)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyClass) ident(superClazz) operator(=) ident(superClass)operator(;) keyword(if) operator(()ident(superClazz) operator(==) pre_constant(null)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(isSingleton)operator(()operator(\))operator(\)) ident(superClazz) operator(=) ident(metaClass)operator(;) keyword(while) operator(()ident(superClazz) operator(!=) pre_constant(null) operator(&&) ident(superClazz)operator(.)ident(isIncluded)operator(()operator(\))operator(\)) ident(superClazz) operator(=) ident(superClazz)operator(.)ident(superClass)operator(;) keyword(return) ident(superClazz) operator(!=) pre_constant(null) operator(?) ident(superClazz) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_check_inheritable * */) directive(public) directive(static) type(void) ident(checkInheritable)operator(()ident(IRubyObject) ident(superClass)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(superClass) keyword(instanceof) ident(RubyClass)operator(\))operator(\)) operator({) keyword(throw) ident(superClass)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(superClass)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(()operator(()ident(RubyClass)operator(\))ident(superClass)operator(\))operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(superClass)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(public) directive(final) ident(ObjectMarshal) ident(getMarshal)operator(()operator(\)) operator({) keyword(return) ident(marshal)operator(;) operator(}) directive(public) directive(final) type(void) ident(setMarshal)operator(()ident(ObjectMarshal) ident(marshal)operator(\)) operator({) local_variable(this)operator(.)ident(marshal) operator(=) ident(marshal)operator(;) operator(}) directive(public) directive(final) type(void) ident(marshal)operator(()pre_type(Object) ident(obj)operator(,) ident(MarshalStream) ident(marshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(getMarshal)operator(()operator(\))operator(.)ident(marshalTo)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(obj)operator(,) local_variable(this)operator(,) ident(marshalStream)operator(\))operator(;) operator(}) directive(public) directive(final) pre_type(Object) ident(unmarshal)operator(()ident(UnmarshalStream) ident(unmarshalStream)operator(\)) directive(throws) exception(IOException) operator({) keyword(return) ident(getMarshal)operator(()operator(\))operator(.)ident(unmarshalFrom)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) ident(unmarshalStream)operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyClass) ident(clazz)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(clazz)operator(\))operator(;) ident(output)operator(.)ident(writeString)operator(()ident(MarshalStream)operator(.)ident(getPathFromClass)operator(()ident(clazz)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) pre_type(String) ident(name) operator(=) ident(RubyString)operator(.)ident(byteListToString)operator(()ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(\))operator(;) ident(RubyClass) ident(result) operator(=) ident(UnmarshalStream)operator(.)ident(getClassFromPath)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(protected) directive(static) directive(final) ident(ObjectMarshal) ident(DEFAULT_OBJECT_MARSHAL) operator(=) keyword(new) ident(ObjectMarshal)operator(()operator(\)) operator({) directive(public) type(void) ident(marshalTo)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Object) ident(obj)operator(,) ident(RubyClass) ident(type)operator(,) ident(MarshalStream) ident(marshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(IRubyObject) ident(object) operator(=) operator(()ident(IRubyObject)operator(\))ident(obj)operator(;) ident(marshalStream)operator(.)ident(registerLinkTarget)operator(()ident(object)operator(\))operator(;) ident(marshalStream)operator(.)ident(dumpVariables)operator(()ident(object)operator(.)ident(getVariableList)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(unmarshalFrom)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(,) ident(UnmarshalStream) ident(unmarshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(IRubyObject) ident(result) operator(=) ident(type)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(unmarshalStream)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) ident(unmarshalStream)operator(.)ident(defaultVariablesUnmarshal)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) operator(})operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.File)operator(;) keyword(import) include(java.net.MalformedURLException)operator(;) keyword(import) include(java.net.URL)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * @author Ola Bini */) directive(public) type(class) class(RubyClassPathVariable) directive(extends) ident(RubyObject) operator({) directive(public) directive(static) type(void) ident(createClassPathVariable)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClassPathVariable) ident(self) operator(=) keyword(new) ident(RubyClassPathVariable)operator(()ident(runtime)operator(\))operator(;) ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(.)ident(extend_object)operator(()ident(self)operator(\))operator(;) ident(runtime)operator(.)ident(defineReadonlyVariable)operator(()stringoperator(,) ident(self)operator(\))operator(;) ident(self)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyClassPathVariable)operator(.)ident(class)operator(\))operator(;) operator(}) directive(private) ident(RubyClassPathVariable)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(append)operator(()ident(IRubyObject) ident(obj)operator(\)) directive(throws) exception(Exception) operator({) pre_type(String) ident(ss) operator(=) ident(obj)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(URL) ident(url) operator(=) ident(getURL)operator(()ident(ss)operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(.)ident(addURL)operator(()ident(url)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(private) pre_type(URL) ident(getURL)operator(()pre_type(String) ident(target)operator(\)) directive(throws) exception(MalformedURLException) operator({) keyword(if)operator(()ident(target)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) keyword(new) pre_type(File)operator(()ident(target)operator(\))operator(.)ident(toURI)operator(()operator(\))operator(.)ident(toURL)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) keyword(new) pre_type(URL)operator(()ident(target)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(size)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(.)ident(getURLs)operator(()operator(\))operator(.)ident(length)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(Block) ident(block)operator(\)) operator({) pre_type(URL)type([]) ident(urls) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(.)ident(getURLs)operator(()operator(\))operator(;) ident(ThreadContext) ident(ctx) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(,)ident(j)operator(=)ident(urls)operator(.)ident(length)operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(urls)operator([)ident(i)operator(])operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(.)ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(.)ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) operator(})comment(// RubyClassPathVariable) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2004 Anders Bengtsson * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2006 Thomas E Enebo * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** Implementation of the Comparable module. * */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyComparable) operator({) directive(public) directive(static) ident(RubyModule) ident(createComparable)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(comparableModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setComparable)operator(()ident(comparableModule)operator(\))operator(;) ident(comparableModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyComparable)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(comparableModule)operator(;) operator(}) comment(/* ================ * Utility Methods * ================ */) comment(/** rb_cmpint * */) directive(public) directive(static) type(int) ident(cmpint)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(val)operator(,) ident(IRubyObject) ident(a)operator(,) ident(IRubyObject) ident(b)operator(\)) operator({) keyword(if) operator(()ident(val)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(cmperr)operator(()ident(a)operator(,) ident(b)operator(\))operator(;) keyword(if) operator(()ident(val) keyword(instanceof) ident(RubyFixnum)operator(\)) keyword(return) ident(RubyNumeric)operator(.)ident(fix2int)operator(()operator(()ident(RubyFixnum)operator(\)) ident(val)operator(\))operator(;) keyword(if) operator(()ident(val) keyword(instanceof) ident(RubyBignum)operator(\)) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(val)operator(\))operator(.)ident(getValue)operator(()operator(\))operator(.)ident(signum)operator(()operator(\)) operator(==) operator(-)integer(1) operator(?) integer(1) operator(:) operator(-)integer(1)operator(;) ident(RubyFixnum) ident(zero) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(val)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_GT)operator(,) string)delimiter(")>operator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(return) integer(1)operator(;) keyword(if) operator(()ident(val)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(return) operator(-)integer(1)operator(;) keyword(return) integer(0)operator(;) operator(}) comment(/** rb_cmperr * */) directive(public) directive(static) ident(IRubyObject) ident(cmperr)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(target)operator(;) keyword(if) operator(()ident(other)operator(.)ident(isImmediate)operator(()operator(\)) operator(||) operator(!)operator(()ident(other)operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(other)operator(.)ident(isTrue)operator(()operator(\)) operator(||) ident(other) operator(==) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(\))operator(\)) operator({) ident(target) operator(=) ident(other)operator(.)ident(inspect)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(target) operator(=) ident(other)operator(.)ident(getType)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(recv)operator(.)ident(getType)operator(()operator(\)) operator(+) string operator(+) ident(target) operator(+) stringoperator(\))operator(;) operator(}) comment(/* ================ * Module Methods * ================ */) comment(/** cmp_equal (cmp_eq inlined here\) * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(recv) operator(==) ident(other)operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(try) operator({) ident(IRubyObject) ident(result) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(runtime)operator(,) ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(recv)operator(,) ident(other)operator(\)) operator(==) integer(0)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(e)operator(.)ident(getException)operator(()operator(\))operator(.)ident(kind_of_p)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getStandardError)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(e)operator(;) operator(}) operator(}) operator(}) comment(/** cmp_gt * */) comment(// <=> may return nil in many circumstances, e.g. 3 <=> NaN ) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(cmperr)operator(()ident(recv)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(recv)operator(,) ident(other)operator(\)) operator(>) integer(0)operator(\))operator(;) operator(}) comment(/** cmp_ge * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(cmperr)operator(()ident(recv)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(recv)operator(,) ident(other)operator(\)) operator(>=) integer(0)operator(\))operator(;) operator(}) comment(/** cmp_lt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(cmperr)operator(()ident(recv)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(recv)operator(,) ident(other)operator(\)) operator(<) integer(0)operator(\))operator(;) operator(}) comment(/** cmp_le * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(cmperr)operator(()ident(recv)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(recv)operator(,) ident(other)operator(\)) operator(<=) integer(0)operator(\))operator(;) operator(}) comment(/** cmp_between * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(between_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(first)operator(,) ident(IRubyObject) ident(second)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(op_lt)operator(()ident(context)operator(,) ident(recv)operator(,) ident(first)operator(\))operator(.)ident(isFalse)operator(()operator(\)) operator(&&) ident(op_gt)operator(()ident(context)operator(,) ident(recv)operator(,) ident(second)operator(\))operator(.)ident(isFalse)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_abs)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_abs2)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_add)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_arg)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_conjugate)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_denominator)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_div)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_divmod)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_equal_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_exact_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_expt)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_gt_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_inspect)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_lcm)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_mul)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_negate)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_negative_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_numerator)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_one_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_polar)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_quo)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_scalar_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_sub)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_f)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_i)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_r)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_s)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_xor)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_zero_p)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.Numeric)operator(;) comment(/** * 1.9 complex.c as of revision: 18876 */) annotation(@JRubyClass)operator(()ident(name) operator(=) stringoperator(,) ident(parent) operator(=) stringoperator(\)) directive(public) type(class) class(RubyComplex) directive(extends) ident(RubyNumeric) operator({) directive(public) directive(static) ident(RubyClass) ident(createComplexClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(complexc) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(,) ident(COMPLEX_ALLOCATOR)operator(\))operator(;) comment(// because one can Complex.send(:allocate\)) ident(runtime)operator(.)ident(setComplex)operator(()ident(complexc)operator(\))operator(;) ident(complexc)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(COMPLEX)operator(;) ident(complexc)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyComplex)operator(;) operator(}) operator(})operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(complexc)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(\))operator(;) ident(complexc)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyComplex)operator(.)ident(class)operator(\))operator(;) pre_type(String)type([])ident(undefined) operator(=) operator({)stringoperator(,) stringoperator(,) string)delimiter(")>operator(,) string)delimiter(")>operator(,) string=)delimiter(")>operator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(;) keyword(for) operator(()pre_type(String) ident(undef) operator(:) ident(undefined)operator(\)) operator({) ident(complexc)operator(.)ident(undefineMethod)operator(()ident(undef)operator(\))operator(;) operator(}) ident(complexc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyComplex)operator(.)ident(newComplexConvert)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) keyword(return) ident(complexc)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(COMPLEX_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(})operator(;) comment(/** internal * */) directive(private) ident(RubyComplex)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(real)operator(,) ident(IRubyObject) ident(image)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\))ident(clazz)operator(\))operator(;) local_variable(this)operator(.)ident(real) operator(=) ident(real)operator(;) local_variable(this)operator(.)ident(image) operator(=) ident(image)operator(;) operator(}) comment(/** rb_complex_raw * */) directive(static) ident(RubyComplex) ident(newComplexRaw)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(x)operator(,) ident(RubyObject) ident(y)operator(\)) operator({) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** rb_complex_raw1 * */) directive(static) ident(RubyComplex) ident(newComplexRaw)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) comment(/** rb_complex_new1 * */) directive(public) directive(static) ident(IRubyObject) ident(newComplexCanonicalize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newComplexCanonicalize)operator(()ident(context)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_complex_new * */) directive(public) directive(static) ident(IRubyObject) ident(newComplexCanonicalize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** rb_complex_polar * */) directive(static) ident(IRubyObject) ident(newComplexPolar)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(return) ident(polar)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_complex_new1 * */) directive(static) ident(IRubyObject) ident(newComplex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** f_complex_new2 * */) directive(static) ident(IRubyObject) ident(newComplex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) operator(!)operator(()ident(x) keyword(instanceof) ident(RubyComplex)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_complex_new_bang2 * */) directive(static) ident(RubyComplex) ident(newComplexBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyComplex) operator(&&) ident(y) keyword(instanceof) ident(RubyComplex)operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_complex_new_bang1 * */) directive(public) directive(static) ident(RubyComplex) ident(newComplexBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyComplex)operator(;) keyword(return) ident(newComplexBang)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(real)operator(;) directive(private) ident(IRubyObject) ident(image)operator(;) ident(IRubyObject) ident(getImage)operator(()operator(\)) operator({) keyword(return) ident(image)operator(;) operator(}) ident(IRubyObject) ident(getReal)operator(()operator(\)) operator({) keyword(return) ident(real)operator(;) operator(}) comment(/** m_cos * */) directive(private) directive(static) ident(IRubyObject) ident(m_cos)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(x)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(return) ident(RubyMath)operator(.)ident(cos)operator(()ident(x)operator(,) ident(x)operator(\))operator(;) ident(RubyComplex) ident(complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(x)operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(RubyMath)operator(.)ident(cos)operator(()ident(x)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(,) ident(RubyMath)operator(.)ident(cosh)operator(()ident(x)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(RubyMath)operator(.)ident(sin)operator(()ident(x)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(\))operator(,) ident(RubyMath)operator(.)ident(sinh)operator(()ident(x)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** m_sin * */) directive(private) directive(static) ident(IRubyObject) ident(m_sin)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(x)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(return) ident(RubyMath)operator(.)ident(sin)operator(()ident(x)operator(,) ident(x)operator(\))operator(;) ident(RubyComplex) ident(complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(x)operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(RubyMath)operator(.)ident(sin)operator(()ident(x)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(,) ident(RubyMath)operator(.)ident(cosh)operator(()ident(x)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(RubyMath)operator(.)ident(cos)operator(()ident(x)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(,) ident(RubyMath)operator(.)ident(sinh)operator(()ident(x)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** m_sqrt * */) directive(private) directive(static) ident(IRubyObject) ident(m_sqrt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(x)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)ident(f_negative_p)operator(()ident(context)operator(,) ident(x)operator(\))operator(\)) keyword(return) ident(RubyMath)operator(.)ident(sqrt)operator(()ident(x)operator(,) ident(x)operator(\))operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(RubyMath)operator(.)ident(sqrt)operator(()ident(x)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(x)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyComplex) ident(complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(x)operator(;) keyword(if) operator(()ident(f_negative_p)operator(()ident(context)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(\)) operator({) keyword(return) ident(f_conjugate)operator(()ident(context)operator(,) ident(m_sqrt)operator(()ident(context)operator(,) ident(f_conjugate)operator(()ident(context)operator(,) ident(x)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(a) operator(=) ident(f_abs)operator(()ident(context)operator(,) ident(x)operator(\))operator(;) ident(IRubyObject) ident(two) operator(=) ident(RubyFixnum)operator(.)ident(two)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(RubyMath)operator(.)ident(sqrt)operator(()ident(x)operator(,) ident(f_div)operator(()ident(context)operator(,) ident(f_add)operator(()ident(context)operator(,) ident(a)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(,) ident(two)operator(\))operator(\))operator(,) ident(RubyMath)operator(.)ident(sqrt)operator(()ident(x)operator(,) ident(f_div)operator(()ident(context)operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(a)operator(,) ident(complex)operator(.)ident(real)operator(\))operator(,) ident(two)operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** nucomp_s_new_bang * */) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(newInstanceBang)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(newInstanceBang)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(real)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(real) keyword(instanceof) ident(RubyNumeric)operator(\))operator(\)) ident(real) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(recv)operator(,) ident(real)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(real)operator(,) ident(IRubyObject) ident(image)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(real) keyword(instanceof) ident(RubyNumeric)operator(\))operator(\)) ident(real) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(image) keyword(instanceof) ident(RubyNumeric)operator(\))operator(\)) ident(image) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(image)operator(\))operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(recv)operator(,) ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) comment(/** nucomp_real_check (might go to bimorphic\) * */) directive(private) directive(static) type(void) ident(realCheck)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(num)operator(\)) operator({) keyword(switch) operator(()ident(num)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) keyword(break)operator(;) keyword(default)operator(:) keyword(if) operator(()operator(!)operator(()ident(num) keyword(instanceof) ident(RubyNumeric) operator(\)) operator(||) operator(!)ident(f_scalar_p)operator(()ident(context)operator(,) ident(num)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(/** nucomp_s_canonicalize_internal * */) directive(private) directive(static) directive(final) type(boolean) ident(CL_CANNON) operator(=) pre_constant(true)operator(;) directive(private) directive(static) ident(IRubyObject) ident(canonicalizeInternal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(real)operator(,) ident(IRubyObject) ident(image)operator(\)) operator({) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(image)operator(\)) operator(&&) operator(()operator(()ident(RubyModule)operator(\))ident(clazz)operator(\))operator(.)ident(fastHasConstant)operator(()stringoperator(\)) operator(&&) operator(()operator(!)ident(CL_CANNON) operator(||) operator(()operator(!)operator(()ident(real) keyword(instanceof) ident(RubyFloat)operator(\)) operator(&&) operator(!)operator(()ident(image) keyword(instanceof) ident(RubyFloat)operator(\))operator(\))operator(\))operator(\)) operator({) keyword(return) ident(real)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(real)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(real)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(RubyComplex) ident(complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(image)operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(real)operator(,) ident(complex)operator(.)ident(image)operator(\))operator(,) ident(f_add)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(complex)operator(.)ident(real)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(f_scalar_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(RubyComplex) ident(complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(real)operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(complex)operator(.)ident(real)operator(,) ident(f_add)operator(()ident(context)operator(,) ident(complex)operator(.)ident(image)operator(,) ident(image)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyComplex) ident(complex1) operator(=) operator(()ident(RubyComplex)operator(\))ident(real)operator(;) ident(RubyComplex) ident(complex2) operator(=) operator(()ident(RubyComplex)operator(\))ident(image)operator(;) keyword(return) keyword(new) ident(RubyComplex)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(complex1)operator(.)ident(real)operator(,) ident(complex2)operator(.)ident(image)operator(\))operator(,) ident(f_add)operator(()ident(context)operator(,) ident(complex1)operator(.)ident(image)operator(,) ident(complex2)operator(.)ident(real)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** nucomp_s_new * */) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(real)operator(\)) operator({) ident(realCheck)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(recv)operator(,) ident(real)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(real)operator(,) ident(IRubyObject) ident(image)operator(\)) operator({) ident(realCheck)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) ident(realCheck)operator(()ident(context)operator(,) ident(image)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(recv)operator(,) ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) comment(/** f_complex_polar * */) directive(private) directive(static) ident(IRubyObject) ident(f_complex_polar)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) operator(!)operator(()ident(x) keyword(instanceof) ident(RubyComplex)operator(\)) operator(&&) operator(!)operator(()ident(y) keyword(instanceof) ident(RubyComplex)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(x)operator(,) ident(m_cos)operator(()ident(context)operator(,) ident(y)operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(x)operator(,) ident(m_sin)operator(()ident(context)operator(,) ident(y)operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_s_polar * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(polar)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(abs)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(f_complex_polar)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(abs)operator(,) ident(arg)operator(\))operator(;) operator(}) comment(/** rb_Complex1 * */) directive(public) directive(static) ident(IRubyObject) ident(newComplexConvert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newComplexConvert)operator(()ident(context)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_Complex/rb_Complex2 * */) directive(public) directive(static) ident(IRubyObject) ident(newComplexConvert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** nucomp_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(IRubyObject) ident(nil) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(nil)operator(,) ident(nil)operator(\))operator(;) operator(}) comment(/** nucomp_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(\)) operator({) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(,) ident(IRubyObject) ident(a2)operator(\)) operator({) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(convertCommon)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(,) ident(IRubyObject) ident(a2)operator(\)) operator({) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(IRubyObject) ident(backref) operator(=) ident(frame)operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(backref) operator(!=) pre_constant(null) operator(&&) ident(backref) keyword(instanceof) ident(RubyMatchData)operator(\)) operator(()operator(()ident(RubyMatchData)operator(\))ident(backref)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyString)operator(\)) ident(a1) operator(=) ident(str_to_c_strict)operator(()ident(context)operator(,) ident(a1)operator(\))operator(;) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyString)operator(\)) ident(a2) operator(=) ident(str_to_c_strict)operator(()ident(context)operator(,) ident(a2)operator(\))operator(;) ident(frame)operator(.)ident(setBackRef)operator(()ident(backref)operator(\))operator(;) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(a1Complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(a1)operator(;) keyword(if) operator(()operator(!)operator(()ident(a1Complex)operator(.)ident(image) keyword(instanceof) ident(RubyFloat)operator(\)) operator(&&) ident(f_zero_p)operator(()ident(context)operator(,) ident(a1Complex)operator(.)ident(image)operator(\))operator(\)) operator({) ident(a1) operator(=) ident(a1Complex)operator(.)ident(real)operator(;) operator(}) operator(}) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(a2Complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(a2)operator(;) keyword(if) operator(()operator(!)operator(()ident(a2Complex)operator(.)ident(image) keyword(instanceof) ident(RubyFloat)operator(\)) operator(&&) ident(f_zero_p)operator(()ident(context)operator(,) ident(a2Complex)operator(.)ident(image)operator(\))operator(\)) operator({) ident(a2) operator(=) ident(a2Complex)operator(.)ident(real)operator(;) operator(}) operator(}) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) keyword(if) operator(()ident(a2)operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(f_zero_p)operator(()ident(context)operator(,) ident(a2)operator(\))operator(\)) keyword(return) ident(a1)operator(;) operator(}) keyword(return) ident(a2)operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(\)) operator(:) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) comment(/** nucomp_real * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(real)operator(()operator(\)) operator({) keyword(return) ident(real)operator(;) operator(}) comment(/** nucomp_image * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(image)operator(()operator(\)) operator({) keyword(return) ident(image)operator(;) operator(}) comment(/** nucomp_add * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_add)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_add)operator(()ident(context)operator(,) ident(real)operator(,) ident(otherComplex)operator(.)ident(real)operator(\))operator(,) ident(f_add)operator(()ident(context)operator(,) ident(image)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_add)operator(()ident(context)operator(,) ident(real)operator(,) ident(other)operator(\))operator(,) ident(image)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_sub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(real)operator(,) ident(otherComplex)operator(.)ident(real)operator(\))operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(image)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(real)operator(,) ident(other)operator(\))operator(,) ident(image)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_mul * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) ident(IRubyObject) ident(realp) operator(=) ident(f_sub)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(real)operator(,) ident(otherComplex)operator(.)ident(real)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(image)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(\))operator(;) ident(IRubyObject) ident(imagep) operator(=) ident(f_add)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(real)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(image)operator(,) ident(otherComplex)operator(.)ident(real)operator(\))operator(\))operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(realp)operator(,) ident(imagep)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(real)operator(,) ident(other)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(image)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_div * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) keyword(if) operator(()ident(real) keyword(instanceof) ident(RubyFloat) operator(||) ident(image) keyword(instanceof) ident(RubyFloat) operator(||) ident(otherComplex)operator(.)ident(real) keyword(instanceof) ident(RubyFloat) operator(||) ident(otherComplex)operator(.)ident(image) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(IRubyObject) ident(magn) operator(=) ident(RubyMath)operator(.)ident(hypot)operator(()local_variable(this)operator(,) ident(otherComplex)operator(.)ident(real)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(;) ident(IRubyObject) ident(tmp) operator(=) ident(newComplexBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_quo)operator(()ident(context)operator(,) ident(otherComplex)operator(.)ident(real)operator(,) ident(magn)operator(\))operator(,) ident(f_quo)operator(()ident(context)operator(,) ident(otherComplex)operator(.)ident(image)operator(,) ident(magn)operator(\))operator(\))operator(;) keyword(return) ident(f_quo)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(f_conjugate)operator(()ident(context)operator(,) ident(tmp)operator(\))operator(\))operator(,) ident(magn)operator(\))operator(;) operator(}) keyword(return) ident(f_quo)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(f_conjugate)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(,) ident(f_abs2)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_quo)operator(()ident(context)operator(,) ident(real)operator(,) ident(other)operator(\))operator(,) ident(f_quo)operator(()ident(context)operator(,) ident(image)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_fdiv / nucomp_quo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(fdiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(complex) operator(=) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_to_f)operator(()ident(context)operator(,) ident(real)operator(\))operator(,) ident(f_to_f)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(;) keyword(return) ident(f_div)operator(()ident(context)operator(,) ident(complex)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_expt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_expt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(\)) operator({) keyword(return) ident(newComplexBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyRational) operator(&&) ident(f_one_p)operator(()ident(context)operator(,) ident(f_denominator)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(\)) operator({) ident(other) operator(=) ident(f_numerator)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(f_polar)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(r) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) ident(IRubyObject) ident(theta) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(;) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) ident(IRubyObject) ident(nr) operator(=) ident(RubyMath)operator(.)ident(exp)operator(()local_variable(this)operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(otherComplex)operator(.)ident(real)operator(,) ident(RubyMath)operator(.)ident(log)operator(()local_variable(this)operator(,) ident(r)operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(otherComplex)operator(.)ident(image)operator(,) ident(theta)operator(\))operator(\))operator(\))operator(;) ident(IRubyObject) ident(ntheta) operator(=) ident(f_add)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(theta)operator(,) ident(otherComplex)operator(.)ident(real)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(otherComplex)operator(.)ident(image)operator(,) ident(RubyMath)operator(.)ident(log)operator(()local_variable(this)operator(,) ident(r)operator(\))operator(\))operator(\))operator(;) keyword(return) ident(polar)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(nr)operator(,) ident(ntheta)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyInteger)operator(\)) operator({) ident(IRubyObject) ident(one) operator(=) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(f_gt_p)operator(()ident(context)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(x) operator(=) local_variable(this)operator(;) ident(IRubyObject) ident(z) operator(=) ident(x)operator(;) ident(IRubyObject) ident(n) operator(=) ident(f_sub)operator(()ident(context)operator(,) ident(other)operator(,) ident(one)operator(\))operator(;) ident(IRubyObject) ident(two) operator(=) ident(RubyFixnum)operator(.)ident(two)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(while) operator(()operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(n)operator(\))operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(f_divmod)operator(()ident(context)operator(,) ident(n)operator(,) ident(two)operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) keyword(while) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(\))operator(\)) operator({) ident(RubyComplex) ident(xComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(x)operator(;) ident(x) operator(=) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(xComplex)operator(.)ident(real)operator(,) ident(xComplex)operator(.)ident(real)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(xComplex)operator(.)ident(image)operator(,) ident(xComplex)operator(.)ident(image)operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(two)operator(,) ident(xComplex)operator(.)ident(real)operator(\))operator(,) ident(xComplex)operator(.)ident(image)operator(\))operator(\))operator(;) ident(n) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) ident(a) operator(=) ident(f_divmod)operator(()ident(context)operator(,) ident(n)operator(,) ident(two)operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) operator(}) ident(z) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(z)operator(,) ident(x)operator(\))operator(;) ident(n) operator(=) ident(f_sub)operator(()ident(context)operator(,) ident(n)operator(,) ident(one)operator(\))operator(;) operator(}) keyword(return) ident(z)operator(;) operator(}) keyword(return) ident(f_expt)operator(()ident(context)operator(,) ident(f_div)operator(()ident(context)operator(,) ident(f_to_r)operator(()ident(context)operator(,) ident(one)operator(\))operator(,) local_variable(this)operator(\))operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(f_polar)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(r) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) ident(IRubyObject) ident(theta) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(;) keyword(return) ident(f_complex_polar)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_expt)operator(()ident(context)operator(,) ident(r)operator(,) ident(other)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(theta)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nucomp_equal_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(otherComplex) operator(=) operator(()ident(RubyComplex)operator(\))ident(other)operator(;) keyword(if) operator(()ident(f_equal_p)operator(()ident(context)operator(,) ident(real)operator(,) ident(otherComplex)operator(.)ident(real)operator(\)) operator(&&) ident(f_equal_p)operator(()ident(context)operator(,) ident(image)operator(,) ident(otherComplex)operator(.)ident(image)operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(f_equal_p)operator(()ident(context)operator(,) ident(real)operator(,) ident(other)operator(\)) operator(&&) ident(f_zero_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(f_equal_p)operator(()ident(context)operator(,) ident(other)operator(,) local_variable(this)operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_coerce * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(coerce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyNumeric) operator(&&) ident(f_scalar_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(newComplexBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(other)operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_abs * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(abs)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyMath)operator(.)ident(hypot)operator(()local_variable(this)operator(,) ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) comment(/** nucomp_abs2 * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(abs2)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_add)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(real)operator(,) ident(real)operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(image)operator(,) ident(image)operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_arg * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(arg)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyMath)operator(.)ident(atan2)operator(()local_variable(this)operator(,) ident(image)operator(,) ident(real)operator(\))operator(;) operator(}) comment(/** nucomp_polar * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(polar)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(f_abs)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(f_arg)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_conjugate * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(conjugate)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(real)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_real_p * */) comment(//@JRubyMethod(name = "real?"\)) directive(public) ident(IRubyObject) ident(real_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_complex_p * */) comment(// @JRubyMethod(name = "complex?"\)) directive(public) ident(IRubyObject) ident(complex_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_exact_p * */) comment(// @JRubyMethod(name = "exact?"\)) directive(public) ident(IRubyObject) ident(exact_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) operator(()ident(f_exact_p)operator(()ident(context)operator(,) ident(real)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(&&) ident(f_exact_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_exact_p * */) comment(// @JRubyMethod(name = "inexact?"\)) directive(public) ident(IRubyObject) ident(inexact_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(exact_p)operator(()ident(context)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_denominator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(demoninator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_lcm)operator(()ident(context)operator(,) ident(f_denominator)operator(()ident(context)operator(,) ident(real)operator(\))operator(,) ident(f_denominator)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_numerator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(numerator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(IRubyObject) ident(cd) operator(=) ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(return) ident(newComplex)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(f_numerator)operator(()ident(context)operator(,) ident(real)operator(\))operator(,) ident(f_div)operator(()ident(context)operator(,) ident(cd)operator(,) ident(f_denominator)operator(()ident(context)operator(,) ident(real)operator(\))operator(\))operator(\))operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(f_numerator)operator(()ident(context)operator(,) ident(image)operator(\))operator(,) ident(f_div)operator(()ident(context)operator(,) ident(cd)operator(,) ident(f_denominator)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** nucomp_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(hash)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_xor)operator(()ident(context)operator(,) ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) comment(/** f_signbit * */) directive(private) directive(static) type(boolean) ident(signbit)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(if) operator(()ident(x) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) pre_type(Double)operator(.)ident(doubleToLongBits)operator(()operator(()operator(()ident(RubyFloat)operator(\))ident(x)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\)) operator(<) integer(0)operator(;) operator(}) keyword(return) ident(f_negative_p)operator(()ident(context)operator(,) ident(x)operator(\))operator(;) operator(}) comment(/** f_tpositive_p * */) directive(private) directive(static) type(boolean) ident(tpositive_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) operator(!)ident(signbit)operator(()ident(context)operator(,) ident(x)operator(\))operator(;) operator(}) comment(/** nucomp_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(boolean) ident(impos) operator(=) ident(tpositive_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(f_to_s)operator(()ident(context)operator(,) ident(real)operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(impos) operator(?) operator(()type(byte)operator(\))string operator(:) operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(f_to_s)operator(()ident(context)operator(,) ident(f_abs)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** nucomp_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(boolean) ident(impos) operator(=) ident(tpositive_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(f_inspect)operator(()ident(context)operator(,) ident(real)operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(impos) operator(?) operator(()type(byte)operator(\))string operator(:) operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(f_inspect)operator(()ident(context)operator(,) ident(f_abs)operator(()ident(context)operator(,) ident(image)operator(\))operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(str)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** nucomp_marshal_dump * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(marshal_dump)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(real)operator(,) ident(image)operator(\))operator(;) operator(}) comment(/** nucomp_marshal_load * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(marshal_load)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(arg)operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(real) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(>) integer(0) operator(?) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(image) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(>) integer(1) operator(?) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** nucomp_scalar_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(scalar_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nucomp_to_i * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_i)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(image) keyword(instanceof) ident(RubyFloat) operator(||) operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(f_to_s)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(convertToString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(f_to_i)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) operator(}) comment(/** nucomp_to_f * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(image) keyword(instanceof) ident(RubyFloat) operator(||) operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(f_to_s)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(convertToString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(f_to_f)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) operator(}) comment(/** nucomp_to_f * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(image) keyword(instanceof) ident(RubyFloat) operator(||) operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(image)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(f_to_s)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(convertToString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(f_to_r)operator(()ident(context)operator(,) ident(real)operator(\))operator(;) operator(}) directive(static) ident(RubyArray) ident(str_to_c_internal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ByteList) ident(bytes) operator(=) ident(s)operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(bytes)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(recv)operator(\))operator(;) ident(IRubyObject) ident(sr)operator(,) ident(si)operator(,) ident(re)operator(;) ident(sr) operator(=) ident(si) operator(=) ident(re) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) type(boolean) ident(po) operator(=) pre_constant(false)operator(;) ident(IRubyObject) ident(m) operator(=) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(ComplexPatterns)operator(.)ident(comp_pat0)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(s)operator(\))operator(;) keyword(if) operator(()operator(!)ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(sr) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(si) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(two)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(re) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(po) operator(=) pre_constant(true)operator(;) operator(}) keyword(if) operator(()ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(m) operator(=) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(ComplexPatterns)operator(.)ident(comp_pat1)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(s)operator(\))operator(;) keyword(if) operator(()operator(!)ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(sr) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(si) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(si)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(si) operator(=) ident(runtime)operator(.)ident(newString)operator(()operator(\))operator(;) ident(IRubyObject) ident(t) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(two)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(t)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(t) operator(=) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(;) ident(si)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(cat)operator(()ident(t)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(re) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(po) operator(=) pre_constant(false)operator(;) operator(}) operator(}) keyword(if) operator(()ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(m) operator(=) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(ComplexPatterns)operator(.)ident(comp_pat2)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(s)operator(\))operator(;) keyword(if) operator(()ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(recv)operator(\))operator(;) ident(sr) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(two)operator(()ident(runtime)operator(\))operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(si) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(si) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(three)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(IRubyObject) ident(t) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(four)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(t)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(t) operator(=) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(;) ident(si)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(cat)operator(()ident(t)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) ident(re) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(po) operator(=) pre_constant(false)operator(;) operator(}) ident(IRubyObject) ident(r) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) ident(IRubyObject) ident(i) operator(=) ident(r)operator(;) keyword(if) operator(()operator(!)ident(sr)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(sr)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(r) operator(=) ident(f_to_r)operator(()ident(context)operator(,) ident(sr)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(f_gt_p)operator(()ident(context)operator(,) ident(sr)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(r) operator(=) ident(f_to_f)operator(()ident(context)operator(,) ident(sr)operator(\))operator(;) operator(}) keyword(else) operator({) ident(r) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(sr)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(si)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(si)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(i) operator(=) ident(f_to_r)operator(()ident(context)operator(,) ident(si)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(f_gt_p)operator(()ident(context)operator(,) ident(si)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(i) operator(=) ident(f_to_f)operator(()ident(context)operator(,) ident(si)operator(\))operator(;) operator(}) keyword(else) operator({) ident(i) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(si)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(po) operator(?) ident(newComplexPolar)operator(()ident(context)operator(,) ident(r)operator(,) ident(i)operator(\)) operator(:) ident(newComplexCanonicalize)operator(()ident(context)operator(,) ident(r)operator(,) ident(i)operator(\))operator(,) ident(re)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(str_to_c_strict)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(str_to_c_internal)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) keyword(if) operator(()ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) ident(IRubyObject) ident(s) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(s)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * Placeholder until/if we can support this * * @author Ola Bini */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyContinuation) operator({) directive(public) directive(static) type(void) ident(createContinuation)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(cContinuation) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,)ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,)ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cContinuation)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyContinuation)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(setContinuation)operator(()ident(cContinuation)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(call)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) operator(})comment(// RubyContinuation) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006, 2007 Ola Bini * Copyright (C\) 2007 Nick Sieger * Copyright (C\) 2008 Vladimir Sizikov * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.security.Provider)operator(;) keyword(import) include(java.security.MessageDigest)operator(;) keyword(import) include(java.security.NoSuchAlgorithmException)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.callback.Callback)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** * @author Ola Bini */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyDigest) operator({) directive(private) directive(static) pre_type(Provider) ident(provider) operator(=) pre_constant(null)operator(;) directive(public) directive(static) type(void) ident(createDigest)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(try) operator({) ident(provider) operator(=) operator(()pre_type(Provider)operator(\)) pre_type(Class)operator(.)ident(forName)operator(()stringoperator(\))operator(.)ident(newInstance)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) comment(// provider is not available) operator(}) ident(RubyModule) ident(mDigest) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigestBase) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(Base)operator(.)ident(BASE_ALLOCATOR)operator(\))operator(;) ident(cDigestBase)operator(.)ident(defineAnnotatedMethods)operator(()ident(Base)operator(.)ident(class)operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(MessageDigest) ident(createMessageDigest)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(providerName)operator(\)) directive(throws) exception(NoSuchAlgorithmException) operator({) keyword(if)operator(()ident(provider) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) keyword(return) pre_type(MessageDigest)operator(.)ident(getInstance)operator(()ident(providerName)operator(,) ident(provider)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) comment(// bouncy castle doesn't support algorithm) operator(}) operator(}) comment(// fall back to system JCA providers) keyword(return) pre_type(MessageDigest)operator(.)ident(getInstance)operator(()ident(providerName)operator(\))operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(MD5) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(RMD160) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(SHA1) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(SHA256) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(SHA384) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(SHA512) operator({)operator(}) directive(public) directive(static) type(void) ident(createDigestMD5)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) ident(RubyModule) ident(mDigest) operator(=) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigestBase) operator(=) ident(mDigest)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigest_MD5) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_MD5)operator(.)ident(defineFastMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(NO_ARGUMENTS)operator(;) operator(}) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(64)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(cDigest_MD5)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(createDigestRMD160)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) keyword(if)operator(()ident(provider) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newLoadError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyModule) ident(mDigest) operator(=) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigestBase) operator(=) ident(mDigest)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigest_RMD160) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_RMD160)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(createDigestSHA1)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) ident(RubyModule) ident(mDigest) operator(=) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigestBase) operator(=) ident(mDigest)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigest_SHA1) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_SHA1)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(createDigestSHA2)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(createMessageDigest)operator(()ident(runtime)operator(,) stringoperator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newLoadError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyModule) ident(mDigest) operator(=) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigestBase) operator(=) ident(mDigest)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(cDigest_SHA2_256) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_SHA2_256)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyClass) ident(cDigest_SHA2_384) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_SHA2_384)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyClass) ident(cDigest_SHA2_512) operator(=) ident(mDigest)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(cDigestBase)operator(,)ident(cDigestBase)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(cDigest_SHA2_512)operator(.)ident(setInternalModuleVariable)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Base) directive(extends) ident(RubyObject) operator({) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(BASE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(Base)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(s_digest)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) operator(()operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(try) operator({) pre_type(MessageDigest) ident(md) operator(=) ident(createMessageDigest)operator(()ident(runtime)operator(,) ident(name)operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(md)operator(.)ident(digest)operator(()ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getBytes)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()string operator(+) ident(name) operator(+) stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(s_hexdigest)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) operator(()operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(try) operator({) pre_type(MessageDigest) ident(md) operator(=) ident(createMessageDigest)operator(()ident(runtime)operator(,) ident(name)operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(ByteList)operator(.)ident(plain)operator(()ident(toHex)operator(()ident(md)operator(.)ident(digest)operator(()ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getBytes)operator(()operator(\))operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()string operator(+) ident(name) operator(+) stringoperator(\))operator(;) operator(}) operator(}) directive(private) pre_type(MessageDigest) ident(algo)operator(;) directive(private) pre_type(StringBuffer) ident(data)operator(;) directive(public) ident(Base)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,)ident(type)operator(\))operator(;) ident(data) operator(=) keyword(new) pre_type(StringBuffer)operator(()operator(\))operator(;) keyword(if)operator(()ident(type) operator(==) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(type)operator(.)ident(hasInternalModuleVariable)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()string operator(+) ident(type) operator(+) stringoperator(\))operator(;) operator(}) keyword(try) operator({) ident(setAlgorithm)operator(()ident(type)operator(.)ident(searchInternalModuleVariable)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()string operator(+) ident(type) operator(+) stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(0) operator(&&) operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(update)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if)operator(()local_variable(this) operator(==) ident(obj)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(()operator(()ident(RubyObject)operator(\))ident(obj)operator(\))operator(.)ident(checkFrozen)operator(()operator(\))operator(;) ident(data) operator(=) keyword(new) pre_type(StringBuffer)operator(()operator(()operator(()ident(Base)operator(\))ident(obj)operator(\))operator(.)ident(data)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) pre_type(String) ident(name) operator(=) operator(()operator(()ident(Base)operator(\))ident(obj)operator(\))operator(.)ident(algo)operator(.)ident(getAlgorithm)operator(()operator(\))operator(;) keyword(try) operator({) ident(algo) operator(=) ident(createMessageDigest)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(NoSuchAlgorithmException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()string operator(+) ident(name) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(update)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(data)operator(.)ident(append)operator(()ident(obj)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(digest)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(reset)operator(()operator(\))operator(;) ident(data)operator(.)ident(append)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) ident(IRubyObject) ident(digest) operator(=) ident(getDigest)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(reset)operator(()operator(\))operator(;) operator(}) keyword(return) ident(digest)operator(;) operator(}) directive(private) ident(IRubyObject) ident(getDigest)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(digest_bang)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) type(byte)type([]) ident(digest) operator(=) ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(;) ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(digest)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(hexdigest)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(reset)operator(()operator(\))operator(;) ident(data)operator(.)ident(append)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) type(byte)type([]) ident(digest) operator(=) ident(ByteList)operator(.)ident(plain)operator(()ident(toHex)operator(()ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(\))operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(reset)operator(()operator(\))operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(digest)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(ByteList)operator(.)ident(plain)operator(()ident(toHex)operator(()ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(hexdigest_bang)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) type(byte)type([]) ident(digest) operator(=) ident(ByteList)operator(.)ident(plain)operator(()ident(toHex)operator(()ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(\))operator(\))operator(;) ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(digest)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(ByteList)operator(.)ident(plain)operator(()string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(toHex)operator(()ident(algo)operator(.)ident(digest)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(data)operator(\))operator(\))operator(\)) operator(+) string)delimiter(")>operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(IRubyObject) ident(oth)operator(\)) operator({) type(boolean) ident(ret) operator(=) local_variable(this) operator(==) ident(oth)operator(;) keyword(if)operator(()operator(!)ident(ret)operator(\)) operator({) keyword(if) operator(()ident(oth) keyword(instanceof) ident(Base)operator(\)) operator({) ident(Base) ident(b) operator(=) operator(()ident(Base)operator(\))ident(oth)operator(;) ident(ret) operator(=) local_variable(this)operator(.)ident(algo)operator(.)ident(getAlgorithm)operator(()operator(\))operator(.)ident(equals)operator(()ident(b)operator(.)ident(algo)operator(.)ident(getAlgorithm)operator(()operator(\))operator(\)) operator(&&) local_variable(this)operator(.)ident(getDigest)operator(()operator(\))operator(.)ident(equals)operator(()ident(b)operator(.)ident(getDigest)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(str) operator(=) ident(oth)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ret) operator(=) local_variable(this)operator(.)ident(to_s)operator(()operator(\))operator(.)ident(equals)operator(()ident(str)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(ret) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(length)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(algo)operator(.)ident(getDigestLength)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(block_length)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(() local_variable(this)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(reset)operator(()operator(\)) operator({) ident(algo)operator(.)ident(reset)operator(()operator(\))operator(;) ident(data) operator(=) keyword(new) pre_type(StringBuffer)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(setAlgorithm)operator(()ident(IRubyObject) ident(algo)operator(\)) directive(throws) exception(NoSuchAlgorithmException) operator({) local_variable(this)operator(.)ident(algo) operator(=) ident(createMessageDigest)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(algo)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(toHex)operator(()type(byte)type([]) ident(val)operator(\)) operator({) pre_type(StringBuilder) ident(out) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(,)ident(j)operator(=)ident(val)operator(.)ident(length)operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) pre_type(String) ident(ve) operator(=) pre_type(Integer)operator(.)ident(toString)operator(()operator(()operator(()operator(()type(int)operator(\))operator(()operator(()type(char)operator(\))ident(val)operator([)ident(i)operator(])operator(\))operator(\)) operator(&) hex(0xFF)operator(\))operator(,)integer(16)operator(\))operator(;) keyword(if)operator(()ident(ve)operator(.)ident(length)operator(()operator(\)) operator(==) integer(1)operator(\)) operator({) ident(ve) operator(=) string operator(+) ident(ve)operator(;) operator(}) ident(out)operator(.)ident(append)operator(()ident(ve)operator(\))operator(;) operator(}) keyword(return) ident(out)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) operator(}) operator(})comment(// RubyDigest) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.File)operator(;) keyword(import) include(java.io.FileInputStream)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.ext.posix.util.Platform)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.Dir)operator(;) keyword(import) include(org.jruby.util.JRubyFile)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** * .The Ruby built-in class Dir. * * @author jvoegele */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyDir) directive(extends) ident(RubyObject) operator({) comment(// What we passed to the constructor for method 'path') directive(private) ident(RubyString) ident(path)operator(;) directive(protected) ident(JRubyFile) ident(dir)operator(;) directive(private) pre_type(String)type([]) ident(snapshot)operator(;) comment(// snapshot of contents of directory) directive(private) type(int) ident(pos)operator(;) comment(// current position in directory) directive(private) type(boolean) ident(isOpen) operator(=) pre_constant(true)operator(;) directive(public) ident(RubyDir)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(ObjectAllocator) ident(DIR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyDir)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createDirClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(dirClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(DIR_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setDir)operator(()ident(dirClass)operator(\))operator(;) ident(dirClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(dirClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyDir)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(dirClass)operator(;) operator(}) directive(private) directive(final) type(void) ident(checkDir)operator(()operator(\)) operator({) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(isOpen)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) comment(/** * Creates a new Dir. This method takes a snapshot of the * contents of the directory at creation time, so changes to the contents * of the directory will not be reflected during the lifetime of the * Dir object returned, so a new Dir instance * must be created to reflect changes to the underlying file system. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject) ident(_newPath)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(RubyString) ident(newPath) operator(=) ident(_newPath)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(checkSafeString)operator(()ident(newPath)operator(\))operator(;) pre_type(String) ident(adjustedPath) operator(=) ident(RubyFile)operator(.)ident(adjustRootPathOnWindows)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(newPath)operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(null)operator(\))operator(;) ident(checkDirIsTwoSlashesOnWindows)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(adjustedPath)operator(\))operator(;) ident(dir) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(adjustedPath)operator(\))operator(;) keyword(if) operator(()operator(!)ident(dir)operator(.)ident(isDirectory)operator(()operator(\))operator(\)) operator({) ident(dir) operator(=) pre_constant(null)operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()ident(newPath)operator(.)ident(toString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(path) operator(=) ident(newPath)operator(;) pre_type(List)operator(<)pre_type(String)operator(>) ident(snapshotList) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) ident(snapshotList)operator(.)ident(add)operator(()stringoperator(\))operator(;) ident(snapshotList)operator(.)ident(add)operator(()stringoperator(\))operator(;) ident(snapshotList)operator(.)ident(addAll)operator(()ident(getContents)operator(()ident(dir)operator(\))operator(\))operator(;) ident(snapshot) operator(=) operator(()pre_type(String)type([])operator(\)) ident(snapshotList)operator(.)ident(toArray)operator(()keyword(new) pre_type(String)operator([)ident(snapshotList)operator(.)ident(size)operator(()operator(\))operator(])operator(\))operator(;) ident(pos) operator(=) integer(0)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(// ----- Ruby Class Methods ----------------------------------------------------) directive(private) directive(static) pre_type(List)operator(<)ident(ByteList)operator(>) ident(dirGlobs)operator(()pre_type(String) ident(cwd)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) type(int) ident(flags)operator(\)) operator({) pre_type(List)operator(<)ident(ByteList)operator(>) ident(dirs) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(ByteList)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(ByteList) ident(globPattern) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(dirs)operator(.)ident(addAll)operator(()ident(Dir)operator(.)ident(push_glob)operator(()ident(cwd)operator(,) ident(globPattern)operator(,) ident(flags)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(dirs)operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(asRubyStringList)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(List)operator(<)ident(ByteList)operator(>) ident(dirs)operator(\)) operator({) pre_type(List)operator(<)ident(RubyString)operator(>) ident(allFiles) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(RubyString)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()ident(ByteList) ident(dir)operator(:) ident(dirs)operator(\)) operator({) ident(allFiles)operator(.)ident(add)operator(()ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(dir)operator(\))operator(\))operator(;) operator(}) ident(IRubyObject)type([]) ident(tempFileList) operator(=) keyword(new) ident(IRubyObject)operator([)ident(allFiles)operator(.)ident(size)operator(()operator(\))operator(])operator(;) ident(allFiles)operator(.)ident(toArray)operator(()ident(tempFileList)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArrayNoCopy)operator(()ident(tempFileList)operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(getCWD)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(try) operator({) keyword(return) keyword(new) ident(org)operator(.)ident(jruby)operator(.)ident(util)operator(.)ident(NormalizedFile)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(\))operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest)operator(=)pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) pre_type(List)operator(<)ident(ByteList)operator(>) ident(dirs)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(ByteList) ident(globPattern) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(dirs) operator(=) ident(Dir)operator(.)ident(push_glob)operator(()ident(getCWD)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(globPattern)operator(,) integer(0)operator(\))operator(;) operator(}) keyword(else) operator({) ident(dirs) operator(=) ident(dirGlobs)operator(()ident(getCWD)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(args)operator(,) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(asRubyStringList)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(dirs)operator(\))operator(;) operator(}) comment(/** * Returns an array of filenames matching the specified wildcard pattern * pat. If a block is given, the array is iterated internally * with each filename is passed to the block in turn. In this case, Nil is * returned. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(glob)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(flags) operator(=) ident(args)operator(.)ident(length) operator(==) integer(2) operator(?) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(1)operator(])operator(\)) operator(:) integer(0)operator(;) pre_type(List)operator(<)ident(ByteList)operator(>) ident(dirs)operator(;) ident(IRubyObject) ident(tmp) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(ByteList) ident(globPattern) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(dirs) operator(=) ident(Dir)operator(.)ident(push_glob)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(globPattern)operator(,) ident(flags)operator(\))operator(;) operator(}) keyword(else) operator({) ident(dirs) operator(=) ident(dirGlobs)operator(()ident(getCWD)operator(()ident(runtime)operator(\))operator(,) operator(()operator(()ident(RubyArray)operator(\)) ident(tmp)operator(\))operator(.)ident(toJavaArray)operator(()operator(\))operator(,) ident(flags)operator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(dirs)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(dirs)operator(.)ident(get)operator(()ident(i)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(asRubyStringList)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(dirs)operator(\))operator(;) operator(}) comment(/** * @return all entries for this Dir */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(entries)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()ident(JavaUtil)operator(.)ident(convertJavaArrayToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(snapshot)operator(\))operator(\))operator(;) operator(}) comment(/** * Returns an array containing all of the filenames in the given directory. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(entries)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(path)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(adjustedPath) operator(=) ident(RubyFile)operator(.)ident(adjustRootPathOnWindows)operator(() ident(runtime)operator(,) ident(path)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(null)operator(\))operator(;) ident(checkDirIsTwoSlashesOnWindows)operator(()ident(runtime)operator(,) ident(adjustedPath)operator(\))operator(;) directive(final) ident(JRubyFile) ident(directory) operator(=) ident(JRubyFile)operator(.)ident(create)operator(() ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(adjustedPath)operator(\))operator(;) keyword(if) operator(()operator(!)ident(directory)operator(.)ident(isDirectory)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()stringoperator(\))operator(;) operator(}) pre_type(List)operator(<)pre_type(String)operator(>) ident(fileList) operator(=) ident(getContents)operator(()ident(directory)operator(\))operator(;) ident(fileList)operator(.)ident(add)operator(()integer(0)operator(,) stringoperator(\))operator(;) ident(fileList)operator(.)ident(add)operator(()integer(1)operator(,) stringoperator(\))operator(;) pre_type(Object)type([]) ident(files) operator(=) ident(fileList)operator(.)ident(toArray)operator(()operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()ident(JavaUtil)operator(.)ident(convertJavaArrayToRuby)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(files)operator(\))operator(\))operator(;) operator(}) comment(// MRI behavior: just plain '//' or '\\\\\\\\' are considered illegal on Windows.) directive(private) directive(static) type(void) ident(checkDirIsTwoSlashesOnWindows)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS) operator(&&) operator(()stringoperator(.)ident(equals)operator(()ident(path)operator(\)) operator(||) stringoperator(.)ident(equals)operator(()ident(path)operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) operator(}) comment(/** Changes the current directory to path */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chdir)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(path) operator(=) ident(args)operator(.)ident(length) operator(==) integer(1) operator(?) operator(()ident(RubyString)operator(\)) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\)) operator(:) ident(getHomeDirectoryPath)operator(()ident(context)operator(\))operator(;) pre_type(String) ident(adjustedPath) operator(=) ident(RubyFile)operator(.)ident(adjustRootPathOnWindows)operator(() ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(path)operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(null)operator(\))operator(;) ident(checkDirIsTwoSlashesOnWindows)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(adjustedPath)operator(\))operator(;) ident(JRubyFile) ident(dir) operator(=) ident(getDir)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(adjustedPath)operator(,) pre_constant(true)operator(\))operator(;) pre_type(String) ident(realPath) operator(=) pre_constant(null)operator(;) pre_type(String) ident(oldCwd) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(;) comment(// We get canonical path to try and flatten the path out.) comment(// a dir '/subdir/..' should return as '/') comment(// cnutter: Do we want to flatten path out?) keyword(try) operator({) ident(realPath) operator(=) ident(dir)operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) ident(realPath) operator(=) ident(dir)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(;) operator(}) ident(IRubyObject) ident(result) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) comment(// FIXME: Don't allow multiple threads to do this at once) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setCurrentDirectory)operator(()ident(realPath)operator(\))operator(;) keyword(try) operator({) ident(result) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(path)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(dir) operator(=) ident(getDir)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(oldCwd)operator(,) pre_constant(true)operator(\))operator(;) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setCurrentDirectory)operator(()ident(oldCwd)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setCurrentDirectory)operator(()ident(realPath)operator(\))operator(;) ident(result) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * Changes the root directory (only allowed by super user\). Not available * on all platforms. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chroot)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(path)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) comment(/** * Deletes the directory specified by path. The directory must * be empty. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rmdir)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(path)operator(\)) operator({) ident(JRubyFile) ident(directory) operator(=) ident(getDir)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(path)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(true)operator(\))operator(;) keyword(if) operator(()operator(!)ident(directory)operator(.)ident(delete)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSystemCallError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) comment(/** * Executes the block once for each file in the directory specified by * path. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(foreach)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(_path)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(path) operator(=) ident(_path)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(checkSafeString)operator(()ident(path)operator(\))operator(;) ident(RubyClass) ident(dirClass) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDir)operator(()operator(\))operator(;) ident(RubyDir) ident(dir) operator(=) operator(()ident(RubyDir)operator(\)) ident(dirClass)operator(.)ident(newInstance)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(path) operator(})operator(,) ident(block)operator(\))operator(;) ident(dir)operator(.)ident(each)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** Returns the current directory. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyString) ident(getwd)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(ruby) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newUnicodeString)operator(()ident(ruby)operator(,) ident(ruby)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Creates the directory specified by path. Note that the * mode parameter is provided only to support existing Ruby * code, and is ignored. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(mkdir)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) pre_type(String) ident(path) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(File) ident(newDir) operator(=) ident(getDir)operator(()ident(runtime)operator(,) ident(path)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()pre_type(File)operator(.)ident(separatorChar) operator(==) stringoperator(\)) operator({) ident(newDir) operator(=) keyword(new) pre_type(File)operator(()ident(newDir)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(;) operator(}) type(int) ident(mode) operator(=) ident(args)operator(.)ident(length) operator(==) integer(2) operator(?) operator(()operator(()type(int)operator(\)) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\)) operator(:) oct(0777)operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(mkdir)operator(()ident(newDir)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(,) ident(mode)operator(\)) operator(<) integer(0)operator(\)) operator({) comment(// FIXME: This is a system error based on errno) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSystemCallError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Returns a new directory object for path. If a block is * provided, a new directory object is passed to the block, which closes the * directory object before terminating. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(path)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyDir) ident(directory) operator(=) operator(()ident(RubyDir)operator(\)) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDir)operator(()operator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(path) operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(directory)operator(;) keyword(try) operator({) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(directory)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(directory)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) comment(// ----- Ruby Instance Methods -------------------------------------------------) comment(/** * Closes the directory stream. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) comment(// Make sure any read(\)s after close fail.) ident(checkDir)operator(()operator(\))operator(;) ident(isOpen) operator(=) pre_constant(false)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * Executes the block once for each entry in the directory. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(checkDir)operator(()operator(\))operator(;) pre_type(String)type([]) ident(contents) operator(=) ident(snapshot)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(contents)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(contents)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * Returns the current position in the directory. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(tell)operator(()operator(\)) operator({) ident(checkDir)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(pos)operator(\))operator(;) operator(}) comment(/** * Moves to a position d. pos must be a value * returned by tell or 0. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(seek)operator(()ident(IRubyObject) ident(newPos)operator(\)) operator({) ident(checkDir)operator(()operator(\))operator(;) ident(set_pos)operator(()ident(newPos)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_pos)operator(()ident(IRubyObject) ident(newPos)operator(\)) operator({) local_variable(this)operator(.)ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(newPos)operator(\))operator(;) keyword(return) ident(newPos)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(path)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(checkDir)operator(()operator(\))operator(;) keyword(return) ident(path)operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** Returns the next entry from this directory. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(read)operator(()operator(\)) operator({) ident(checkDir)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(snapshot)operator(.)ident(length)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(RubyString) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(snapshot)operator([)ident(pos)operator(])operator(\))operator(;) ident(pos)operator(++)operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** Moves position in this directory to the first entry. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rewind)operator(()operator(\)) operator({) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) ident(checkDir)operator(()operator(\))operator(;) ident(pos) operator(=) integer(0)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(// ----- Helper Methods --------------------------------------------------------) comment(/** Returns a Java File object for the specified path. If * path is not a directory, throws IOError. * * @param path path for which to return the File object. * @param mustExist is true the directory must exist. If false it must not. * @throws IOError if path is not a directory. */) directive(protected) directive(static) ident(JRubyFile) ident(getDir)operator(()directive(final) ident(Ruby) ident(runtime)operator(,) directive(final) pre_type(String) ident(path)operator(,) directive(final) type(boolean) ident(mustExist)operator(\)) operator({) ident(JRubyFile) ident(result) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,)ident(path)operator(\))operator(;) keyword(if) operator(()ident(mustExist) operator(&&) operator(!)ident(result)operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) type(boolean) ident(isDirectory) operator(=) ident(result)operator(.)ident(isDirectory)operator(()operator(\))operator(;) keyword(if) operator(()ident(mustExist) operator(&&) operator(!)ident(isDirectory)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOTDIRError)operator(()ident(path) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)ident(mustExist) operator(&&) ident(isDirectory)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEEXISTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * Returns the contents of the specified directory as an * ArrayList containing the names of the files as Java Strings. */) directive(protected) directive(static) pre_type(List)operator(<)pre_type(String)operator(>) ident(getContents)operator(()pre_type(File) ident(directory)operator(\)) operator({) pre_type(String)type([]) ident(contents) operator(=) ident(directory)operator(.)ident(list)operator(()operator(\))operator(;) pre_type(List)operator(<)pre_type(String)operator(>) ident(result) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) comment(// If an IO exception occurs (something odd, but possible\)) comment(// A directory may return null.) keyword(if) operator(()ident(contents) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(contents)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(add)operator(()ident(contents)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * Returns the contents of the specified directory as an * ArrayList containing the names of the files as Ruby Strings. */) directive(protected) directive(static) pre_type(List)operator(<)ident(RubyString)operator(>) ident(getContents)operator(()pre_type(File) ident(directory)operator(,) ident(Ruby) ident(runtime)operator(\)) operator({) pre_type(List)operator(<)ident(RubyString)operator(>) ident(result) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(RubyString)operator(>)operator(()operator(\))operator(;) pre_type(String)type([]) ident(contents) operator(=) ident(directory)operator(.)ident(list)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(contents)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(add)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(contents)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * Returns the home directory of the specified user on the * system. If the home directory of the specified user cannot be found, * an ArgumentError it thrown. */) directive(public) directive(static) ident(IRubyObject) ident(getHomeDirectoryPath)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(user)operator(\)) operator({) comment(/* * TODO: This version is better than the hackish previous one. Windows * behavior needs to be defined though. I suppose this version * could be improved more too. * TODO: /etc/passwd is also inadequate for MacOSX since it does not * use /etc/passwd for regular user accounts */) pre_type(String) ident(passwd) operator(=) pre_constant(null)operator(;) keyword(try) operator({) pre_type(FileInputStream) ident(stream) operator(=) keyword(new) pre_type(FileInputStream)operator(()stringoperator(\))operator(;) type(int) ident(totalBytes) operator(=) ident(stream)operator(.)ident(available)operator(()operator(\))operator(;) type(byte)type([]) ident(bytes) operator(=) keyword(new) type(byte)operator([)ident(totalBytes)operator(])operator(;) ident(stream)operator(.)ident(read)operator(()ident(bytes)operator(\))operator(;) ident(stream)operator(.)ident(close)operator(()operator(\))operator(;) ident(passwd) operator(=) keyword(new) pre_type(String)operator(()ident(bytes)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) pre_type(String)type([]) ident(rows) operator(=) ident(passwd)operator(.)ident(split)operator(()stringoperator(\))operator(;) type(int) ident(rowCount) operator(=) ident(rows)operator(.)ident(length)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(rowCount)operator(;) ident(i)operator(++)operator(\)) operator({) pre_type(String)type([]) ident(fields) operator(=) ident(rows)operator([)ident(i)operator(])operator(.)ident(split)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(fields)operator([)integer(0)operator(])operator(.)ident(equals)operator(()ident(user)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(fields)operator([)integer(5)operator(])operator(\))operator(;) operator(}) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(user) operator(+) stringoperator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(getHomeDirectoryPath)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyHash) ident(systemHash) operator(=) operator(()ident(RubyHash)operator(\)) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) ident(RubyHash) ident(envHash) operator(=) operator(()ident(RubyHash)operator(\)) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) ident(IRubyObject) ident(home) operator(=) ident(envHash)operator(.)ident(op_aref)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) keyword(if) operator(()ident(home) operator(==) pre_constant(null) operator(||) ident(home)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(home) operator(=) ident(systemHash)operator(.)ident(op_aref)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(home) operator(==) pre_constant(null) operator(||) ident(home)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(home) operator(=) ident(envHash)operator(.)ident(op_aref)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(home) operator(==) pre_constant(null) operator(||) ident(home)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()ident(RubyString)operator(\)) ident(home)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.Comparator)operator(;) keyword(import) include(java.util.Arrays)operator(;) keyword(import) include(java.util.concurrent.atomic.AtomicInteger)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallBlock)operator(;) keyword(import) include(org.jruby.runtime.BlockCallback)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) comment(/** * The implementation of Ruby's Enumerable module. */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyEnumerable) operator({) directive(public) directive(static) ident(RubyModule) ident(createEnumerableModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(enumModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setEnumerable)operator(()ident(enumModule)operator(\))operator(;) ident(enumModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyEnumerable)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(enumModule)operator(;) operator(}) directive(public) directive(static) ident(IRubyObject) ident(callEach)operator(()ident(Ruby) ident(runtime)operator(,) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(BlockCallback) ident(callback)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(self)operator(,) stringoperator(,) ident(CallBlock)operator(.)ident(newCallClosure)operator(()ident(self)operator(,) ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(,) ident(Arity)operator(.)ident(noArguments)operator(()operator(\))operator(,) ident(callback)operator(,) ident(context)operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) type(class) class(ExitIteration) directive(extends) exception(RuntimeException) operator({) directive(public) pre_type(Throwable) ident(fillInStackTrace)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(first_0)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) directive(final) ident(IRubyObject)type([]) ident(holder) operator(=) keyword(new) ident(IRubyObject)type([])operator({)ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(})operator(;) keyword(try) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(ctx)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) ident(holder)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) keyword(throw) keyword(new) ident(ExitIteration)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch)operator(()ident(ExitIteration) ident(ei)operator(\)) operator({)operator(}) keyword(return) ident(holder)operator([)integer(0)operator(])operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(first_1)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(IRubyObject) ident(num)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(if)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(num)operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(private) type(int) ident(iter) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(num)operator(\))operator(;) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if)operator(()ident(iter)operator(--) operator(==) integer(0)operator(\)) operator({) keyword(throw) keyword(new) ident(ExitIteration)operator(()operator(\))operator(;) operator(}) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch)operator(()ident(ExitIteration) ident(ei)operator(\)) operator({)operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(to_a)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(AppendBlockCallback)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sort)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(AppendBlockCallback)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(\))operator(;) ident(result)operator(.)ident(sort_bang)operator(()ident(block)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sort_by)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) comment(// MUST NOT be used across threads) keyword(if) operator(()ident(self) keyword(instanceof) ident(RubyArray)operator(\)) operator({) ident(RubyArray) ident(selfArray) operator(=) operator(()ident(RubyArray)operator(\)) ident(self)operator(;) directive(final) ident(IRubyObject)type([])type([]) ident(valuesAndCriteria) operator(=) keyword(new) ident(IRubyObject)operator([)ident(selfArray)operator(.)ident(size)operator(()operator(\))operator(])operator([)integer(2)operator(])operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) pre_type(AtomicInteger) ident(i) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(0)operator(\))operator(;) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(IRubyObject)type([]) ident(myVandC) operator(=) ident(valuesAndCriteria)operator([)ident(i)operator(.)ident(getAndIncrement)operator(()operator(\))operator(])operator(;) ident(myVandC)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) ident(myVandC)operator([)integer(1)operator(]) operator(=) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) pre_type(Arrays)operator(.)ident(sort)operator(()ident(valuesAndCriteria)operator(,) keyword(new) pre_type(Comparator)operator(<)ident(IRubyObject)type([])operator(>)operator(()operator(\)) operator({) directive(public) type(int) ident(compare)operator(()ident(IRubyObject)type([]) ident(o1)operator(,) ident(IRubyObject)type([]) ident(o2)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(fix2int)operator(()ident(o1)operator([)integer(1)operator(])operator(.)ident(callMethod)operator(()ident(localContext)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(o2)operator([)integer(1)operator(])operator(\))operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(IRubyObject) ident(dstArray)type([]) operator(=) keyword(new) ident(IRubyObject)operator([)ident(selfArray)operator(.)ident(size)operator(()operator(\))operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(dstArray)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(dstArray)operator([)ident(i)operator(]) operator(=) ident(valuesAndCriteria)operator([)ident(i)operator(])operator([)integer(0)operator(])operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newArrayNoCopy)operator(()ident(dstArray)operator(\))operator(;) operator(}) keyword(else) operator({) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(AppendBlockCallback)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(\))operator(;) directive(final) ident(IRubyObject)type([])type([]) ident(valuesAndCriteria) operator(=) keyword(new) ident(IRubyObject)operator([)ident(result)operator(.)ident(size)operator(()operator(\))operator(])operator([)integer(2)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(valuesAndCriteria)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(result)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(;) ident(valuesAndCriteria)operator([)ident(i)operator(])operator([)integer(0)operator(]) operator(=) ident(val)operator(;) ident(valuesAndCriteria)operator([)ident(i)operator(])operator([)integer(1)operator(]) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(val)operator(\))operator(;) operator(}) pre_type(Arrays)operator(.)ident(sort)operator(()ident(valuesAndCriteria)operator(,) keyword(new) pre_type(Comparator)operator(<)ident(IRubyObject)type([])operator(>)operator(()operator(\)) operator({) directive(public) type(int) ident(compare)operator(()ident(IRubyObject)type([]) ident(o1)operator(,) ident(IRubyObject)type([]) ident(o2)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(fix2int)operator(()ident(o1)operator([)integer(1)operator(])operator(.)ident(callMethod)operator(()ident(localContext)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(o2)operator([)integer(1)operator(])operator(\))operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(valuesAndCriteria)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(eltInternalSet)operator(()ident(i)operator(,) ident(valuesAndCriteria)operator([)ident(i)operator(])operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(grep)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(IRubyObject) ident(pattern)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(ctx)operator(.)ident(setRubyFrameDelta)operator(()ident(ctx)operator(.)ident(getRubyFrameDelta)operator(()operator(\))operator(+)integer(2)operator(\))operator(;) keyword(if) operator(()ident(pattern)operator(.)ident(callMethod)operator(()ident(ctx)operator(,) ident(MethodIndex)operator(.)ident(OP_EQQ)operator(,) stringoperator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(value) operator(=) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(;) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(value)operator(\))operator(;) operator(}) operator(}) ident(ctx)operator(.)ident(setRubyFrameDelta)operator(()ident(ctx)operator(.)ident(getRubyFrameDelta)operator(()operator(\))operator(-)integer(2)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(pattern)operator(.)ident(callMethod)operator(()ident(ctx)operator(,) ident(MethodIndex)operator(.)ident(OP_EQQ)operator(,) stringoperator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(detect)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(result)type([]) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) pre_constant(null) operator(})operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) ident(IRubyObject) ident(ifnone) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) ident(ifnone) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(try) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(result)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(SpecialJump) ident(sj)operator(\)) operator({) keyword(return) ident(result)operator([)integer(0)operator(])operator(;) operator(}) keyword(return) ident(ifnone) operator(!=) pre_constant(null) operator(?) ident(ifnone)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\)) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(reject)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()operator(!)ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(collect)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(IRubyObject) ident(value) operator(=) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(;) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(value)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(AppendBlockCallback)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(inject)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(result)type([]) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) pre_constant(null) operator(})operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) ident(result)operator([)integer(0)operator(]) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) ident(result)operator([)integer(0)operator(]) operator(=) ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(?) ident(largs)operator([)integer(0)operator(]) operator(:) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(runtime)operator(.)ident(newArray)operator(()ident(result)operator([)integer(0)operator(])operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(result)operator([)integer(0)operator(])operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(partition)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(arr_true) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(arr_false) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) directive(synchronized) operator(()ident(arr_true)operator(\)) operator({) ident(arr_true)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) directive(synchronized) operator(()ident(arr_false)operator(\)) operator({) ident(arr_false)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(arr_true)operator(,) ident(arr_false)operator(\))operator(;) operator(}) directive(private) directive(static) type(class) class(EachWithIndex) directive(implements) ident(BlockCallback) operator({) directive(private) type(int) ident(index) operator(=) integer(0)operator(;) directive(private) directive(final) ident(Block) ident(block)operator(;) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(public) ident(EachWithIndex)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(Block) ident(block)operator(\)) operator({) local_variable(this)operator(.)ident(block) operator(=) ident(block)operator(;) local_variable(this)operator(.)ident(runtime) operator(=) ident(ctx)operator(.)ident(getRuntime)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(iargs)operator(,) ident(Block) ident(block)operator(\)) operator({) local_variable(this)operator(.)ident(block)operator(.)ident(call)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newArray)operator(()ident(iargs)operator([)integer(0)operator(])operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(index)operator(++)operator(\))operator(\)) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_with_index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(self)operator(,) stringoperator(,) ident(CallBlock)operator(.)ident(newCallClosure)operator(()ident(self)operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getEnumerable)operator(()operator(\))operator(,) ident(Arity)operator(.)ident(noArguments)operator(()operator(\))operator(,) keyword(new) ident(EachWithIndex)operator(()ident(context)operator(,) ident(block)operator(\))operator(,) ident(context)operator(\))operator(\))operator(;) keyword(return) ident(self)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(include_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(IRubyObject) ident(arg)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(try) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(RubyObject)operator(.)ident(equalInternal)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(,) ident(arg)operator(\))operator(\)) operator({) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(SpecialJump) ident(sj)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(max)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(result)type([]) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) pre_constant(null) operator(})operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(||) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(ctx)operator(,) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(runtime)operator(.)ident(newArray)operator(()ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(\))operator(,) ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\)) operator(>) integer(0)operator(\)) operator({) ident(result)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) directive(synchronized) operator(()ident(result)operator(\)) operator({) keyword(if) operator(()ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(||) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(ctx)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(,) ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\)) operator(>) integer(0)operator(\)) operator({) ident(result)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(return) ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(result)operator([)integer(0)operator(])operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(min)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(result)type([]) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) pre_constant(null) operator(})operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(||) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(ctx)operator(,) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(runtime)operator(.)ident(newArray)operator(()ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(\))operator(,) ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\)) operator(<) integer(0)operator(\)) operator({) ident(result)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) directive(synchronized) operator(()ident(result)operator(\)) operator({) keyword(if) operator(()ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(||) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(ctx)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(,) ident(largs)operator([)integer(0)operator(])operator(,) ident(result)operator([)integer(0)operator(])operator(\)) operator(<) integer(0)operator(\)) operator({) ident(result)operator([)integer(0)operator(]) operator(=) ident(largs)operator([)integer(0)operator(])operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(return) ident(result)operator([)integer(0)operator(]) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(result)operator([)integer(0)operator(])operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(all_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(try) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(largs)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(SpecialJump) ident(sj)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(any_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(ThreadContext) ident(localContext) operator(=) ident(context)operator(;) keyword(try) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(localContext) operator(!=) ident(ctx)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(largs)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(JumpException)operator(.)ident(SPECIAL_JUMP)operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(SpecialJump) ident(sj)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(zip)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(IRubyObject)type([]) ident(args)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(args)operator([)ident(i)operator(]) operator(=) ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(args)operator([)ident(i)operator(])operator(,) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_A)operator(,) stringoperator(\))operator(;) operator(}) directive(final) type(int) ident(aLen) operator(=) ident(args)operator(.)ident(length) operator(+) integer(1)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) pre_type(AtomicInteger) ident(ix) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(0)operator(\))operator(;) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(RubyArray) ident(array) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(aLen)operator(\))operator(;) type(int) ident(myIx) operator(=) ident(ix)operator(.)ident(getAndIncrement)operator(()operator(\))operator(;) ident(array)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,) ident(j) operator(=) ident(args)operator(.)ident(length)operator(;) ident(i) operator(<) ident(j)operator(;) ident(i)operator(++)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)ident(i)operator(])operator(\))operator(.)ident(entry)operator(()ident(myIx)operator(\))operator(\))operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(array)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) directive(final) ident(RubyArray) ident(zip) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) pre_type(AtomicInteger) ident(ix) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(0)operator(\))operator(;) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(RubyArray) ident(array) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(aLen)operator(\))operator(;) ident(array)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) type(int) ident(myIx) operator(=) ident(ix)operator(.)ident(getAndIncrement)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,) ident(j) operator(=) ident(args)operator(.)ident(length)operator(;) ident(i) operator(<) ident(j)operator(;) ident(i)operator(++)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)ident(i)operator(])operator(\))operator(.)ident(entry)operator(()ident(myIx)operator(\))operator(\))operator(;) operator(}) directive(synchronized) operator(()ident(zip)operator(\)) operator({) ident(zip)operator(.)ident(append)operator(()ident(array)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(zip)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(group_by)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyHash) ident(result) operator(=) keyword(new) ident(RubyHash)operator(()ident(runtime)operator(\))operator(;) ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(IRubyObject) ident(key) operator(=) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(;) directive(synchronized) operator(()ident(result)operator(\)) operator({) ident(IRubyObject) ident(curr) operator(=) ident(result)operator(.)ident(fastARef)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(curr) operator(==) pre_constant(null)operator(\)) operator({) ident(curr) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(result)operator(.)ident(fastASet)operator(()ident(key)operator(,) ident(curr)operator(\))operator(;) operator(}) ident(curr)operator(.)ident(callMethod)operator(()ident(ctx)operator(,) ident(MethodIndex)operator(.)ident(OP_LSHIFT)operator(,) stringoperator(,) ident(largs)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(public) directive(static) directive(final) type(class) class(AppendBlockCallback) directive(implements) ident(BlockCallback) operator({) directive(private) ident(Ruby) ident(runtime)operator(;) directive(private) ident(RubyArray) ident(result)operator(;) directive(public) ident(AppendBlockCallback)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyArray) ident(result)operator(\)) operator({) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) local_variable(this)operator(.)ident(result) operator(=) ident(result)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Michael Studman * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.BlockCallback)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * Implementation of Ruby's Enumerator module. */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyEnumerator) directive(extends) ident(RubyObject) operator({) comment(/** target for each operation */) directive(private) ident(IRubyObject) ident(object)operator(;) comment(/** method to invoke for each operation */) directive(private) ident(IRubyObject) ident(method)operator(;) comment(/** args to each method */) directive(private) ident(IRubyObject)type([]) ident(methodArgs)operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(ENUMERATOR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyEnumerator)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) type(void) ident(defineEnumerator)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(kernel) operator(=) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(;) ident(kernel)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(RubyModule) ident(enm) operator(=) ident(runtime)operator(.)ident(getClassFromPath)operator(()stringoperator(\))operator(;) ident(enm)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(enm)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(enm)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(enm)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(enm)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(RubyClass) ident(enmr) operator(=) ident(enm)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ENUMERATOR_ALLOCATOR)operator(\))operator(;) ident(enmr)operator(.)ident(includeModule)operator(()ident(enm)operator(\))operator(;) ident(enmr)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(enmr)operator(.)ident(defineAnnotatedMethod)operator(()ident(RubyEnumerator)operator(.)ident(class)operator(,) stringoperator(\))operator(;) ident(runtime)operator(.)ident(setEnumerator)operator(()ident(enmr)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(optional) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_to_enum)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject)type([]) ident(newArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(args)operator(.)ident(length) operator(+) integer(1)operator(])operator(;) ident(newArgs)operator([)integer(0)operator(]) operator(=) ident(self)operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(newArgs)operator(,) integer(1)operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getEnumerator)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(newArgs)operator(\))operator(;) operator(}) directive(private) ident(RubyEnumerator)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) ident(object) operator(=) ident(method) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(object) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(method) operator(=) ident(args)operator(.)ident(length) operator(>) integer(1) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) operator({) ident(methodArgs) operator(=) keyword(new) ident(IRubyObject)operator([)pre_type(Math)operator(.)ident(max)operator(()integer(0)operator(,) ident(args)operator(.)ident(length) operator(-) integer(2)operator(\))operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(2)operator(,) ident(methodArgs)operator(,) integer(0)operator(,) ident(args)operator(.)ident(length) operator(-) integer(2)operator(\))operator(;) operator(}) keyword(else) operator({) ident(methodArgs) operator(=) keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * Send current block and supplied args to method on target. According to MRI * Block may not be given and "each" should just ignore it and call on through to * underlying method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(object)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(.)ident(asJavaString)operator(()operator(\))operator(,) ident(methodArgs)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_with_index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) ident(IRubyObject) ident(enumerator) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getEnumerator)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(enumerator)operator(,) stringoperator(,) ident(self)operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_slice)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) type(int) ident(size) operator(=) operator(()type(int)operator(\))ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(size) operator(<=) integer(0)operator(\)) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result)type([]) operator(=) keyword(new) ident(RubyArray)type([])operator({)ident(runtime)operator(.)ident(newArray)operator(()ident(size)operator(\))operator(})operator(;) ident(RubyEnumerable)operator(.)ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(result)operator([)integer(0)operator(])operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(result)operator([)integer(0)operator(])operator(.)ident(size)operator(()operator(\)) operator(==) ident(size)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(;) ident(result)operator([)integer(0)operator(]) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(size)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(if) operator(()ident(result)operator([)integer(0)operator(])operator(.)ident(size)operator(()operator(\)) operator(>) integer(0)operator(\)) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(result)operator([)integer(0)operator(])operator(\))operator(;) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_cons)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) type(int) ident(size) operator(=) operator(()type(int)operator(\))ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(size) operator(<=) integer(0)operator(\)) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(size)operator(\))operator(;) ident(RubyEnumerable)operator(.)ident(callEach)operator(()ident(runtime)operator(,) ident(context)operator(,) ident(self)operator(,) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(largs)operator(,) ident(Block) ident(blk)operator(\)) operator({) keyword(if) operator(()ident(result)operator(.)ident(size)operator(()operator(\)) operator(==) ident(size)operator(\)) ident(result)operator(.)ident(shift)operator(()operator(\))operator(;) ident(result)operator(.)ident(append)operator(()ident(largs)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(size)operator(()operator(\)) operator(==) ident(size)operator(\)) ident(block)operator(.)ident(yield)operator(()ident(ctx)operator(,) ident(result)operator(.)ident(aryDup)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(enum_slice)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(IRubyObject) ident(enumerator) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getEnumerator)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(enumerator)operator(,) stringoperator(,) ident(self)operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()stringoperator(\))operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(enum_cons)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(IRubyObject) ident(enumerator) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getEnumerator)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(enumerator)operator(,) stringoperator(,) ident(self)operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()stringoperator(\))operator(,) ident(arg)operator(\))operator(;) operator(}) operator(}) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.ext.posix.Passwd)operator(;) keyword(import) include(org.jruby.ext.posix.Group)operator(;) keyword(import) include(org.jruby.ext.posix.POSIX)operator(;) keyword(import) include(org.jruby.ext.posix.util.Platform)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyEtc) operator({) directive(public) directive(static) ident(RubyModule) ident(createEtcModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(etcModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setEtc)operator(()ident(etcModule)operator(\))operator(;) ident(etcModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyEtc)operator(.)ident(class)operator(\))operator(;) ident(definePasswdStruct)operator(()ident(runtime)operator(\))operator(;) ident(defineGroupStruct)operator(()ident(runtime)operator(\))operator(;) keyword(return) ident(etcModule)operator(;) operator(}) directive(private) directive(static) type(void) ident(definePasswdStruct)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\)) operator(})operator(;) ident(runtime)operator(.)ident(setPasswdStruct)operator(()ident(RubyStruct)operator(.)ident(newInstance)operator(()ident(runtime)operator(.)ident(getStructClass)operator(()operator(\))operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(defineGroupStruct)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\)) operator(})operator(;) ident(runtime)operator(.)ident(setGroupStruct)operator(()ident(RubyStruct)operator(.)ident(newInstance)operator(()ident(runtime)operator(.)ident(getStructClass)operator(()operator(\))operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(setupPasswd)operator(()ident(Ruby) ident(runtime)operator(,) ident(Passwd) ident(passwd)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getLoginName)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getPassword)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(passwd)operator(.)ident(getUID)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(passwd)operator(.)ident(getGID)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getGECOS)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getHome)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getShell)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(passwd)operator(.)ident(getPasswdChangeTime)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(passwd)operator(.)ident(getAccessClass)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(passwd)operator(.)ident(getExpire)operator(()operator(\))operator(\)) operator(})operator(;) keyword(return) ident(RubyStruct)operator(.)ident(newStruct)operator(()ident(runtime)operator(.)ident(getPasswdStruct)operator(()operator(\))operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(setupGroup)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Group) ident(group)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newString)operator(()ident(group)operator(.)ident(getName)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(group)operator(.)ident(getPassword)operator(()operator(\))operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(group)operator(.)ident(getGID)operator(()operator(\))operator(\))operator(,) ident(intoStringArray)operator(()ident(runtime)operator(,) ident(group)operator(.)ident(getMembers)operator(()operator(\))operator(\)) operator(})operator(;) keyword(return) ident(RubyStruct)operator(.)ident(newStruct)operator(()ident(runtime)operator(.)ident(getGroupStruct)operator(()operator(\))operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(intoStringArray)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String)type([]) ident(members)operator(\)) operator({) ident(IRubyObject)type([]) ident(arr) operator(=) keyword(new) ident(IRubyObject)operator([)ident(members)operator(.)ident(length)operator(])operator(;) keyword(for)operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i)operator(<)ident(arr)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(arr)operator([)ident(i)operator(]) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(members)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newArrayNoCopy)operator(()ident(arr)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional)operator(=)integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpwuid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) type(int) ident(uid) operator(=) ident(args)operator(.)ident(length) operator(==) integer(0) operator(?) ident(posix)operator(.)ident(getuid)operator(()operator(\)) operator(:) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) ident(Passwd) ident(pwd) operator(=) ident(posix)operator(.)ident(getpwuid)operator(()ident(uid)operator(\))operator(;) keyword(if)operator(()ident(pwd) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) comment(// MRI behavior) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(uid)operator(\))operator(;) operator(}) keyword(return) ident(setupPasswd)operator(()ident(runtime)operator(,) ident(pwd)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required)operator(=)integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpwnam)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) pre_type(String) ident(nam) operator(=) ident(name)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(Passwd) ident(pwd) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpwnam)operator(()ident(nam)operator(\))operator(;) keyword(if)operator(()ident(pwd) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) comment(// MRI behavior) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(nam)operator(\))operator(;) operator(}) keyword(return) ident(setupPasswd)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pwd)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(passwd)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) keyword(if)operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(posix)operator(.)ident(setpwent)operator(()operator(\))operator(;) ident(Passwd) ident(pw)operator(;) keyword(while)operator(()operator(()ident(pw) operator(=) ident(posix)operator(.)ident(getpwent)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(setupPasswd)operator(()ident(runtime)operator(,) ident(pw)operator(\))operator(\))operator(;) operator(}) ident(posix)operator(.)ident(endpwent)operator(()operator(\))operator(;) operator(}) ident(Passwd) ident(pw) operator(=) ident(posix)operator(.)ident(getpwent)operator(()operator(\))operator(;) keyword(if) operator(()ident(pw) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(setupPasswd)operator(()ident(runtime)operator(,) ident(pw)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getlogin)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(login) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getlogin)operator(()operator(\))operator(;) keyword(if) operator(()ident(login) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(login)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(endpwent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(endpwent)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setpwent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setpwent)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpwent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(Passwd) ident(passwd) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpwent)operator(()operator(\))operator(;) keyword(if) operator(()ident(passwd) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(setupPasswd)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(passwd)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required)operator(=)integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getgrnam)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) pre_type(String) ident(nam) operator(=) ident(name)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(Group) ident(grp) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getgrnam)operator(()ident(nam)operator(\))operator(;) keyword(if)operator(()ident(grp) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) comment(// MRI behavior) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(nam)operator(\))operator(;) operator(}) keyword(return) ident(setupGroup)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(grp)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional)operator(=)integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getgrgid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) type(int) ident(gid) operator(=) ident(args)operator(.)ident(length) operator(==) integer(0) operator(?) ident(posix)operator(.)ident(getgid)operator(()operator(\)) operator(:) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) pre_type(Group) ident(gr) operator(=) ident(posix)operator(.)ident(getgrgid)operator(()ident(gid)operator(\))operator(;) keyword(if)operator(()ident(gr) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) comment(// MRI behavior) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(gid)operator(\))operator(;) operator(}) keyword(return) ident(setupGroup)operator(()ident(runtime)operator(,) ident(gr)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(endgrent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(endgrent)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setgrent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setgrent)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(group)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) keyword(if)operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(posix)operator(.)ident(setgrent)operator(()operator(\))operator(;) pre_type(Group) ident(gr)operator(;) keyword(while)operator(()operator(()ident(gr) operator(=) ident(posix)operator(.)ident(getgrent)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(setupGroup)operator(()ident(runtime)operator(,) ident(gr)operator(\))operator(\))operator(;) operator(}) ident(posix)operator(.)ident(endgrent)operator(()operator(\))operator(;) operator(}) pre_type(Group) ident(gr) operator(=) ident(posix)operator(.)ident(getgrent)operator(()operator(\))operator(;) keyword(if) operator(()ident(gr) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(setupGroup)operator(()ident(runtime)operator(,) ident(gr)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getgrent)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Group) ident(gr) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getgrent)operator(()operator(\))operator(;) keyword(if) operator(()ident(gr) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(setupGroup)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(gr)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2004 Joey Gibson * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 David Corbin * Copyright (C\) 2006 Michael Studman * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ObjectMarshal)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) keyword(import) include(org.jruby.runtime.component.VariableEntry)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.SafePropertyAccessor)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyException) directive(extends) ident(RubyObject) operator({) directive(private) pre_type(StackTraceElement)type([]) ident(backtraceFrames)operator(;) directive(private) pre_type(StackTraceElement)type([]) ident(javaStackTrace)operator(;) directive(private) ident(IRubyObject) ident(backtrace)operator(;) directive(public) ident(IRubyObject) ident(message)operator(;) directive(public) directive(static) directive(final) type(int) ident(TRACE_HEAD) operator(=) integer(8)operator(;) directive(public) directive(static) directive(final) type(int) ident(TRACE_TAIL) operator(=) integer(4)operator(;) directive(public) directive(static) directive(final) type(int) ident(TRACE_MAX) operator(=) ident(TRACE_HEAD) operator(+) ident(TRACE_TAIL) operator(+) integer(6)operator(;) directive(protected) ident(RubyException)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(RubyException)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(String) ident(message)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) local_variable(this)operator(.)ident(message) operator(=) ident(message) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(newString)operator(()ident(message)operator(\))operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(EXCEPTION_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyException) ident(instance) operator(=) keyword(new) ident(RubyException)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) comment(// for future compatibility as constructors move toward not accepting metaclass?) ident(instance)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) directive(private) directive(static) directive(final) ident(ObjectMarshal) ident(EXCEPTION_MARSHAL) operator(=) keyword(new) ident(ObjectMarshal)operator(()operator(\)) operator({) directive(public) type(void) ident(marshalTo)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Object) ident(obj)operator(,) ident(RubyClass) ident(type)operator(,) ident(MarshalStream) ident(marshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyException) ident(exc) operator(=) operator(()ident(RubyException)operator(\))ident(obj)operator(;) ident(marshalStream)operator(.)ident(registerLinkTarget)operator(()ident(exc)operator(\))operator(;) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(attrs) operator(=) ident(exc)operator(.)ident(getVariableList)operator(()operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(() stringoperator(,) ident(exc)operator(.)ident(message) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(exc)operator(.)ident(message)operator(\))operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(exc)operator(.)ident(getBacktrace)operator(()operator(\))operator(\))operator(\))operator(;) ident(marshalStream)operator(.)ident(dumpVariables)operator(()ident(attrs)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(unmarshalFrom)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(,) ident(UnmarshalStream) ident(unmarshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyException) ident(exc) operator(=) operator(()ident(RubyException)operator(\))ident(type)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(unmarshalStream)operator(.)ident(registerLinkTarget)operator(()ident(exc)operator(\))operator(;) ident(unmarshalStream)operator(.)ident(defaultVariablesUnmarshal)operator(()ident(exc)operator(\))operator(;) ident(exc)operator(.)ident(message) operator(=) ident(exc)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(;) ident(exc)operator(.)ident(set_backtrace)operator(()ident(exc)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(\))operator(;) keyword(return) ident(exc)operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createExceptionClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(exceptionClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(EXCEPTION_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setException)operator(()ident(exceptionClass)operator(\))operator(;) ident(exceptionClass)operator(.)ident(setMarshal)operator(()ident(EXCEPTION_MARSHAL)operator(\))operator(;) ident(exceptionClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyException)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(exceptionClass)operator(;) operator(}) directive(public) directive(static) ident(RubyException) ident(newException)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(excptnClass)operator(,) pre_type(String) ident(msg)operator(\)) operator({) keyword(return) keyword(new) ident(RubyException)operator(()ident(runtime)operator(,) ident(excptnClass)operator(,) ident(msg)operator(\))operator(;) operator(}) directive(public) type(void) ident(setBacktraceFrames)operator(()pre_type(StackTraceElement)type([]) ident(backtraceFrames)operator(\)) operator({) local_variable(this)operator(.)ident(backtraceFrames) operator(=) ident(backtraceFrames)operator(;) keyword(if) operator(()ident(TRACE_TYPE) operator(==) ident(RAW) operator(||) ident(TRACE_TYPE) operator(==) ident(RAW_FILTERED) operator(||) ident(TRACE_TYPE) operator(==) ident(RUBY_COMPILED) operator(||) ident(TRACE_TYPE) operator(==) ident(RUBY_HYBRID)operator(\)) operator({) ident(javaStackTrace) operator(=) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\))operator(.)ident(getStackTrace)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) directive(final) type(int) ident(RAW) operator(=) integer(0)operator(;) directive(public) directive(static) directive(final) type(int) ident(RAW_FILTERED) operator(=) integer(1)operator(;) directive(public) directive(static) directive(final) type(int) ident(RUBY_FRAMED) operator(=) integer(2)operator(;) directive(public) directive(static) directive(final) type(int) ident(RUBY_COMPILED) operator(=) integer(3)operator(;) directive(public) directive(static) directive(final) type(int) ident(RUBY_HYBRID) operator(=) integer(4)operator(;) directive(public) directive(static) directive(final) type(int) ident(TRACE_TYPE)operator(;) directive(static) operator({) pre_type(String) ident(style) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(,) stringoperator(\))operator(.)ident(toLowerCase)operator(()operator(\))operator(;) keyword(if) operator(()ident(style)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) ident(TRACE_TYPE) operator(=) ident(RAW)operator(;) keyword(else) keyword(if) operator(()ident(style)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) ident(TRACE_TYPE) operator(=) ident(RAW_FILTERED)operator(;) keyword(else) keyword(if) operator(()ident(style)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) ident(TRACE_TYPE) operator(=) ident(RUBY_FRAMED)operator(;) keyword(else) keyword(if) operator(()ident(style)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) ident(TRACE_TYPE) operator(=) ident(RUBY_COMPILED)operator(;) keyword(else) keyword(if) operator(()ident(style)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) ident(TRACE_TYPE) operator(=) ident(RUBY_HYBRID)operator(;) keyword(else) ident(TRACE_TYPE) operator(=) ident(RUBY_FRAMED)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getBacktrace)operator(()operator(\)) operator({) keyword(if) operator(()ident(backtrace) operator(==) pre_constant(null)operator(\)) operator({) ident(initBacktrace)operator(()operator(\))operator(;) operator(}) keyword(return) ident(backtrace)operator(;) operator(}) directive(public) type(void) ident(initBacktrace)operator(()operator(\)) operator({) keyword(switch) operator(()ident(TRACE_TYPE)operator(\)) operator({) keyword(case) ident(RAW)operator(:) ident(backtrace) operator(=) ident(ThreadContext)operator(.)ident(createRawBacktrace)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(javaStackTrace)operator(,) pre_constant(false)operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(RAW_FILTERED)operator(:) ident(backtrace) operator(=) ident(ThreadContext)operator(.)ident(createRawBacktrace)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(javaStackTrace)operator(,) pre_constant(true)operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(RUBY_FRAMED)operator(:) ident(backtrace) operator(=) ident(backtraceFrames) operator(==) pre_constant(null) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(ThreadContext)operator(.)ident(createBacktraceFromFrames)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(backtraceFrames)operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(RUBY_COMPILED)operator(:) ident(backtrace) operator(=) ident(ThreadContext)operator(.)ident(createRubyCompiledBacktrace)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(javaStackTrace)operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(RUBY_HYBRID)operator(:) ident(backtrace) operator(=) ident(ThreadContext)operator(.)ident(createRubyHybridBacktrace)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(backtraceFrames)operator(,) ident(javaStackTrace)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(break)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) ident(message) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(backtrace)operator(()operator(\)) operator({) keyword(return) ident(getBacktrace)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_backtrace)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(backtrace) operator(=) pre_constant(null)operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)ident(isArrayOfStrings)operator(()ident(obj)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(backtrace) operator(=) operator(()ident(RubyArray)operator(\)) ident(obj)operator(;) operator(}) keyword(return) ident(backtrace)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exception)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyException) ident(exception)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0) operator(:) keyword(return) local_variable(this)operator(;) keyword(case) integer(1) operator(:) keyword(if)operator(()ident(args)operator([)integer(0)operator(]) operator(==) local_variable(this)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) ident(RubyException) ident(ret) operator(=) operator(()ident(RubyException)operator(\))ident(rbClone)operator(()operator(\))operator(;) ident(ret)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) comment(// This looks wrong, but it's the way MRI does it.) keyword(return) ident(ret)operator(;) keyword(default) operator(:) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if) operator(()ident(message)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) ident(message)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(return) ident(message)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(to_str)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(;) operator(}) comment(/** inspects an object and return a kind of debug information * *@return A RubyString containing the debug information. */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyModule) ident(rubyClass) operator(=) ident(getMetaClass)operator(()operator(\))operator(;) ident(RubyString) ident(exception) operator(=) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(exception)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(rubyClass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) pre_type(StringBuilder) ident(sb) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) ident(sb)operator(.)ident(append)operator(()ident(rubyClass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(exception)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(sb)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(printBacktrace)operator(()pre_type(PrintStream) ident(errorStream)operator(\)) operator({) ident(IRubyObject) ident(backtrace) operator(=) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) type(boolean) ident(debug) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(backtrace)operator(.)ident(isNil)operator(()operator(\)) operator(&&) ident(backtrace) keyword(instanceof) ident(RubyArray)operator(\)) operator({) ident(IRubyObject)type([]) ident(elements) operator(=) ident(backtrace)operator(.)ident(convertToArray)operator(()operator(\))operator(.)ident(toJavaArray)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(elements)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(stackTraceLine) operator(=) ident(elements)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(stackTraceLine) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(printStackTraceLine)operator(()ident(errorStream)operator(,) ident(stackTraceLine)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(debug) operator(&&) ident(i) operator(==) ident(RubyException)operator(.)ident(TRACE_HEAD) operator(&&) ident(elements)operator(.)ident(length) operator(>) ident(RubyException)operator(.)ident(TRACE_MAX)operator(\)) operator({) type(int) ident(hiddenLevels) operator(=) ident(elements)operator(.)ident(length) operator(-) ident(RubyException)operator(.)ident(TRACE_HEAD) operator(-) ident(RubyException)operator(.)ident(TRACE_TAIL)operator(;) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(hiddenLevels) operator(+) stringoperator(\))operator(;) ident(i) operator(=) ident(elements)operator(.)ident(length) operator(-) ident(RubyException)operator(.)ident(TRACE_TAIL)operator(;) operator(}) operator(}) operator(}) operator(}) directive(private) type(void) ident(printStackTraceLine)operator(()pre_type(PrintStream) ident(errorStream)operator(,) ident(IRubyObject) ident(stackTraceLine)operator(\)) operator({) ident(errorStream)operator(.)ident(print)operator(()string operator(+) ident(stackTraceLine) operator(+) stringoperator(\))operator(;) operator(}) directive(private) type(boolean) ident(isArrayOfStrings)operator(()ident(IRubyObject) ident(backtrace)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(backtrace) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(IRubyObject)type([]) ident(elements) operator(=) operator(()operator(()ident(RubyArray)operator(\)) ident(backtrace)operator(\))operator(.)ident(toJavaArray)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0) operator(;) ident(i) operator(<) ident(elements)operator(.)ident(length) operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(elements)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyString)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2003 Joey Gibson * Copyright (C\) 2004-2007 Thomas E Enebo * Copyright (C\) 2004-2007 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.util.io.OpenFile)operator(;) keyword(import) include(org.jruby.util.io.ChannelDescriptor)operator(;) keyword(import) include(java.io.File)operator(;) keyword(import) include(java.io.FileDescriptor)operator(;) keyword(import) include(java.io.FileNotFoundException)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.Reader)operator(;) keyword(import) include(java.nio.channels.Channels)operator(;) keyword(import) include(java.nio.channels.FileChannel)operator(;) keyword(import) include(java.nio.channels.FileLock)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.ext.posix.util.Platform)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.io.DirectoryAsFileException)operator(;) keyword(import) include(org.jruby.util.io.Stream)operator(;) keyword(import) include(org.jruby.util.io.ChannelStream)operator(;) keyword(import) include(org.jruby.util.io.ModeFlags)operator(;) keyword(import) include(org.jruby.util.JRubyFile)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) keyword(import) include(org.jruby.util.io.BadDescriptorException)operator(;) keyword(import) include(org.jruby.util.io.FileExistsException)operator(;) keyword(import) include(org.jruby.util.io.InvalidValueException)operator(;) keyword(import) include(org.jruby.util.io.PipeException)operator(;) comment(/** * Ruby File class equivalent in java. **/) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyFile) directive(extends) ident(RubyIO) operator({) directive(private) directive(static) directive(final) type(long) ident(serialVersionUID) operator(=) integer(1L)operator(;) directive(public) directive(static) directive(final) type(int) ident(LOCK_SH) operator(=) integer(1)operator(;) directive(public) directive(static) directive(final) type(int) ident(LOCK_EX) operator(=) integer(2)operator(;) directive(public) directive(static) directive(final) type(int) ident(LOCK_NB) operator(=) integer(4)operator(;) directive(public) directive(static) directive(final) type(int) ident(LOCK_UN) operator(=) integer(8)operator(;) directive(private) directive(static) directive(final) type(int) ident(FNM_NOESCAPE) operator(=) integer(1)operator(;) directive(private) directive(static) directive(final) type(int) ident(FNM_PATHNAME) operator(=) integer(2)operator(;) directive(private) directive(static) directive(final) type(int) ident(FNM_DOTMATCH) operator(=) integer(4)operator(;) directive(private) directive(static) directive(final) type(int) ident(FNM_CASEFOLD) operator(=) integer(8)operator(;) directive(private) directive(static) directive(final) type(int) ident(FNM_SYSCASE)operator(;) directive(static) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) ident(FNM_SYSCASE) operator(=) ident(FNM_CASEFOLD)operator(;) operator(}) keyword(else) operator({) ident(FNM_SYSCASE) operator(=) integer(0)operator(;) operator(}) operator(}) directive(private) directive(static) type(boolean) ident(startsWithDriveLetterOnWindows)operator(()pre_type(String) ident(path)operator(\)) operator({) keyword(return) operator(()ident(path) operator(!=) pre_constant(null)operator(\)) operator(&&) ident(Platform)operator(.)ident(IS_WINDOWS) operator(&&) operator(()operator(()ident(path)operator(.)ident(length)operator(()operator(\))operator(>)integer(1) operator(&&) ident(path)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator(?) operator(()ident(path)operator(.)ident(length)operator(()operator(\)) operator(>) integer(2) operator(&&) ident(isWindowsDriveLetter)operator(()ident(path)operator(.)ident(charAt)operator(()integer(1)operator(\))operator(\)) operator(&&) ident(path)operator(.)ident(charAt)operator(()integer(2)operator(\)) operator(==) stringoperator(\)) operator(:) operator(()ident(path)operator(.)ident(length)operator(()operator(\)) operator(>) integer(1) operator(&&) ident(isWindowsDriveLetter)operator(()ident(path)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\)) operator(&&) ident(path)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) stringoperator(\))operator(\))operator(;) operator(}) comment(// adjusts paths started with '/' or '\\\\', on windows.) directive(static) pre_type(String) ident(adjustRootPathOnWindows)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(,) pre_type(String) ident(dir)operator(\)) operator({) keyword(if) operator(()ident(path) operator(==) pre_constant(null)operator(\)) keyword(return) ident(path)operator(;) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) comment(// MRI behavior on Windows: it treats '/' as a root of) comment(// a current drive (but only if SINGLE slash is present!\):) comment(// E.g., if current work directory is) comment(// 'D:/home/directory', then '/' means 'D:/'.) comment(//) comment(// Basically, '/path' is treated as a *RELATIVE* path,) comment(// relative to the current drive. '//path' is treated) comment(// as absolute one.) keyword(if) operator(()operator(()ident(path)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) operator(!)operator(()ident(path)operator(.)ident(length)operator(()operator(\))operator(>)integer(2) operator(&&) ident(path)operator(.)ident(charAt)operator(()integer(2)operator(\)) operator(==) stringoperator(\))operator(\)) operator(||) ident(path)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) keyword(if) operator(()ident(path)operator(.)ident(length)operator(()operator(\)) operator(>) integer(1) operator(&&) operator(()ident(path)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) string operator(||) ident(path)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) stringoperator(\))operator(\)) operator({) keyword(return) ident(path)operator(;) operator(}) comment(// First try to use drive letter from supplied dir value,) comment(// then try current work dir.) keyword(if) operator(()operator(!)ident(startsWithDriveLetterOnWindows)operator(()ident(dir)operator(\))operator(\)) operator({) ident(dir) operator(=) ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(dir)operator(.)ident(length)operator(()operator(\)) operator(>=) integer(2)operator(\)) operator({) ident(path) operator(=) ident(dir)operator(.)ident(substring)operator(()integer(0)operator(,) integer(2)operator(\)) operator(+) ident(path)operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(startsWithDriveLetterOnWindows)operator(()ident(path)operator(\)) operator(&&) ident(path)operator(.)ident(length)operator(()operator(\)) operator(==) integer(2)operator(\)) operator({) comment(// compensate for missing slash after drive letter on windows) ident(path) operator(+=) stringoperator(;) operator(}) operator(}) keyword(return) ident(path)operator(;) operator(}) directive(protected) pre_type(String) ident(path)operator(;) directive(private) pre_type(FileLock) ident(currentLock)operator(;) directive(public) ident(RubyFile)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) comment(// XXX This constructor is a hack to implement the __END__ syntax.) comment(// Converting a reader back into an InputStream doesn't generally work.) directive(public) ident(RubyFile)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(,) directive(final) pre_type(Reader) ident(reader)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(path)operator(,) keyword(new) pre_type(InputStream)operator(()operator(\)) operator({) directive(public) type(int) ident(read)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(return) ident(reader)operator(.)ident(read)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) directive(public) ident(RubyFile)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(,) pre_type(InputStream) ident(in)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(path) operator(=) ident(path)operator(;) keyword(try) operator({) local_variable(this)operator(.)ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()pre_type(Channels)operator(.)ident(newChannel)operator(()ident(in)operator(\))operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(openFile)operator(.)ident(setMode)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getModes)operator(()operator(\))operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(FILE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyFile) ident(instance) operator(=) keyword(new) ident(RubyFile)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(instance)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Constants) operator({)operator(}) directive(public) directive(static) ident(RubyClass) ident(createFileClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(fileClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(,) ident(FILE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setFile)operator(()ident(fileClass)operator(\))operator(;) ident(RubyString) ident(separator) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(fileClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyFile)operator(;) operator(}) operator(})operator(;) ident(separator)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(fileClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(separator)operator(\))operator(;) ident(fileClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(separator)operator(\))operator(;) keyword(if) operator(()pre_type(File)operator(.)ident(separatorChar) operator(==) stringoperator(\)) operator({) ident(RubyString) ident(altSeparator) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(altSeparator)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(fileClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(altSeparator)operator(\))operator(;) operator(}) keyword(else) operator({) ident(fileClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) ident(RubyString) ident(pathSeparator) operator(=) ident(runtime)operator(.)ident(newString)operator(()pre_type(File)operator(.)ident(pathSeparator)operator(\))operator(;) ident(pathSeparator)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(fileClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(pathSeparator)operator(\))operator(;) comment(// TODO: why are we duplicating the constants here, and then in) comment(// File::Constants below? File::Constants is included in IO.) comment(// TODO: These were missing, so we're not handling them elsewhere?) comment(// FIXME: The old value, 32786, didn't match what IOModes expected, so I reference) comment(// the constant here. THIS MAY NOT BE THE CORRECT VALUE.) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(BINARY)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_NOESCAPE)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_CASEFOLD)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_SYSCASE)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_DOTMATCH)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_PATHNAME)operator(\))operator(\))operator(;) comment(// Create constants for open flags) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(RDONLY)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(WRONLY)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(RDWR)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(CREAT)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(EXCL)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(NOCTTY)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(TRUNC)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(APPEND)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(NONBLOCK)operator(\))operator(\))operator(;) comment(// Create constants for flock) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_SH)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_EX)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_NB)operator(\))operator(\))operator(;) ident(fileClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_UN)operator(\))operator(\))operator(;) comment(// Create Constants class) ident(RubyModule) ident(constants) operator(=) ident(fileClass)operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) comment(// TODO: These were missing, so we're not handling them elsewhere?) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(BINARY)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()hex(0x1000)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_NOESCAPE)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_CASEFOLD)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_SYSCASE)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_DOTMATCH)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(FNM_PATHNAME)operator(\))operator(\))operator(;) comment(// Create constants for open flags) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(RDONLY)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(WRONLY)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(RDWR)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(CREAT)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(EXCL)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(NOCTTY)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(TRUNC)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(APPEND)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(ModeFlags)operator(.)ident(NONBLOCK)operator(\))operator(\))operator(;) comment(// Create constants for flock) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_SH)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_EX)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_NB)operator(\))operator(\))operator(;) ident(constants)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RubyFile)operator(.)ident(LOCK_UN)operator(\))operator(\))operator(;) comment(// File::Constants module is included in IO.) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(.)ident(includeModule)operator(()ident(constants)operator(\))operator(;) ident(runtime)operator(.)ident(getFileTest)operator(()operator(\))operator(.)ident(extend_object)operator(()ident(fileClass)operator(\))operator(;) ident(fileClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFile)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(fileClass)operator(;) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) comment(// Make sure any existing lock is released before we try and close the file) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(super)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(flock)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(lockingConstant)operator(\)) operator({) comment(// TODO: port exact behavior from MRI, and move most locking logic into ChannelDescriptor) comment(// TODO: for all LOCK_NB cases, return false if they would block) ident(ChannelDescriptor) ident(descriptor) operator(=) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) comment(// null channel always succeeds for all locking operations) keyword(if) operator(()ident(descriptor)operator(.)ident(isNull)operator(()operator(\))operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) pre_type(FileChannel) ident(fileChannel) operator(=) operator(()pre_type(FileChannel)operator(\))ident(descriptor)operator(.)ident(getChannel)operator(()operator(\))operator(;) type(int) ident(lockMode) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(lockingConstant)operator(\))operator(;) comment(// Exclusive locks in Java require the channel to be writable, otherwise) comment(// an exception is thrown (terminating JRuby execution\).) comment(// But flock behavior of MRI is that it allows) comment(// exclusive locks even on non-writable file. So we convert exclusive) comment(// lock to shared lock if the channel is not writable, to better match) comment(// the MRI behavior.) keyword(if) operator(()operator(!)ident(openFile)operator(.)ident(isWritable)operator(()operator(\)) operator(&&) operator(()ident(lockMode) operator(&) ident(LOCK_EX)operator(\)) operator(>) integer(0)operator(\)) operator({) ident(lockMode) operator(=) operator(()ident(lockMode) operator(^) ident(LOCK_EX)operator(\)) operator(|) ident(LOCK_SH)operator(;) operator(}) keyword(try) operator({) keyword(switch) operator(()ident(lockMode)operator(\)) operator({) keyword(case) ident(LOCK_UN)operator(:) keyword(case) ident(LOCK_UN) operator(|) ident(LOCK_NB)operator(:) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) ident(currentLock) operator(=) pre_constant(null)operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) ident(LOCK_EX)operator(:) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) ident(currentLock) operator(=) pre_constant(null)operator(;) operator(}) ident(currentLock) operator(=) ident(fileChannel)operator(.)ident(lock)operator(()operator(\))operator(;) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) ident(LOCK_EX) operator(|) ident(LOCK_NB)operator(:) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) ident(currentLock) operator(=) pre_constant(null)operator(;) operator(}) ident(currentLock) operator(=) ident(fileChannel)operator(.)ident(tryLock)operator(()operator(\))operator(;) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) ident(LOCK_SH)operator(:) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) ident(currentLock) operator(=) pre_constant(null)operator(;) operator(}) ident(currentLock) operator(=) ident(fileChannel)operator(.)ident(lock)operator(()integer(0L)operator(,) pre_type(Long)operator(.)ident(MAX_VALUE)operator(,) pre_constant(true)operator(\))operator(;) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) ident(LOCK_SH) operator(|) ident(LOCK_NB)operator(:) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentLock)operator(.)ident(release)operator(()operator(\))operator(;) ident(currentLock) operator(=) pre_constant(null)operator(;) operator(}) ident(currentLock) operator(=) ident(fileChannel)operator(.)ident(tryLock)operator(()integer(0L)operator(,) pre_type(Long)operator(.)ident(MAX_VALUE)operator(,) pre_constant(true)operator(\))operator(;) keyword(if) operator(()ident(currentLock) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(default)operator(:) operator(}) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(ioe)operator(.)ident(printStackTrace)operator(()pre_type(System)operator(.)ident(err)operator(\))operator(;) operator(}) comment(// Return false here) operator(}) keyword(catch) operator(()ident(java)operator(.)ident(nio)operator(.)ident(channels)operator(.)ident(OverlappingFileLockException) ident(ioe)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(ioe)operator(.)ident(printStackTrace)operator(()pre_type(System)operator(.)ident(err)operator(\))operator(;) operator(}) comment(// Return false here) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(openFile) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0) operator(&&) ident(args)operator(.)ident(length) operator(<) integer(3)operator(\)) operator({) ident(IRubyObject) ident(fd) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getFixnum)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_INT)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(fd)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(args)operator([)integer(0)operator(]) operator(=) ident(fd)operator(;) keyword(return) local_variable(super)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(openFile)operator(()ident(args)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(openFile)operator(()ident(IRubyObject) ident(args)type([])operator(\)) operator({) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(checkSafeString)operator(()ident(filename)operator(\))operator(;) ident(path) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getUnicodeValue)operator(()operator(\))operator(;) pre_type(String) ident(modeString)operator(;) ident(ModeFlags) ident(modes)operator(;) type(int) ident(perm)operator(;) keyword(try) operator({) keyword(if) operator(()operator(()ident(args)operator(.)ident(length) operator(>) integer(1) operator(&&) ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator(||) operator(()ident(args)operator(.)ident(length) operator(>) integer(2) operator(&&) operator(!)ident(args)operator([)integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\))operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(modeString) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(modes) operator(=) ident(getIOModes)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(modeString)operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2) operator(&&) operator(!)ident(args)operator([)integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(perm) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(perm) operator(=) integer(438)operator(;) comment(// 0666) operator(}) ident(sysopenInternal)operator(()ident(path)operator(,) ident(modes)operator(,) ident(perm)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modeString) operator(=) stringoperator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) keyword(if) operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(modeString) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) operator(}) ident(openInternal)operator(()ident(path)operator(,) ident(modeString)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({)operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(private) type(void) ident(sysopenInternal)operator(()pre_type(String) ident(path)operator(,) ident(ModeFlags) ident(modes)operator(,) type(int) ident(perm)operator(\)) directive(throws) ident(InvalidValueException) operator({) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) ident(openFile)operator(.)ident(setPath)operator(()ident(path)operator(\))operator(;) ident(openFile)operator(.)ident(setMode)operator(()ident(modes)operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(ChannelDescriptor) ident(descriptor) operator(=) ident(sysopen)operator(()ident(path)operator(,) ident(modes)operator(,) ident(perm)operator(\))operator(;) ident(openFile)operator(.)ident(setMainStream)operator(()ident(fdopen)operator(()ident(descriptor)operator(,) ident(modes)operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(descriptor)operator(\))operator(;) operator(}) directive(private) type(void) ident(openInternal)operator(()pre_type(String) ident(path)operator(,) pre_type(String) ident(modeString)operator(\)) directive(throws) ident(InvalidValueException) operator({) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) ident(openFile)operator(.)ident(setMode)operator(()ident(getIOModes)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(modeString)operator(\))operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(setPath)operator(()ident(path)operator(\))operator(;) ident(openFile)operator(.)ident(setMainStream)operator(()ident(fopen)operator(()ident(path)operator(,) ident(modeString)operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(ChannelDescriptor) ident(sysopen)operator(()pre_type(String) ident(path)operator(,) ident(ModeFlags) ident(modes)operator(,) type(int) ident(perm)operator(\)) directive(throws) ident(InvalidValueException) operator({) keyword(try) operator({) ident(ChannelDescriptor) ident(descriptor) operator(=) ident(ChannelDescriptor)operator(.)ident(open)operator(() ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(path)operator(,) ident(modes)operator(,) ident(perm)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(\))operator(;) comment(// TODO: check if too many open files, GC and try again) keyword(return) ident(descriptor)operator(;) operator(}) keyword(catch) operator(()exception(FileNotFoundException) ident(fnfe)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(DirectoryAsFileException) ident(dafe)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEISDirError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(FileExistsException) ident(fee)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEEXISTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ioe)operator(\))operator(;) operator(}) operator(}) directive(private) ident(Stream) ident(fopen)operator(()pre_type(String) ident(path)operator(,) pre_type(String) ident(modeString)operator(\)) operator({) keyword(try) operator({) ident(Stream) ident(stream) operator(=) ident(ChannelStream)operator(.)ident(fopen)operator(() ident(getRuntime)operator(()operator(\))operator(,) ident(path)operator(,) ident(getIOModes)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(modeString)operator(\))operator(\))operator(;) keyword(if) operator(()ident(stream) operator(==) pre_constant(null)operator(\)) operator({) comment(// TODO) comment(// if (errno == EMFILE || errno == ENFILE\) {) comment(// rb_gc(\);) comment(// file = fopen(fname, mode\);) comment(// }) comment(// if (!file\) {) comment(// rb_sys_fail(fname\);) comment(// }) operator(}) comment(// Do we need to be in SETVBUF mode for buffering to make sense? This comes up elsewhere.) comment(// #ifdef USE_SETVBUF) comment(// if (setvbuf(file, NULL, _IOFBF, 0\) != 0\)) comment(// rb_warn("setvbuf(\) can't be honoured for %s", fname\);) comment(// #endif) comment(// #ifdef __human68k__) comment(// fmode(file, _IOTEXT\);) comment(// #endif) keyword(return) ident(stream)operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(FileNotFoundException) ident(ex)operator(\)) operator({) comment(// FNFException can be thrown in both cases, when the file) comment(// is not found, or when permission is denied.) keyword(if) operator(()ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\)) operator(||) keyword(new) pre_type(File)operator(()ident(path)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEACCESError)operator(() string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(() string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(DirectoryAsFileException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEISDirError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(FileExistsException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEEXISTError)operator(()ident(path)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(chmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(int) ident(mode) operator(=) operator(()type(int)operator(\)) ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(path)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(chmod)operator(()ident(path)operator(,) ident(mode)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(chown)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) type(int) ident(owner) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(arg1)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(owner) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg1)operator(\))operator(;) operator(}) type(int) ident(group) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(arg2)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(group) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg2)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(path)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(chown)operator(()ident(path)operator(,) ident(owner)operator(,) ident(group)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(atime)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(path)operator(,) pre_constant(false)operator(\))operator(.)ident(atime)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(ctime)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(path)operator(,) pre_constant(false)operator(\))operator(.)ident(ctime)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(lchmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(int) ident(mode) operator(=) operator(()type(int)operator(\)) ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(path)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lchmod)operator(()ident(path)operator(,) ident(mode)operator(\))operator(\))operator(;) operator(}) comment(// TODO: this method is not present in MRI!) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(lchown)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) type(int) ident(owner) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(arg1)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(owner) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg1)operator(\))operator(;) operator(}) type(int) ident(group) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(arg2)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(group) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg2)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(path)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lchown)operator(()ident(path)operator(,) ident(owner)operator(,) ident(group)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(lstat)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(path)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(mtime)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(getLastModified)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(path)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(path)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(path)operator(\))operator(;) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(stat)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(path)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(truncate)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyInteger) ident(newLength) operator(=) ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(if) operator(()ident(newLength)operator(.)ident(getLongValue)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(try) operator({) ident(openFile)operator(.)ident(checkWritable)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(ftruncate)operator(()ident(newLength)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) comment(// Should we do anything?) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(String) ident(toString)operator(()operator(\)) operator({) keyword(return) string operator(+) ident(path) operator(+) string operator(+) ident(openFile)operator(.)ident(getMode)operator(()operator(\)) operator(+) string operator(+) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\)) operator(+) stringoperator(;) operator(}) comment(// TODO: This is also defined in the MetaClass too...Consolidate somewhere.) directive(private) directive(static) ident(ModeFlags) ident(getModes)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(object)operator(\)) directive(throws) ident(InvalidValueException) operator({) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(getIOModes)operator(()ident(runtime)operator(,) operator(()operator(()ident(RubyString)operator(\)) ident(object)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) keyword(new) ident(ModeFlags)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(object)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(val) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(val)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(path)operator(\))operator(;) keyword(if)operator(()operator(!)ident(openFile)operator(.)ident(isOpen)operator(()operator(\))operator(\)) operator({) ident(val)operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) ident(val)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(val)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* File class methods */) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(basename)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) comment(// MRI-compatible basename handling for windows drive letter paths) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) keyword(if) operator(()ident(name)operator(.)ident(length)operator(()operator(\)) operator(>) integer(1) operator(&&) ident(name)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) string operator(&&) pre_type(Character)operator(.)ident(isLetter)operator(()ident(name)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\))operator(\)) operator({) keyword(switch) operator(()ident(name)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(case) integer(2)operator(:) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(infectBy)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(3)operator(:) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(name)operator(.)ident(substring)operator(()integer(2)operator(\))operator(\))operator(.)ident(infectBy)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(switch) operator(()ident(name)operator(.)ident(charAt)operator(()integer(2)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(default)operator(:) comment(// strip c: away from relative-pathed name) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(2)operator(\))operator(;) keyword(break)operator(;) operator(}) keyword(break)operator(;) operator(}) operator(}) operator(}) keyword(while) operator(()ident(name)operator(.)ident(length)operator(()operator(\)) operator(>) integer(1) operator(&&) ident(name)operator(.)ident(charAt)operator(()ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator(==) stringoperator(\)) operator({) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(0)operator(,) ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) operator(}) comment(// Paths which end in "/" or "\\\\" must be stripped off.) type(int) ident(slashCount) operator(=) integer(0)operator(;) type(int) ident(length) operator(=) ident(name)operator(.)ident(length)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(length) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) type(char) ident(c) operator(=) ident(name)operator(.)ident(charAt)operator(()ident(i)operator(\))operator(;) keyword(if) operator(()ident(c) operator(!=) string operator(&&) ident(c) operator(!=) stringoperator(\)) operator({) keyword(break)operator(;) operator(}) ident(slashCount)operator(++)operator(;) operator(}) keyword(if) operator(()ident(slashCount) operator(>) integer(0) operator(&&) ident(length) operator(>) integer(1)operator(\)) operator({) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(0)operator(,) ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) ident(slashCount)operator(\))operator(;) operator(}) type(int) ident(index) operator(=) ident(name)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(index) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// XXX actually only on windows...) ident(index) operator(=) ident(name)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(name)operator(.)ident(equals)operator(()stringoperator(\)) operator(&&) ident(index) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()ident(index) operator(+) integer(1)operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2)operator(\)) operator({) pre_type(String) ident(ext) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(ext)operator(\))operator(\)) operator({) ident(index) operator(=) ident(name)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(index) operator(>) integer(0)operator(\)) operator({) comment(// -1 no match; 0 it is dot file not extension) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(0)operator(,) ident(index)operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(name)operator(.)ident(endsWith)operator(()ident(ext)operator(\))operator(\)) operator({) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(0)operator(,) ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) ident(ext)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(name)operator(\))operator(.)ident(infectBy)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(count) operator(=) integer(0)operator(;) ident(RubyInteger) ident(mode) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)ident(i)operator(])operator(;) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(filename)operator(,) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename)operator(\))operator(;) operator(}) type(boolean) ident(result) operator(=) integer(0) operator(==) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(chmod)operator(()ident(filename)operator(.)ident(toString)operator(()operator(\))operator(,) operator(()type(int)operator(\))ident(mode)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(result)operator(\)) operator({) ident(count)operator(++)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(count)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(3)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chown)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(count) operator(=) integer(0)operator(;) type(int) ident(owner) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(owner) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) type(int) ident(group) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(group) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(2)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)ident(i)operator(])operator(;) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(filename)operator(,) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename)operator(\))operator(;) operator(}) type(boolean) ident(result) operator(=) integer(0) operator(==) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(chown)operator(()ident(filename)operator(.)ident(toString)operator(()operator(\))operator(,) ident(owner)operator(,) ident(group)operator(\))operator(;) keyword(if) operator(()ident(result)operator(\)) operator({) ident(count)operator(++)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(count)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dirname)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyString) ident(filename) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(arg)operator(\))operator(;) pre_type(String) ident(jfilename) operator(=) ident(filename)operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) ident(jfilename)operator(.)ident(replace)operator(()stringoperator(,) stringoperator(\))operator(;) type(int) ident(minPathLength) operator(=) integer(1)operator(;) type(boolean) ident(trimmedSlashes) operator(=) pre_constant(false)operator(;) type(boolean) ident(startsWithDriveLetterOnWindows) operator(=) ident(startsWithDriveLetterOnWindows)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(startsWithDriveLetterOnWindows)operator(\)) operator({) ident(minPathLength) operator(=) integer(3)operator(;) operator(}) keyword(while) operator(()ident(name)operator(.)ident(length)operator(()operator(\)) operator(>) ident(minPathLength) operator(&&) ident(name)operator(.)ident(charAt)operator(()ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator(==) stringoperator(\)) operator({) ident(trimmedSlashes) operator(=) pre_constant(true)operator(;) ident(name) operator(=) ident(name)operator(.)ident(substring)operator(()integer(0)operator(,) ident(name)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) operator(}) pre_type(String) ident(result)operator(;) keyword(if) operator(()ident(startsWithDriveLetterOnWindows) operator(&&) ident(name)operator(.)ident(length)operator(()operator(\)) operator(==) integer(2)operator(\)) operator({) keyword(if) operator(()ident(trimmedSlashes)operator(\)) operator({) comment(// C:\\ is returned unchanged) ident(result) operator(=) ident(jfilename)operator(.)ident(substring)operator(()integer(0)operator(,) integer(3)operator(\))operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) ident(jfilename)operator(.)ident(substring)operator(()integer(0)operator(,) integer(2)operator(\)) operator(+) stringoperator(;) operator(}) operator(}) keyword(else) operator({) comment(//TODO deal with UNC names) type(int) ident(index) operator(=) ident(name)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(index) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(if) operator(()ident(startsWithDriveLetterOnWindows)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(jfilename)operator(.)ident(substring)operator(()integer(0)operator(,) integer(2)operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(index) operator(==) integer(0)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(startsWithDriveLetterOnWindows) operator(&&) ident(index) operator(==) integer(2)operator(\)) operator({) comment(// Include additional path separator) comment(// (so that dirname of "C:\\file.txt" is "C:\\", not "C:"\)) ident(index)operator(++)operator(;) operator(}) ident(result) operator(=) ident(jfilename)operator(.)ident(substring)operator(()integer(0)operator(,) ident(index)operator(\))operator(;) operator(}) type(char) ident(endChar)operator(;) comment(// trim trailing slashes) keyword(while) operator(()ident(result)operator(.)ident(length)operator(()operator(\)) operator(>) ident(minPathLength)operator(\)) operator({) ident(endChar) operator(=) ident(result)operator(.)ident(charAt)operator(()ident(result)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) keyword(if) operator(()ident(endChar) operator(==) string operator(||) ident(endChar) operator(==) stringoperator(\)) operator({) ident(result) operator(=) ident(result)operator(.)ident(substring)operator(()integer(0)operator(,) ident(result)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(result)operator(\))operator(.)ident(infectBy)operator(()ident(filename)operator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(isWindowsDriveLetter)operator(()type(char) ident(c)operator(\)) operator({) keyword(return) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\)) operator(||) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\))operator(;) operator(}) comment(/** * Returns the extension name of the file. An empty string is returned if * the filename (not the entire path\) starts or ends with a dot. * @param recv * @param arg Path to get extension name of * @return Extension, including the dot, or an empty string */) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(extname)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(IRubyObject) ident(baseFilename) operator(=) ident(basename)operator(()ident(context)operator(,) ident(recv)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(arg)operator(})operator(\))operator(;) pre_type(String) ident(filename) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(baseFilename)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(String) ident(result) operator(=) stringoperator(;) type(int) ident(dotIndex) operator(=) ident(filename)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(dotIndex) operator(>) integer(0) operator(&&) ident(dotIndex) operator(!=) operator(()ident(filename)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\))operator(\)) operator({) comment(// Dot is not at beginning and not at end of filename. ) ident(result) operator(=) ident(filename)operator(.)ident(substring)operator(()ident(dotIndex)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(result)operator(\))operator(;) operator(}) comment(/** * Converts a pathname to an absolute pathname. Relative paths are * referenced from the current working directory of the process unless * a second argument is given, in which case it will be used as the * starting point. If the second argument is also relative, it will * first be converted to an absolute pathname. * @param recv * @param args * @return Resulting absolute path as a String */) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(expand_path)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(relativePath) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) type(boolean) ident(isAbsoluteWithFilePrefix) operator(=) ident(relativePath)operator(.)ident(startsWith)operator(()stringoperator(\))operator(;) pre_type(String) ident(cwd) operator(=) pre_constant(null)operator(;) comment(// Handle ~user paths ) ident(relativePath) operator(=) ident(expandUserPath)operator(()ident(context)operator(,) ident(relativePath)operator(\))operator(;) comment(// If there's a second argument, it's the path to which the first ) comment(// argument is relative.) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2) operator(&&) operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(cwdArg) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) comment(// Handle ~user paths.) ident(cwd) operator(=) ident(expandUserPath)operator(()ident(context)operator(,) ident(cwdArg)operator(\))operator(;) ident(cwd) operator(=) ident(adjustRootPathOnWindows)operator(()ident(runtime)operator(,) ident(cwd)operator(,) pre_constant(null)operator(\))operator(;) type(boolean) ident(startsWithSlashNotOnWindows) operator(=) operator(()ident(cwd) operator(!=) pre_constant(null)operator(\)) operator(&&) operator(!)ident(Platform)operator(.)ident(IS_WINDOWS) operator(&&) ident(cwd)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(cwd)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(;) comment(// TODO: better detection when path is absolute or not.) comment(// If the path isn't absolute, then prepend the current working) comment(// directory to the path.) keyword(if) operator(()operator(!)ident(startsWithSlashNotOnWindows) operator(&&) operator(!)ident(startsWithDriveLetterOnWindows)operator(()ident(cwd)operator(\))operator(\)) operator({) ident(cwd) operator(=) keyword(new) pre_type(File)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(cwd)operator(\))operator(.)ident(getAbsolutePath)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) comment(// If there's no second argument, simply use the working directory ) comment(// of the runtime.) ident(cwd) operator(=) ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(;) operator(}) comment(// Something wrong we don't know the cwd...) comment(// TODO: Is this behavior really desirable? /mov) keyword(if) operator(()ident(cwd) operator(==) pre_constant(null)operator(\)) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) comment(/* The counting of slashes that follows is simply a way to adhere to * Ruby's UNC (or something\) compatibility. When Ruby's expand_path is * called with "//foo//bar" it will return "//foo/bar". JRuby uses * java.io.File, and hence returns "/foo/bar". In order to retain * java.io.File in the lower layers and provide full Ruby * compatibility, the number of extra slashes must be counted and * prepended to the result. */) comment(// TODO: special handling on windows for some corner cases) comment(// if (IS_WINDOWS\) {) comment(// if (relativePath.startsWith("//"\)\) {) comment(// if (relativePath.length(\) > 2 && relativePath.charAt(2\) != '/'\) {) comment(// int nextSlash = relativePath.indexOf('/', 3\);) comment(// if (nextSlash != -1\) {) comment(// return runtime.newString() comment(// relativePath.substring(0, nextSlash\)) comment(// + canonicalize(relativePath.substring(nextSlash\)\)\);) comment(// } else {) comment(// return runtime.newString(relativePath\);) comment(// }) comment(// }) comment(// }) comment(// }) comment(// Find out which string to check.) pre_type(String) ident(padSlashes) operator(=) stringoperator(;) keyword(if) operator(()operator(!)ident(Platform)operator(.)ident(IS_WINDOWS)operator(\)) operator({) keyword(if) operator(()ident(relativePath)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(relativePath)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator({) ident(padSlashes) operator(=) ident(countSlashes)operator(()ident(relativePath)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(cwd)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(cwd)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator({) ident(padSlashes) operator(=) ident(countSlashes)operator(()ident(cwd)operator(\))operator(;) operator(}) operator(}) ident(JRubyFile) ident(path)operator(;) keyword(if) operator(()ident(relativePath)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(path) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(relativePath)operator(,) ident(cwd)operator(\))operator(;) operator(}) keyword(else) operator({) ident(relativePath) operator(=) ident(adjustRootPathOnWindows)operator(()ident(runtime)operator(,) ident(relativePath)operator(,) ident(cwd)operator(\))operator(;) ident(path) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(cwd)operator(,) ident(relativePath)operator(\))operator(;) operator(}) pre_type(String) ident(tempResult) operator(=) ident(padSlashes) operator(+) ident(canonicalize)operator(()ident(path)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(;) keyword(if)operator(()ident(isAbsoluteWithFilePrefix)operator(\)) operator({) ident(tempResult) operator(=) ident(tempResult)operator(.)ident(substring)operator(()ident(tempResult)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(tempResult)operator(\))operator(;) operator(}) comment(/** * This method checks a path, and if it starts with ~, then it expands * the path to the absolute path of the user's home directory. If the * string does not begin with ~, then the string is simply returned. * unaltered. * @param recv * @param path Path to check * @return Expanded path */) directive(public) directive(static) pre_type(String) ident(expandUserPath)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(path)operator(\)) operator({) type(int) ident(pathLength) operator(=) ident(path)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(pathLength) operator(>=) integer(1) operator(&&) ident(path)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator({) comment(// Enebo : Should ~frogger\\\\foo work (it doesnt in linux ruby\)?) type(int) ident(userEnd) operator(=) ident(path)operator(.)ident(indexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(userEnd) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(if) operator(()ident(pathLength) operator(==) integer(1)operator(\)) operator({) comment(// Single '~' as whole path to expand) ident(path) operator(=) ident(RubyDir)operator(.)ident(getHomeDirectoryPath)operator(()ident(context)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) comment(// No directory delimeter. Rest of string is username) ident(userEnd) operator(=) ident(pathLength)operator(;) operator(}) operator(}) keyword(if) operator(()ident(userEnd) operator(==) integer(1)operator(\)) operator({) comment(// '~/...' as path to expand) ident(path) operator(=) ident(RubyDir)operator(.)ident(getHomeDirectoryPath)operator(()ident(context)operator(\))operator(.)ident(toString)operator(()operator(\)) operator(+) ident(path)operator(.)ident(substring)operator(()integer(1)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(userEnd) operator(>) integer(1)operator(\))operator({) comment(// '~user/...' as path to expand) pre_type(String) ident(user) operator(=) ident(path)operator(.)ident(substring)operator(()integer(1)operator(,) ident(userEnd)operator(\))operator(;) ident(IRubyObject) ident(dir) operator(=) ident(RubyDir)operator(.)ident(getHomeDirectoryPath)operator(()ident(context)operator(,) ident(user)operator(\))operator(;) keyword(if) operator(()ident(dir)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(user) operator(+) stringoperator(\))operator(;) operator(}) ident(path) operator(=) string operator(+) ident(dir) operator(+) operator(()ident(pathLength) operator(==) ident(userEnd) operator(?) string operator(:) ident(path)operator(.)ident(substring)operator(()ident(userEnd)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(path)operator(;) operator(}) comment(/** * Returns a string consisting of n-1 slashes, where * n is the number of slashes at the beginning of the input * string. * @param stringToCheck * @return */) directive(private) directive(static) pre_type(String) ident(countSlashes)operator(() pre_type(String) ident(stringToCheck) operator(\)) operator({) comment(// Count number of extra slashes in the beginning of the string.) type(int) ident(slashCount) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(stringToCheck)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(stringToCheck)operator(.)ident(charAt)operator(()ident(i)operator(\)) operator(==) stringoperator(\)) operator({) ident(slashCount)operator(++)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) operator(}) comment(// If there are N slashes, then we want N-1.) keyword(if) operator(()ident(slashCount) operator(>) integer(0)operator(\)) operator({) ident(slashCount)operator(--)operator(;) operator(}) comment(// Prepare a string with the same number of redundant slashes so that ) comment(// we easily can prepend it to the result.) type(byte)type([]) ident(slashes) operator(=) keyword(new) type(byte)operator([)ident(slashCount)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(slashCount)operator(;) ident(i)operator(++)operator(\)) operator({) ident(slashes)operator([)ident(i)operator(]) operator(=) stringoperator(;) operator(}) keyword(return) keyword(new) pre_type(String)operator(()ident(slashes)operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(canonicalize)operator(()pre_type(String) ident(path)operator(\)) operator({) keyword(return) ident(canonicalize)operator(()pre_constant(null)operator(,) ident(path)operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(canonicalize)operator(()pre_type(String) ident(canonicalPath)operator(,) pre_type(String) ident(remaining)operator(\)) operator({) keyword(if) operator(()ident(remaining) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(canonicalPath)operator(\))operator(\)) operator({) keyword(return) stringoperator(;) operator(}) keyword(else) operator({) comment(// compensate for missing slash after drive letter on windows) keyword(if) operator(()ident(startsWithDriveLetterOnWindows)operator(()ident(canonicalPath)operator(\)) operator(&&) ident(canonicalPath)operator(.)ident(length)operator(()operator(\)) operator(==) integer(2)operator(\)) operator({) ident(canonicalPath) operator(+=) stringoperator(;) operator(}) operator(}) keyword(return) ident(canonicalPath)operator(;) operator(}) pre_type(String) ident(child)operator(;) type(int) ident(slash) operator(=) ident(remaining)operator(.)ident(indexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(slash) operator(==) operator(-)integer(1)operator(\)) operator({) ident(child) operator(=) ident(remaining)operator(;) ident(remaining) operator(=) pre_constant(null)operator(;) operator(}) keyword(else) operator({) ident(child) operator(=) ident(remaining)operator(.)ident(substring)operator(()integer(0)operator(,) ident(slash)operator(\))operator(;) ident(remaining) operator(=) ident(remaining)operator(.)ident(substring)operator(()ident(slash) operator(+) integer(1)operator(\))operator(;) operator(}) keyword(if) operator(()ident(child)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) comment(// skip it) keyword(if) operator(()ident(canonicalPath) operator(!=) pre_constant(null) operator(&&) ident(canonicalPath)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0) operator(\)) ident(canonicalPath) operator(+=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(child)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) keyword(if) operator(()ident(canonicalPath) operator(==) pre_constant(null)operator(\)) keyword(throw) keyword(new) exception(IllegalArgumentException)operator(()stringoperator(\))operator(;) type(int) ident(lastDir) operator(=) ident(canonicalPath)operator(.)ident(lastIndexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(lastDir) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(if) operator(()ident(startsWithDriveLetterOnWindows)operator(()ident(canonicalPath)operator(\))operator(\)) operator({) comment(// do nothing, we should not delete the drive letter) operator(}) keyword(else) operator({) ident(canonicalPath) operator(=) stringoperator(;) operator(}) operator(}) keyword(else) operator({) ident(canonicalPath) operator(=) ident(canonicalPath)operator(.)ident(substring)operator(()integer(0)operator(,) ident(lastDir)operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(canonicalPath) operator(==) pre_constant(null)operator(\)) operator({) ident(canonicalPath) operator(=) ident(child)operator(;) operator(}) keyword(else) operator({) ident(canonicalPath) operator(+=) string operator(+) ident(child)operator(;) operator(}) keyword(return) ident(canonicalize)operator(()ident(canonicalPath)operator(,) ident(remaining)operator(\))operator(;) operator(}) comment(/** * Returns true if path matches against pattern The pattern is not a regular expression; * instead it follows rules similar to shell filename globbing. It may contain the following * metacharacters: * *: Glob - match any sequence chars (re: .*\). If like begins with '.' then it doesn't. * ?: Matches a single char (re: .\). * [set]: Matches a single char in a set (re: [...]\). * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(2)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(fnmatch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(int) ident(flags) operator(=) ident(args)operator(.)ident(length) operator(==) integer(3) operator(?) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(2)operator(])operator(\)) operator(:) integer(0)operator(;) ident(ByteList) ident(pattern) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(ByteList) ident(path) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(org)operator(.)ident(jruby)operator(.)ident(util)operator(.)ident(Dir)operator(.)ident(fnmatch)operator(()ident(pattern)operator(.)ident(bytes)operator(,) ident(pattern)operator(.)ident(begin)operator(,) ident(pattern)operator(.)ident(begin)operator(+)ident(pattern)operator(.)ident(realSize)operator(,) ident(path)operator(.)ident(bytes)operator(,) ident(path)operator(.)ident(begin)operator(,) ident(path)operator(.)ident(begin)operator(+)ident(path)operator(.)ident(realSize)operator(,) ident(flags)operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(ftype)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(true)operator(\))operator(.)ident(ftype)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(inspectJoin)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(RubyArray) ident(parent)operator(,) ident(RubyArray) ident(array)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) comment(// If already inspecting, there is no need to register/unregister again.) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()ident(parent)operator(\))operator(\)) keyword(return) ident(join)operator(()ident(context)operator(,) ident(recv)operator(,) ident(array)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(try) operator({) ident(runtime)operator(.)ident(registerInspecting)operator(()ident(parent)operator(\))operator(;) keyword(return) ident(join)operator(()ident(context)operator(,) ident(recv)operator(,) ident(array)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(unregisterInspecting)operator(()ident(parent)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) ident(RubyString) ident(join)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(RubyArray) ident(ary)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) ident(ary)operator(.)ident(toJavaArray)operator(()operator(\))operator(;) type(boolean) ident(isTainted) operator(=) pre_constant(false)operator(;) pre_type(StringBuilder) ident(buffer) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)ident(i)operator(])operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(isTainted) operator(=) pre_constant(true)operator(;) operator(}) pre_type(String) ident(element)operator(;) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(element) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyArray)operator(\)) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\)) operator({) ident(element) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(element) operator(=) ident(inspectJoin)operator(()ident(context)operator(,) ident(recv)operator(,) ident(ary)operator(,) operator(()operator(()ident(RubyArray)operator(\))ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(element) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) ident(chomp)operator(()ident(buffer)operator(\))operator(;) keyword(if) operator(()ident(i) operator(>) integer(0) operator(&&) operator(!)ident(element)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) operator(!)ident(element)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) ident(buffer)operator(.)ident(append)operator(()ident(element)operator(\))operator(;) operator(}) ident(RubyString) ident(fixedStr) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buffer)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(fixedStr)operator(.)ident(setTaint)operator(()ident(isTainted)operator(\))operator(;) keyword(return) ident(fixedStr)operator(;) operator(}) comment(/* * Fixme: This does not have exact same semantics as RubyArray.join, but they * probably could be consolidated (perhaps as join(args[], sep, doChomp\)\). */) annotation(@JRubyMethod)operator(()ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyString) ident(join)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(join)operator(()ident(context)operator(,) ident(recv)operator(,) ident(RubyArray)operator(.)ident(newArrayNoCopyLight)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(chomp)operator(()pre_type(StringBuilder) ident(buffer)operator(\)) operator({) type(int) ident(lastIndex) operator(=) ident(buffer)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(;) keyword(while) operator(()ident(lastIndex) operator(>=) integer(0) operator(&&) operator(()ident(buffer)operator(.)ident(lastIndexOf)operator(()stringoperator(\)) operator(==) ident(lastIndex) operator(||) ident(buffer)operator(.)ident(lastIndexOf)operator(()stringoperator(\)) operator(==) ident(lastIndex)operator(\))operator(\)) operator({) ident(buffer)operator(.)ident(setLength)operator(()ident(lastIndex)operator(\))operator(;) ident(lastIndex)operator(--)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(lstat)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) pre_type(String) ident(f) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(f)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(f) operator(=) ident(f)operator(.)ident(substring)operator(()integer(5)operator(,) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(f)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(stat)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) pre_type(String) ident(f) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(f)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(f) operator(=) ident(f)operator(.)ident(substring)operator(()integer(5)operator(,) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(f)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(atime)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) pre_type(String) ident(f) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(f)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(f) operator(=) ident(f)operator(.)ident(substring)operator(()integer(5)operator(,) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(f)operator(,) pre_constant(false)operator(\))operator(.)ident(atime)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(ctime)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) pre_type(String) ident(f) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(f)operator(.)ident(startsWith)operator(()stringoperator(\)) operator(&&) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(f) operator(=) ident(f)operator(.)ident(substring)operator(()integer(5)operator(,) ident(f)operator(.)ident(indexOf)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(f)operator(,) pre_constant(false)operator(\))operator(.)ident(ctime)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(lchmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(count) operator(=) integer(0)operator(;) ident(RubyInteger) ident(mode) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)ident(i)operator(])operator(;) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(filename)operator(,) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename)operator(\))operator(;) operator(}) type(boolean) ident(result) operator(=) integer(0) operator(==) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lchmod)operator(()ident(filename)operator(.)ident(toString)operator(()operator(\))operator(,) operator(()type(int)operator(\))ident(mode)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(result)operator(\)) operator({) ident(count)operator(++)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(count)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(3)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(lchown)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(owner) operator(=) operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(0)operator(])operator(\)) operator(:) operator(-)integer(1)operator(;) type(int) ident(group) operator(=) operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)integer(1)operator(])operator(\)) operator(:) operator(-)integer(1)operator(;) type(int) ident(count) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(2)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)ident(i)operator(])operator(;) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(filename)operator(,) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename)operator(\))operator(;) operator(}) type(boolean) ident(result) operator(=) integer(0) operator(==) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lchown)operator(()ident(filename)operator(.)ident(toString)operator(()operator(\))operator(,) ident(owner)operator(,) ident(group)operator(\))operator(;) keyword(if) operator(()ident(result)operator(\)) operator({) ident(count)operator(++)operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(count)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(link)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(from)operator(,) ident(IRubyObject) ident(to)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyString) ident(fromStr) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(from)operator(\))operator(;) ident(RubyString) ident(toStr) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(to)operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(link)operator(() ident(fromStr)operator(.)ident(toString)operator(()operator(\))operator(,)ident(toStr)operator(.)ident(toString)operator(()operator(\))operator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// FIXME: When we get JNA3 we need to properly write this to errno.) keyword(throw) ident(runtime)operator(.)ident(newErrnoEEXISTError)operator(()string operator(+) ident(fromStr) operator(+) string operator(+) ident(toStr)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(java)operator(.)ident(lang)operator(.)ident(UnsatisfiedLinkError) ident(ule)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(mtime)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) keyword(return) ident(getLastModified)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rename)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(oldName)operator(,) ident(IRubyObject) ident(newName)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyString) ident(oldNameString) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(oldName)operator(\))operator(;) ident(RubyString) ident(newNameString) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(newName)operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(oldNameString)operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(newNameString)operator(\))operator(;) ident(JRubyFile) ident(oldFile) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(oldNameString)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(JRubyFile) ident(newFile) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(newNameString)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(oldFile)operator(.)ident(exists)operator(()operator(\)) operator(||) operator(!)ident(newFile)operator(.)ident(getParentFile)operator(()operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(oldNameString) operator(+) string operator(+) ident(newNameString)operator(\))operator(;) operator(}) ident(JRubyFile) ident(dest) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(newNameString)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(oldFile)operator(.)ident(renameTo)operator(()ident(dest)operator(\))operator(\)) operator({) comment(// rename is successful) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(// rename via Java API call wasn't successful, let's try some tricks, similar to MRI ) keyword(if) operator(()ident(newFile)operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(chmod)operator(()ident(newNameString)operator(.)ident(toString)operator(()operator(\))operator(,) oct(0666)operator(\))operator(;) ident(newFile)operator(.)ident(delete)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(oldFile)operator(.)ident(renameTo)operator(()ident(dest)operator(\))operator(\)) operator({) comment(// try to rename one more time) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newErrnoEACCESError)operator(()string operator(+) ident(oldNameString) operator(+) string operator(+) ident(newNameString)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyString) ident(filename) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(arg)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(dirname)operator(()ident(context)operator(,) ident(recv)operator(,) ident(filename)operator(\))operator(,) ident(basename)operator(()ident(context)operator(,) ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(filename) operator(})operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(symlink)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(from)operator(,) ident(IRubyObject) ident(to)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyString) ident(fromStr) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(from)operator(\))operator(;) ident(RubyString) ident(toStr) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(to)operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(symlink)operator(() ident(fromStr)operator(.)ident(toString)operator(()operator(\))operator(,) ident(toStr)operator(.)ident(toString)operator(()operator(\))operator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// FIXME: When we get JNA3 we need to properly write this to errno.) keyword(throw) ident(runtime)operator(.)ident(newErrnoEEXISTError)operator(()string operator(+) ident(fromStr) operator(+) string operator(+) ident(toStr)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(java)operator(.)ident(lang)operator(.)ident(UnsatisfiedLinkError) ident(ule)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(readlink)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(path)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) pre_type(String) ident(realPath) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(readlink)operator(()ident(path)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(recv)operator(,) ident(path)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(RubyFileTest)operator(.)ident(symlink_p)operator(()ident(recv)operator(,) ident(path)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(if) operator(()ident(realPath) operator(==) pre_constant(null)operator(\)) operator({) comment(//FIXME: When we get JNA3 we need to properly write this to errno.) operator(}) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(realPath)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(// Can we produce IOError which bypasses a close?) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(truncate)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyString) ident(filename) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(;) comment(// TODO: SafeStringValue here) ident(RubyInteger) ident(newLength) operator(=) ident(arg2)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(filename)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(() string operator(+) ident(filename)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(newLength)operator(.)ident(getLongValue)operator(()operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()string operator(+) ident(filename)operator(\))operator(;) operator(}) ident(IRubyObject)type([]) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(filename)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\)) operator(})operator(;) ident(RubyFile) ident(file) operator(=) operator(()ident(RubyFile)operator(\)) ident(open)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) ident(file)operator(.)ident(truncate)operator(()ident(context)operator(,) ident(newLength)operator(\))operator(;) ident(file)operator(.)ident(close)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(meta) operator(=) pre_constant(true)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(umask)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(oldMask) operator(=) integer(0)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(oldMask) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(umask)operator(()integer(0)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(umask)operator(()ident(oldMask)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(oldMask) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(umask)operator(()operator(()type(int)operator(\)) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(oldMask)operator(\))operator(;) operator(}) comment(/** * This method does NOT set atime, only mtime, since Java doesn't support anything else. */) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(2)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(utime)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) comment(// Ignore access_time argument since Java does not support it.) type(long) ident(mtime)operator(;) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyTime)operator(\)) operator({) ident(mtime) operator(=) operator(()operator(()ident(RubyTime)operator(\)) ident(args)operator([)integer(1)operator(])operator(\))operator(.)ident(getJavaDate)operator(()operator(\))operator(.)ident(getTime)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyNumeric)operator(\)) operator({) ident(mtime) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) operator(==) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\)) operator({) ident(mtime) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyTime) ident(time) operator(=) operator(()ident(RubyTime)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(args)operator([)integer(1)operator(])operator(,) ident(runtime)operator(.)ident(getTime)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(NO_INDEX)operator(,)stringoperator(,) pre_constant(true)operator(\))operator(;) ident(mtime) operator(=) ident(time)operator(.)ident(getJavaDate)operator(()operator(\))operator(.)ident(getTime)operator(()operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(2)operator(,) ident(j) operator(=) ident(args)operator(.)ident(length)operator(;) ident(i) operator(<) ident(j)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyString) ident(filename) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(filename)operator(\))operator(;) ident(JRubyFile) ident(fileToTouch) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,)ident(filename)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(fileToTouch)operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename) operator(+) stringoperator(\))operator(;) operator(}) ident(fileToTouch)operator(.)ident(setLastModified)operator(()ident(mtime)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(args)operator(.)ident(length) operator(-) integer(2)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(unlink)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyString) ident(filename) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(filename)operator(\))operator(;) ident(JRubyFile) ident(lToDelete) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,)ident(filename)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) type(boolean) ident(isSymlink) operator(=) ident(RubyFileTest)operator(.)ident(symlink_p)operator(()ident(recv)operator(,) ident(filename)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) comment(// Broken symlinks considered by exists(\) as non-existing,) comment(// so we need to check for symlinks explicitly.) keyword(if) operator(()operator(!)ident(lToDelete)operator(.)ident(exists)operator(()operator(\)) operator(&&) operator(!)ident(isSymlink)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(lToDelete)operator(.)ident(delete)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEACCESError)operator(()string operator(+) ident(filename) operator(+) stringoperator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(args)operator(.)ident(length)operator(\))operator(;) operator(}) comment(// Fast path since JNA stat is about 10x slower than this) directive(private) directive(static) ident(IRubyObject) ident(getLastModified)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(runtime)operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(path)operator(\))operator(;) keyword(if) operator(()operator(!)ident(file)operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(path)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newTime)operator(()ident(file)operator(.)ident(lastModified)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Joey Gibson * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.FileDescriptor)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.ext.posix.FileStat)operator(;) keyword(import) include(org.jruby.ext.posix.util.Platform)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.JRubyFile)operator(;) comment(/** * Implements File::Stat */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyFileStat) directive(extends) ident(RubyObject) operator({) directive(private) directive(static) directive(final) type(long) ident(serialVersionUID) operator(=) integer(1L)operator(;) directive(private) ident(JRubyFile) ident(file)operator(;) directive(private) ident(FileStat) ident(stat)operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyFileStat)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createFileStatClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// TODO: NOT_ALLOCATABLE_ALLOCATOR is probably ok here. Confirm. JRUBY-415) directive(final) ident(RubyClass) ident(fileStatClass) operator(=) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setFileStat)operator(()ident(fileStatClass)operator(\))operator(;) ident(fileStatClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(\))operator(;) ident(fileStatClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFileStat)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(fileStatClass)operator(;) operator(}) directive(protected) ident(RubyFileStat)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(clazz)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(clazz)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyFileStat) ident(newFileStat)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(filename)operator(,) type(boolean) ident(lstat)operator(\)) operator({) ident(RubyFileStat) ident(stat) operator(=) keyword(new) ident(RubyFileStat)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getFileStat)operator(()operator(\))operator(\))operator(;) ident(stat)operator(.)ident(setup)operator(()ident(filename)operator(,) ident(lstat)operator(\))operator(;) keyword(return) ident(stat)operator(;) operator(}) directive(public) directive(static) ident(RubyFileStat) ident(newFileStat)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(FileDescriptor) ident(descriptor)operator(\)) operator({) ident(RubyFileStat) ident(stat) operator(=) keyword(new) ident(RubyFileStat)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getFileStat)operator(()operator(\))operator(\))operator(;) ident(stat)operator(.)ident(setup)operator(()ident(descriptor)operator(\))operator(;) keyword(return) ident(stat)operator(;) operator(}) directive(private) type(void) ident(setup)operator(()pre_type(FileDescriptor) ident(descriptor)operator(\)) operator({) ident(stat) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(fstat)operator(()ident(descriptor)operator(\))operator(;) operator(}) directive(private) type(void) ident(setup)operator(()pre_type(String) ident(filename)operator(,) type(boolean) ident(lstat)operator(\)) operator({) keyword(if) operator(()ident(Platform)operator(.)ident(IS_WINDOWS) operator(&&) ident(filename)operator(.)ident(length)operator(()operator(\)) operator(==) integer(2) operator(&&) ident(filename)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) string operator(&&) pre_type(Character)operator(.)ident(isLetter)operator(()ident(filename)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\))operator(\)) operator({) ident(filename) operator(+=) stringoperator(;) operator(}) ident(file) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(filename)operator(\))operator(;) keyword(if) operator(()ident(lstat)operator(\)) operator({) ident(stat) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lstat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(stat) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject) ident(fname)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(setup)operator(()ident(fname)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(atime)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newTime)operator(()ident(stat)operator(.)ident(atime)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(blksize)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(blockSize)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(blockdev_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isBlockDev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(blocks)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(blocks)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(chardev_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isCharDev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(cmp)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyFileStat)operator(\))operator(\)) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(long) ident(time1) operator(=) ident(stat)operator(.)ident(mtime)operator(()operator(\))operator(;) type(long) ident(time2) operator(=) operator(()operator(()ident(RubyFileStat)operator(\)) ident(other)operator(\))operator(.)ident(stat)operator(.)ident(mtime)operator(()operator(\))operator(;) keyword(if) operator(()ident(time1) operator(==) ident(time2)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(time1) operator(<) ident(time2)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(-)integer(1)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(ctime)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newTime)operator(()ident(stat)operator(.)ident(ctime)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(dev)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(dev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(devMajor)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(major)operator(()ident(stat)operator(.)ident(dev)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(devMinor)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(minor)operator(()ident(stat)operator(.)ident(dev)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(directory_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isDirectory)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(executable_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isExecutable)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(executableReal_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isExecutableReal)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(file_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isFile)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(ftype)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(stat)operator(.)ident(ftype)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(gid)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(gid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(group_owned_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isGroupOwned)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(original) keyword(instanceof) ident(RubyFileStat)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyFileStat) ident(originalFileStat) operator(=) operator(()ident(RubyFileStat)operator(\)) ident(original)operator(;) ident(file) operator(=) ident(originalFileStat)operator(.)ident(file)operator(;) ident(stat) operator(=) ident(originalFileStat)operator(.)ident(stat)operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(ino)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(ino)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(buf) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) ident(buf)operator(.)ident(append)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(;) comment(// FIXME: Obvious issue that not all platforms can display all attributes. Ugly hacks.) comment(// Using generic posix library makes pushing inspect behavior into specific system impls) comment(// rather painful.) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()pre_type(Long)operator(.)ident(toHexString)operator(()ident(stat)operator(.)ident(dev)operator(()operator(\))operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(ino)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()pre_type(Integer)operator(.)ident(toOctalString)operator(()ident(stat)operator(.)ident(mode)operator(()operator(\))operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(nlink)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(uid)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(gid)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()pre_type(Long)operator(.)ident(toHexString)operator(()ident(stat)operator(.)ident(rdev)operator(()operator(\))operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(st_size)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(blockSize)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) keyword(try) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(stat)operator(.)ident(blocks)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({)operator(}) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(atime)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(mtime)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(ctime)operator(()operator(\))operator(\))operator(;) ident(buf)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buf)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(uid)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(uid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(mode)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(mode)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(mtime)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newTime)operator(()ident(stat)operator(.)ident(mtime)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(mtimeEquals)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(mtime)operator(()operator(\)) operator(==) ident(newFileStat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(other)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(stat)operator(.)ident(mtime)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(mtimeGreaterThan)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(mtime)operator(()operator(\)) operator(>) ident(newFileStat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(other)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(stat)operator(.)ident(mtime)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(mtimeLessThan)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(mtime)operator(()operator(\)) operator(<) ident(newFileStat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(other)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(stat)operator(.)ident(mtime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nlink)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(nlink)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(owned_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isOwned)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pipe_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isNamedPipe)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rdev)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(rdev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rdevMajor)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(major)operator(()ident(stat)operator(.)ident(rdev)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rdevMinor)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(minor)operator(()ident(stat)operator(.)ident(rdev)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(readable_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isReadable)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(readableReal_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isReadableReal)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(setgid_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isSetgid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(setuid_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isSetuid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(size)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(stat)operator(.)ident(st_size)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(size_p)operator(()operator(\)) operator({) type(long) ident(size) operator(=) ident(stat)operator(.)ident(st_size)operator(()operator(\))operator(;) keyword(if) operator(()ident(size) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(size)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(socket_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isSocket)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sticky_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isSticky)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(symlink_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isSymlink)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(writable_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isWritable)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(writableReal_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isWritableReal)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(zero_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(stat)operator(.)ident(isEmpty)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Jan Arne Petersen * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.JRubyFile)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyFileTest) operator({) directive(public) directive(static) ident(RubyModule) ident(createFileTestModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(fileTestModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setFileTest)operator(()ident(fileTestModule)operator(\))operator(;) ident(fileTestModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFileTest)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(fileTestModule)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(blockdev_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isBlockDev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chardev_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isCharDev)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(directory_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isDirectory)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(executable_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isExecutable)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(executable_real_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isExecutableReal)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exist_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) keyword(if) operator(()ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(if)operator(()ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) pre_type(String) ident(file) operator(=) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(.)ident(substring)operator(()integer(5)operator(\))operator(;) type(int) ident(bang) operator(=) ident(file)operator(.)ident(indexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(bang) operator(==) operator(-)integer(1) operator(||) ident(bang) operator(==) ident(file)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(jar) operator(=) ident(file)operator(.)ident(substring)operator(()integer(0)operator(,) ident(bang)operator(\))operator(;) pre_type(String) ident(after) operator(=) ident(file)operator(.)ident(substring)operator(()ident(bang) operator(+) integer(2)operator(\))operator(;) keyword(try) operator({) ident(java)operator(.)ident(util)operator(.)ident(jar)operator(.)ident(JarFile) ident(jf) operator(=) keyword(new) ident(java)operator(.)ident(util)operator(.)ident(jar)operator(.)ident(JarFile)operator(()ident(jar)operator(\))operator(;) keyword(if)operator(()ident(jf)operator(.)ident(getJarEntry)operator(()ident(after)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(file)operator(()ident(filename)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(file_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(filename)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(file)operator(.)ident(isFile)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(grpowned_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isGroupOwned)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(identical_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename1)operator(,) ident(IRubyObject) ident(filename2)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file1) operator(=) ident(file)operator(()ident(filename1)operator(\))operator(;) ident(JRubyFile) ident(file2) operator(=) ident(file)operator(()ident(filename2)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file1)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(file2)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file1)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isIdentical)operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file2)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(owned_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isOwned)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(pipe_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isNamedPipe)operator(()operator(\))operator(\))operator(;) operator(}) comment(// We use file test since it is faster than a stat; also euid == uid in Java always) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(readable_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(file)operator(.)ident(canRead)operator(()operator(\))operator(\))operator(;) operator(}) comment(// Not exposed by filetest, but so similiar in nature that it is stored here) directive(public) directive(static) ident(IRubyObject) ident(rowned_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isROwned)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setgid_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isSetgid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setuid_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isSetuid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(size)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(if) operator(()operator(!)ident(file)operator(.)ident(exists)operator(()operator(\))operator(\)) ident(noFileError)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(file)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(size_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(if) operator(()operator(!)ident(file)operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(long) ident(length) operator(=) ident(file)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(length) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(length)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(socket_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isSocket)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sticky_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(stat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isSticky)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(symlink_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(try) operator({) comment(// Note: We can't use file.exists(\) to check whether the symlink) comment(// exists or not, because that method returns false for existing) comment(// but broken symlink. So, we try without the existence check,) comment(// but in the try-catch block.) comment(// MRI behavior: symlink? on broken symlink should return true.) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(lstat)operator(()ident(file)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(\))operator(.)ident(isSymlink)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(re)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) comment(// We do both writable and writable_real through the same method because) comment(// in our java process effective and real userid will always be the same.) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(writable_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) keyword(return) ident(filename)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(file)operator(()ident(filename)operator(\))operator(.)ident(canWrite)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(zero_p)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(\)) operator({) ident(JRubyFile) ident(file) operator(=) ident(file)operator(()ident(filename)operator(\))operator(;) keyword(return) ident(filename)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(file)operator(.)ident(exists)operator(()operator(\)) operator(&&) ident(file)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0L)operator(\))operator(;) operator(}) directive(private) directive(static) ident(JRubyFile) ident(file)operator(()ident(IRubyObject) ident(path)operator(\)) operator({) pre_type(String) ident(filename) operator(=) ident(path)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(return) ident(JRubyFile)operator(.)ident(create)operator(()ident(path)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(filename)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(noFileError)operator(()ident(IRubyObject) ident(filename)operator(\)) operator({) keyword(throw) ident(filename)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoENOENTError)operator(()string operator(+) ident(filename)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 David Corbin * Copyright (C\) 2006 Antti Karanta * Copyright (C\) 2007 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.math.BigInteger)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.java.MiniJava)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.Convert)operator(;) keyword(import) include(org.jruby.util.Numeric)operator(;) keyword(import) include(org.jruby.util.TypeCoercer)operator(;) comment(/** * Implementation of the Fixnum class. */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyFixnum) directive(extends) ident(RubyInteger) operator({) directive(public) directive(static) ident(RubyClass) ident(createFixnumClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(fixnum) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getInteger)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setFixnum)operator(()ident(fixnum)operator(\))operator(;) ident(fixnum)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(FIXNUM)operator(;) ident(fixnum)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyFixnum)operator(;) operator(}) operator(})operator(;) ident(fixnum)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getPrecision)operator(()operator(\))operator(\))operator(;) ident(fixnum)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFixnum)operator(.)ident(class)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(runtime)operator(.)ident(fixnumCache)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(i)operator(]) operator(=) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) ident(fixnum)operator(,) ident(i) operator(-) integer(128)operator(\))operator(;) operator(}) keyword(return) ident(fixnum)operator(;) operator(}) directive(private) directive(final) type(long) ident(value)operator(;) directive(private) directive(static) directive(final) type(int) ident(BIT_SIZE) operator(=) integer(64)operator(;) directive(public) directive(static) directive(final) type(long) ident(SIGN_BIT) operator(=) operator(()integer(1L) operator(<)operator(<) operator(()ident(BIT_SIZE) operator(-) integer(1)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(long) ident(MAX) operator(=) operator(()integer(1L)operator(<)operator(<)operator(()ident(BIT_SIZE) operator(-) integer(1)operator(\))operator(\)) operator(-) integer(1)operator(;) directive(public) directive(static) directive(final) type(long) ident(MIN) operator(=) operator(-)integer(1) operator(*) ident(MAX) operator(-) integer(1)operator(;) directive(public) directive(static) directive(final) type(long) ident(MAX_MARSHAL_FIXNUM) operator(=) operator(()integer(1L) operator(<)operator(<) integer(30)operator(\)) operator(-) integer(1)operator(;) comment(// 0x3fff_ffff) directive(public) directive(static) directive(final) type(long) ident(MIN_MARSHAL_FIXNUM) operator(=) operator(-) operator(()integer(1L) operator(<)operator(<) integer(30)operator(\))operator(;) comment(// -0x4000_0000) directive(private) directive(static) ident(IRubyObject) ident(fixCoerce)operator(()ident(IRubyObject) ident(x)operator(\)) operator({) keyword(do) operator({) ident(x) operator(=) ident(x)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) operator(}) keyword(while) operator(()operator(!)operator(()ident(x) keyword(instanceof) ident(RubyFixnum)operator(\)) operator(&&) operator(!)operator(()ident(x) keyword(instanceof) ident(RubyBignum)operator(\))operator(\))operator(;) keyword(return) ident(x)operator(;) operator(}) directive(public) ident(RubyFixnum)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) integer(0)operator(\))operator(;) operator(}) directive(public) ident(RubyFixnum)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getFixnum)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) directive(private) ident(RubyFixnum)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klazz)operator(,) type(long) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klazz)operator(,) pre_constant(false)operator(\))operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(FIXNUM)operator(;) operator(}) comment(/** * short circuit for Fixnum key comparison */) annotation(@Override) directive(public) directive(final) type(boolean) ident(eql)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(other) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(value) operator(==) operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(.)ident(value)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyClass) ident(getSingletonClass)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) comment(// this precision-guessing needs to be thought out more, since in the) comment(// case of coercing to Object we generally want to get the same type) comment(// always) comment(// if (value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE\) {) comment(// return byte.class;) comment(// } else if (value >= Short.MIN_VALUE && value <= Short.MAX_VALUE\) {) comment(// return short.class;) comment(// } else if (value >= Character.MIN_VALUE && value <= Character.MAX_VALUE\) {) comment(// return char.class;) comment(// } else if (value >= Integer.MIN_VALUE && value <= Integer.MAX_VALUE\) {) comment(// return int.class;) comment(// }) keyword(return) type(long)operator(.)ident(class)operator(;) operator(}) annotation(@Override) directive(public) type(double) ident(getDoubleValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) annotation(@Override) directive(public) type(long) ident(getLongValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(CACHE_OFFSET) operator(=) integer(128)operator(;) directive(public) directive(static) ident(RubyFixnum) ident(newFixnum)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(value)operator(\)) operator({) keyword(if) operator(()ident(isInCacheRange)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)operator(()type(int)operator(\)) ident(value) operator(+) ident(CACHE_OFFSET)operator(])operator(;) operator(}) keyword(return) keyword(new) ident(RubyFixnum)operator(()ident(runtime)operator(,) ident(value)operator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(isInCacheRange)operator(()type(long) ident(value)operator(\)) operator({) keyword(return) ident(value) operator(<=) integer(127) operator(&&) ident(value) operator(>=) operator(-)integer(128)operator(;) operator(}) directive(public) ident(RubyFixnum) ident(newFixnum)operator(()type(long) ident(newValue)operator(\)) operator({) keyword(return) ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(newValue)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(zero)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(one)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(+) integer(1)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(two)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(+) integer(2)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(three)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(+) integer(3)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(four)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(+) integer(4)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(five)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(+) integer(5)operator(])operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(minus_one)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(fixnumCache)operator([)ident(CACHE_OFFSET) operator(-) integer(1)operator(])operator(;) operator(}) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(newFixnum)operator(()ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) directive(final) type(int) ident(hashCode)operator(()operator(\)) operator({) keyword(return) operator(()type(int)operator(\))operator(()ident(value) operator(^) ident(value) operator(>)operator(>)operator(>) integer(32)operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) operator(==) local_variable(this)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(RubyFixnum) ident(num) operator(=) operator(()ident(RubyFixnum)operator(\))ident(other)operator(;) keyword(if) operator(()ident(num)operator(.)ident(value) operator(==) ident(value)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** fix_to_s * */) directive(public) ident(RubyString) ident(to_s)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(to_s)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(to_s)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(1)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(RubyString) ident(to_s)operator(()operator(\)) operator({) type(int) ident(base) operator(=) integer(10)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(Convert)operator(.)ident(longToByteList)operator(()ident(value)operator(,) ident(base)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(to_s)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) type(int) ident(base) operator(=) ident(num2int)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(base) operator(<) integer(2) operator(||) ident(base) operator(>) integer(36)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(base)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(Convert)operator(.)ident(longToByteList)operator(()ident(value)operator(,) ident(base)operator(\))operator(\))operator(;) operator(}) comment(/** fix_id2name * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(id2name)operator(()operator(\)) operator({) ident(RubySymbol) ident(symbol) operator(=) ident(RubySymbol)operator(.)ident(getSymbolLong)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(if) operator(()ident(symbol) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** fix_to_sym * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(to_sym)operator(()operator(\)) operator({) ident(RubySymbol) ident(symbol) operator(=) ident(RubySymbol)operator(.)ident(getSymbolLong)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(return) ident(symbol) operator(!=) pre_constant(null) operator(?) ident(symbol) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** fix_uminus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uminus)operator(()operator(\)) operator({) keyword(if) operator(()ident(value) operator(==) ident(MIN)operator(\)) operator({) comment(// a gotcha) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(BigInteger)operator(.)ident(valueOf)operator(()ident(value)operator(\))operator(.)ident(negate)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(-)ident(value)operator(\))operator(;) operator(}) comment(/** fix_plus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(addFixnum)operator(()ident(context)operator(,) operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(return) ident(addOther)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addFixnum)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFixnum) ident(other)operator(\)) operator({) type(long) ident(otherValue) operator(=) ident(other)operator(.)ident(value)operator(;) type(long) ident(result) operator(=) ident(value) operator(+) ident(otherValue)operator(;) keyword(if) operator(()ident(additionOverflowed)operator(()ident(value)operator(,) ident(otherValue)operator(,) ident(result)operator(\))operator(\)) operator({) keyword(return) ident(addAsBignum)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(additionOverflowed)operator(()type(long) ident(original)operator(,) type(long) ident(other)operator(,) type(long) ident(result)operator(\)) operator({) keyword(return) operator(()operator(~)operator(()ident(original) operator(^) ident(other)operator(\)) operator(&) operator(()ident(original) operator(^) ident(result)operator(\)) operator(&) ident(SIGN_BIT)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(private) directive(static) type(boolean) ident(subtractionOverflowed)operator(()type(long) ident(original)operator(,) type(long) ident(other)operator(,) type(long) ident(result)operator(\)) operator({) keyword(return) operator(()operator(~)operator(()ident(original) operator(^) operator(~)ident(other)operator(\)) operator(&) operator(()ident(original) operator(^) ident(result)operator(\)) operator(&) ident(SIGN_BIT)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(private) ident(IRubyObject) ident(addAsBignum)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFixnum) ident(other)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_plus)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(addOther)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(op_plus)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFloat)operator(()operator(()type(double)operator(\)) ident(value) operator(+) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_minus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_minus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(subtractFixnum)operator(()ident(context)operator(,) operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(return) ident(subtractOther)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractFixnum)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFixnum) ident(other)operator(\)) operator({) type(long) ident(otherValue) operator(=) ident(other)operator(.)ident(value)operator(;) type(long) ident(result) operator(=) ident(value) operator(-) ident(otherValue)operator(;) keyword(if) operator(()ident(subtractionOverflowed)operator(()ident(value)operator(,) ident(otherValue)operator(,) ident(result)operator(\))operator(\)) operator({) keyword(return) ident(subtractAsBignum)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractAsBignum)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFixnum) ident(other)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_minus)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subtractOther)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_minus)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFloat)operator(()operator(()type(double)operator(\)) ident(value) operator(-) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_mul * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(otherValue) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(value) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) type(long) ident(result) operator(=) ident(value) operator(*) ident(otherValue)operator(;) keyword(if) operator(()ident(result) operator(/) ident(value) operator(!=) ident(otherValue)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(runtime)operator(,) ident(value)operator(\))operator(.)ident(op_mul)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(newFixnum)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(op_mul)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFloat)operator(()operator(()type(double)operator(\)) ident(value) operator(*) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_div * here is terrible MRI gotcha: * 1.div 3.0 -> 0 * 1 / 3.0 -> 0.3333333333333333 * * MRI is also able to do it in one place by looking at current frame in rb_num_coerce_bin: * rb_funcall(x, ruby_frame->orig_func, 1, y\); * * also note that RubyFloat doesn't override Numeric.div */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(div_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(idiv)operator(()ident(context)operator(,) ident(other)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(idiv)operator(()ident(context)operator(,) ident(other)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(odd_p)operator(()operator(\)) operator({) keyword(if)operator(()ident(value)operator(%)integer(2) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(even_p)operator(()operator(\)) operator({) keyword(if)operator(()ident(value)operator(%)integer(2) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(pred)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(-)integer(1)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(idiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) pre_type(String) ident(method)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(x) operator(=) ident(value)operator(;) type(long) ident(y) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(y) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) type(long) ident(div) operator(=) ident(x) operator(/) ident(y)operator(;) type(long) ident(mod) operator(=) ident(x) operator(%) ident(y)operator(;) keyword(if) operator(()ident(mod) operator(<) integer(0) operator(&&) ident(y) operator(>) integer(0) operator(||) ident(mod) operator(>) integer(0) operator(&&) ident(y) operator(<) integer(0)operator(\)) operator({) ident(div) operator(-=) integer(1)operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(div)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) ident(method)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_mod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(op_mod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) comment(// Java / and % are not the same as ruby) type(long) ident(x) operator(=) ident(value)operator(;) type(long) ident(y) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(y) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) type(long) ident(mod) operator(=) ident(x) operator(%) ident(y)operator(;) keyword(if) operator(()ident(mod) operator(<) integer(0) operator(&&) ident(y) operator(>) integer(0) operator(||) ident(mod) operator(>) integer(0) operator(&&) ident(y) operator(<) integer(0)operator(\)) operator({) ident(mod) operator(+=) ident(y)operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(mod)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_divmod * */) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(x) operator(=) ident(value)operator(;) type(long) ident(y) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(y) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) type(long) ident(div) operator(=) ident(x) operator(/) ident(y)operator(;) type(long) ident(mod) operator(=) ident(x) operator(%) ident(y)operator(;) keyword(if) operator(()ident(mod) operator(<) integer(0) operator(&&) ident(y) operator(>) integer(0) operator(||) ident(mod) operator(>) integer(0) operator(&&) ident(y) operator(<) integer(0)operator(\)) operator({) ident(div) operator(-=) integer(1)operator(;) ident(mod) operator(+=) ident(y)operator(;) operator(}) ident(IRubyObject) ident(fixDiv) operator(=) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(div)operator(\))operator(;) ident(IRubyObject) ident(fixMod) operator(=) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(mod)operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(fixDiv)operator(,) ident(fixMod)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_quo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(\)) directive(public) ident(IRubyObject) ident(quo)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()type(double)operator(\)) ident(value) operator(/) operator(()type(double)operator(\)) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_pow * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_pow)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if)operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(b) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(b) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(b) operator(==) integer(1)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(b) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_pow)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(value)operator(,) ident(b)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(value)operator(,) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\)) operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_pow * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(op_pow_19)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(long) ident(a) operator(=) ident(value)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(b) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(b) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalRaw)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(b) operator(==) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(b) operator(==) integer(1)operator(\)) keyword(return) local_variable(this)operator(;) keyword(if) operator(()ident(a) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(b) operator(>) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\)) operator(:) ident(RubyNumeric)operator(.)ident(dbl2num)operator(()ident(runtime)operator(,) float(1.0) operator(/) float(0.0)operator(\))operator(;) operator(}) keyword(if) operator(()ident(a) operator(==) integer(1)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(a) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(b) operator(%) integer(2) operator(==) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(return) ident(Numeric)operator(.)ident(int_pow)operator(()ident(context)operator(,) ident(a)operator(,) ident(b)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(if) operator(()ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalRaw)operator(()ident(runtime)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) keyword(if) operator(()ident(a) operator(==) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(a) operator(==) integer(1)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(a) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(RubyInteger)operator(.)ident(even_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(;) operator(}) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(runtime)operator(,) ident(RubyBignum)operator(.)ident(fix2big)operator(()local_variable(this)operator(\))operator(\))operator(.)ident(op_pow)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(a)operator(,) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_abs * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(abs)operator(()operator(\)) operator({) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) operator({) comment(// A gotcha for Long.MIN_VALUE: value = -value) keyword(if) operator(()ident(value) operator(==) pre_type(Long)operator(.)ident(MIN_VALUE)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(() ident(getRuntime)operator(()operator(\))operator(,) pre_type(BigInteger)operator(.)ident(valueOf)operator(()ident(value)operator(\))operator(.)ident(negate)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(-)ident(value)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** fix_equal * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(==) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) local_variable(super)operator(.)ident(op_num_equal)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(compareFixnum)operator(()ident(context)operator(,) operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(;) operator(}) keyword(return) ident(coerceCmp)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(compareFixnum)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyFixnum) ident(other)operator(\)) operator({) type(long) ident(otherValue) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(value) operator(==) ident(otherValue)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(value) operator(>) ident(otherValue)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** fix_gt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(>) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_ge * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(>=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) string=)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_lt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(<) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_le * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(<=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** fix_rev * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_neg)operator(()operator(\)) operator({) keyword(return) ident(newFixnum)operator(()operator(~)ident(value)operator(\))operator(;) operator(}) comment(/** fix_and * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_and)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum) operator(||) operator(()ident(other) operator(=) ident(fixCoerce)operator(()ident(other)operator(\))operator(\)) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(&) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(op_and)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** fix_or * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_or)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum) operator(||) operator(()ident(other) operator(=) ident(fixCoerce)operator(()ident(other)operator(\))operator(\)) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(|) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(op_or)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** fix_xor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_xor)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum) operator(||) operator(()ident(other) operator(=) ident(fixCoerce)operator(()ident(other)operator(\))operator(\)) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(^) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyBignum)operator(\)) ident(other)operator(\))operator(.)ident(op_xor)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** fix_aref * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if)operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator(&&) operator(!)operator(()operator(()ident(other) operator(=) ident(fixCoerce)operator(()ident(other)operator(\))operator(\)) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) ident(RubyBignum) ident(big) operator(=) operator(()ident(RubyBignum)operator(\)) ident(other)operator(;) ident(RubyObject) ident(tryFix) operator(=) ident(RubyBignum)operator(.)ident(bignorm)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(big)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(tryFix) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(return) ident(big)operator(.)ident(getValue)operator(()operator(\))operator(.)ident(signum)operator(()operator(\)) operator(==) integer(0) operator(||) ident(value) operator(>=) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) type(long) ident(otherValue) operator(=) ident(fix2long)operator(()ident(other)operator(\))operator(;) keyword(if) operator(()ident(otherValue) operator(<) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(BIT_SIZE) operator(-) integer(1) operator(<) ident(otherValue)operator(\)) operator({) keyword(return) ident(value) operator(<) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) operator(()ident(value) operator(&) operator(()integer(1L) operator(<)operator(<) ident(otherValue)operator(\))operator(\)) operator(==) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** fix_lshift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_lshift)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_lshift)operator(()ident(other)operator(\))operator(;) type(long) ident(width) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(return) ident(width) operator(<) integer(0) operator(?) ident(rshift)operator(()operator(-)ident(width)operator(\)) operator(:) ident(lshift)operator(()ident(width)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(lshift)operator(()type(long) ident(width)operator(\)) operator({) keyword(if) operator(()ident(width) operator(>) ident(BIT_SIZE) operator(-) integer(1) operator(||) operator(()operator(()operator(~)integer(0L) operator(<)operator(<) ident(BIT_SIZE) operator(-) ident(width) operator(-) integer(1)operator(\)) operator(&) ident(value)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_lshift)operator(()ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(width)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(<)operator(<) ident(width)operator(\))operator(;) operator(}) comment(/** fix_rshift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string>)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_rshift)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(.)ident(op_rshift)operator(()ident(other)operator(\))operator(;) type(long) ident(width) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(width) operator(==) integer(0)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(width) operator(<) integer(0) operator(?) ident(lshift)operator(()operator(-)ident(width)operator(\)) operator(:) ident(rshift)operator(()ident(width)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(rshift)operator(()type(long) ident(width)operator(\)) operator({) keyword(if) operator(()ident(width) operator(>=) ident(BIT_SIZE) operator(-) integer(1)operator(\)) operator({) keyword(return) ident(value) operator(<) integer(0) operator(?) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(>)operator(>) ident(width)operator(\))operator(;) operator(}) comment(/** fix_to_f * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(to_f)operator(()operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(()type(double)operator(\)) ident(value)operator(\))operator(;) operator(}) comment(/** fix_size * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(size)operator(()operator(\)) operator({) keyword(return) ident(newFixnum)operator(()operator(()type(long)operator(\)) operator(()operator(()ident(BIT_SIZE) operator(+) integer(7)operator(\)) operator(/) integer(8)operator(\))operator(\))operator(;) operator(}) comment(/** fix_zero_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(zero_p)operator(()operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(==) integer(0)operator(\))operator(;) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(id)operator(()operator(\)) operator({) keyword(if) operator(()ident(value) operator(<=) pre_type(Long)operator(.)ident(MAX_VALUE) operator(/) integer(2) operator(&&) ident(value) operator(>=) pre_type(Long)operator(.)ident(MIN_VALUE) operator(/) integer(2)operator(\)) operator({) keyword(return) ident(newFixnum)operator(()integer(2) operator(*) ident(value) operator(+) integer(1)operator(\))operator(;) operator(}) keyword(return) local_variable(super)operator(.)ident(id)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(taint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(// Piece of mri rb_to_id) annotation(@Override) directive(public) pre_type(String) ident(asJavaString)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(FIXNUMS_NOT_SYMBOLS)operator(,) stringoperator(\))operator(;) comment(// FIXME: I think this chunk is equivalent to MRI id2name (and not our public method ) comment(// id2name\). Make into method if used more than once. ) ident(RubySymbol) ident(symbol) operator(=) ident(RubySymbol)operator(.)ident(getSymbolLong)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(if) operator(()ident(symbol) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(value) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyFixnum) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) keyword(return) ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* ================ * Singleton Methods * ================ */) comment(/** rb_fix_induced_from * */) annotation(@JRubyMethod)operator(()ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(induced_from)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(num2fix)operator(()ident(other)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(to_java)operator(()operator(\)) operator({) keyword(return) ident(MiniJava)operator(.)ident(javaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Long)operator(.)ident(valueOf)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(as)operator(()pre_type(Class) ident(javaClass)operator(\)) operator({) keyword(return) ident(MiniJava)operator(.)ident(javaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(coerceToJavaType)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) ident(javaClass)operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(Object) ident(coerceToJavaType)operator(()ident(Ruby) ident(ruby)operator(,) ident(RubyFixnum) ident(self)operator(,) pre_type(Class) ident(javaClass)operator(\)) operator({) keyword(if) operator(()operator(!)pre_type(Number)operator(.)ident(class)operator(.)ident(isAssignableFrom)operator(()ident(javaClass)operator(\))operator(\)) operator({) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()ident(javaClass)operator(.)ident(getCanonicalName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(TypeCoercer) ident(coercer) operator(=) ident(JAVA_COERCERS)operator(.)ident(get)operator(()ident(javaClass)operator(\))operator(;) keyword(if) operator(()ident(coercer) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()string operator(+) ident(javaClass)operator(.)ident(getCanonicalName)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coercer)operator(.)ident(coerce)operator(()ident(self)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) pre_type(Map)operator(<)pre_type(Class)operator(,) ident(TypeCoercer)operator(>) ident(JAVA_COERCERS) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(Class)operator(,) ident(TypeCoercer)operator(>)operator(()operator(\))operator(;) directive(static) operator({) ident(TypeCoercer) ident(intCoercer) operator(=) keyword(new) ident(TypeCoercer)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(coerce)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) ident(RubyFixnum) ident(fixnum) operator(=) operator(()ident(RubyFixnum)operator(\))ident(self)operator(;) keyword(if) operator(()ident(fixnum)operator(.)ident(value) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(fixnum)operator(.)ident(value) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) pre_type(Integer)operator(.)ident(valueOf)operator(()operator(()type(int)operator(\))ident(fixnum)operator(.)ident(value)operator(\))operator(;) operator(}) operator(})operator(;) ident(JAVA_COERCERS)operator(.)ident(put)operator(()type(int)operator(.)ident(class)operator(,) ident(intCoercer)operator(\))operator(;) ident(JAVA_COERCERS)operator(.)ident(put)operator(()pre_type(Integer)operator(.)ident(class)operator(,) ident(intCoercer)operator(\))operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Don Schwartz * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Thomas E Enebo * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2006 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_expt)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_mul)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_i)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.frexp)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.ldexp)operator(;) keyword(import) include(java.text.DecimalFormat)operator(;) keyword(import) include(java.text.DecimalFormatSymbols)operator(;) keyword(import) include(java.util.Locale)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) comment(/** * A representation of a float object */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyFloat) directive(extends) ident(RubyNumeric) operator({) directive(public) directive(static) ident(RubyClass) ident(createFloatClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(floatc) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setFloat)operator(()ident(floatc)operator(\))operator(;) ident(floatc)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(FLOAT)operator(;) ident(floatc)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyFloat)operator(;) operator(}) operator(})operator(;) ident(floatc)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(floatc)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getPrecision)operator(()operator(\))operator(\))operator(;) comment(// Java Doubles are 64 bit long: ) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(1)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(2)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(53)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(15)operator(\))operator(\))operator(;) comment(// Double.MAX_EXPONENT since Java 1.6) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) operator(-)integer(1021)operator(\))operator(\))operator(;) comment(// Double.MAX_EXPONENT since Java 1.6 ) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(1024)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) operator(-)integer(307)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(308)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) pre_type(Double)operator(.)ident(MIN_VALUE)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) pre_type(Double)operator(.)ident(MAX_VALUE)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) float(2.2204460492503131e-16)operator(\))operator(\))operator(;) ident(floatc)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFloat)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(floatc)operator(;) operator(}) directive(private) directive(final) type(double) ident(value)operator(;) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(FLOAT)operator(;) operator(}) directive(public) ident(RubyFloat)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) float(0.0)operator(\))operator(;) operator(}) directive(public) ident(RubyFloat)operator(()ident(Ruby) ident(runtime)operator(,) type(double) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getFloat)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) comment(// this needs to be thought out more along with the changes in RubyFixnum) comment(// since "to Object" coercion will generally want to produce the same) comment(// type every time) comment(// if (value >= Float.MIN_VALUE && value <= Float.MAX_VALUE\) {) comment(// return float.class;) comment(// }) keyword(return) type(double)operator(.)ident(class)operator(;) operator(}) comment(/** Getter for property value. * @return Value of property value. */) directive(public) type(double) ident(getValue)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(value)operator(;) operator(}) directive(public) type(double) ident(getDoubleValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(public) type(long) ident(getLongValue)operator(()operator(\)) operator({) keyword(return) operator(()type(long)operator(\)) ident(value)operator(;) operator(}) directive(public) ident(RubyFloat) ident(convertToFloat)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(protected) type(int) ident(compareValue)operator(()ident(RubyNumeric) ident(other)operator(\)) operator({) type(double) ident(otherVal) operator(=) ident(other)operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(getValue)operator(()operator(\)) operator(>) ident(otherVal) operator(?) integer(1) operator(:) ident(getValue)operator(()operator(\)) operator(<) ident(otherVal) operator(?) operator(-)integer(1) operator(:) integer(0)operator(;) operator(}) directive(public) directive(static) ident(RubyFloat) ident(newFloat)operator(()ident(Ruby) ident(runtime)operator(,) type(double) ident(value)operator(\)) operator({) keyword(return) keyword(new) ident(RubyFloat)operator(()ident(runtime)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** rb_flo_induced_from * */) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(induced_from)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(number)operator(\)) operator({) keyword(if) operator(()ident(number) keyword(instanceof) ident(RubyFixnum) operator(||) ident(number) keyword(instanceof) ident(RubyBignum) operator(||) ident(number) keyword(instanceof) ident(RubyRational)operator(\)) operator({) keyword(return) ident(number)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_F)operator(,) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(number) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) ident(number)operator(;) operator(}) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(() string operator(+) ident(number)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) directive(private) directive(final) directive(static) pre_type(DecimalFormat) ident(FORMAT) operator(=) keyword(new) pre_type(DecimalFormat)operator(()stringoperator(,) keyword(new) pre_type(DecimalFormatSymbols)operator(()pre_type(Locale)operator(.)ident(ENGLISH)operator(\))operator(\))operator(;) comment(/** flo_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(<) integer(0) operator(?) string operator(:) stringoperator(\))operator(;) operator(}) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) pre_type(String) ident(val) operator(=) stringoperator(+)ident(value)operator(;) keyword(if)operator(()ident(val)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1)operator(\)) operator({) pre_type(String) ident(v2) operator(=) ident(FORMAT)operator(.)ident(format)operator(()ident(value)operator(\))operator(;) type(int) ident(ix) operator(=) ident(v2)operator(.)ident(length)operator(()operator(\))operator(-)integer(1)operator(;) keyword(while)operator(()ident(v2)operator(.)ident(charAt)operator(()ident(ix)operator(\)) operator(==) string operator(&&) ident(v2)operator(.)ident(charAt)operator(()ident(ix)operator(-)integer(1)operator(\)) operator(!=) stringoperator(\)) operator({) ident(ix)operator(--)operator(;) operator(}) keyword(if)operator(()ident(ix) operator(>) integer(15) operator(||) stringoperator(.)ident(equals)operator(()ident(v2)operator(.)ident(substring)operator(()integer(0)operator(,)ident(ix)operator(+)integer(1)operator(\))operator(\))operator(\)) operator({) ident(val) operator(=) ident(val)operator(.)ident(replaceFirst)operator(()stringoperator(,)stringoperator(\))operator(.)ident(replaceFirst)operator(()stringoperator(,)stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(val) operator(=) ident(v2)operator(.)ident(substring)operator(()integer(0)operator(,)ident(ix)operator(+)integer(1)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(val)operator(\))operator(;) operator(}) comment(/** flo_coerce * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(coerce)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(RubyKernel)operator(.)ident(new_float)operator(()local_variable(this)operator(,) ident(other)operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** flo_uminus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uminus)operator(()operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(-)ident(value)operator(\))operator(;) operator(}) comment(/** flo_plus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(+) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_minus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_minus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(-) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_mul * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(() ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(*) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_div * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_fdiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) comment(// don't override Numeric#div !) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(/) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_mod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(y) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) comment(// Modelled after c ruby implementation (java /,% not same as ruby\)) type(double) ident(x) operator(=) ident(value)operator(;) type(double) ident(mod) operator(=) pre_type(Math)operator(.)ident(IEEEremainder)operator(()ident(x)operator(,) ident(y)operator(\))operator(;) keyword(if) operator(()ident(y) operator(*) ident(mod) operator(<) integer(0)operator(\)) operator({) ident(mod) operator(+=) ident(y)operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(mod)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_divmod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(y) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(x) operator(=) ident(value)operator(;) type(double) ident(mod) operator(=) pre_type(Math)operator(.)ident(IEEEremainder)operator(()ident(x)operator(,) ident(y)operator(\))operator(;) comment(// MRI behavior:) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(mod)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFloatDomainError)operator(()stringoperator(\))operator(;) operator(}) type(double) ident(div) operator(=) pre_type(Math)operator(.)ident(floor)operator(()ident(x) operator(/) ident(y)operator(\))operator(;) keyword(if) operator(()ident(y) operator(*) ident(mod) operator(<) integer(0)operator(\)) operator({) ident(mod) operator(+=) ident(y)operator(;) operator(}) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(car) operator(=) ident(dbl2num)operator(()ident(runtime)operator(,) ident(div)operator(\))operator(;) ident(RubyFloat) ident(cdr) operator(=) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) ident(mod)operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(car)operator(,) ident(cdr)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_pow * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_pow)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(pow)operator(()ident(value)operator(,) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\)) operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_eq * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(==) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\)) operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) keyword(default)operator(:) comment(// Numeric.equal ) keyword(return) local_variable(super)operator(.)ident(op_num_equal)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(b) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(dbl_cmp)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(,) ident(b)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceCmp)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_gt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(b) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(!)pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\)) operator(&&) ident(value) operator(>) ident(b)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_ge * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(b) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(!)pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\)) operator(&&) ident(value) operator(>=) ident(b)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) string=)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_lt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(b) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(!)pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\)) operator(&&) ident(value) operator(<) ident(b)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_le * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) type(double) ident(b) operator(=) operator(()operator(()ident(RubyNumeric)operator(\)) ident(other)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(!)pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\)) operator(&&) ident(value) operator(<=) ident(b)operator(\))operator(;) keyword(default)operator(:) keyword(return) ident(coerceRelOp)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) operator(}) comment(/** flo_eql * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(b) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(other)operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\)) operator(||) pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(value) operator(==) ident(b)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** flo_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(final) type(int) ident(hashCode)operator(()operator(\)) operator({) type(long) ident(l) operator(=) pre_type(Double)operator(.)ident(doubleToLongBits)operator(()ident(value)operator(\))operator(;) keyword(return) operator(()type(int)operator(\))operator(()ident(l) operator(^) ident(l) operator(>)operator(>)operator(>) integer(32)operator(\))operator(;) operator(}) comment(/** flo_fo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** flo_abs * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(abs)operator(()operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(doubleToLongBits)operator(()ident(value)operator(\)) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(abs)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** flo_zero_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(zero_p)operator(()operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(==) float(0.0)operator(\))operator(;) operator(}) comment(/** flo_truncate * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(truncate)operator(()operator(\)) operator({) type(double) ident(f) operator(=) ident(value)operator(;) keyword(if) operator(()ident(f) operator(>) float(0.0)operator(\)) ident(f) operator(=) pre_type(Math)operator(.)ident(floor)operator(()ident(f)operator(\))operator(;) keyword(if) operator(()ident(f) operator(<) float(0.0)operator(\)) ident(f) operator(=) pre_type(Math)operator(.)ident(ceil)operator(()ident(f)operator(\))operator(;) keyword(return) ident(dbl2num)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(f)operator(\))operator(;) operator(}) comment(/** float_to_r, float_decode * */) directive(static) directive(final) type(int) ident(DBL_MANT_DIG) operator(=) integer(53)operator(;) directive(static) directive(final) type(int) ident(FLT_RADIX) operator(=) integer(2)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(long)type([])ident(exp) operator(=) keyword(new) type(long)operator([)integer(1)operator(])operator(;) type(double) ident(f) operator(=) ident(frexp)operator(()ident(value)operator(,) ident(exp)operator(\))operator(;) ident(f) operator(=) ident(ldexp)operator(()ident(f)operator(,) ident(DBL_MANT_DIG)operator(\))operator(;) type(long) ident(n) operator(=) ident(exp)operator([)integer(0)operator(]) operator(-) ident(DBL_MANT_DIG)operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(x) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(f_to_i)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newFloat)operator(()ident(f)operator(\))operator(\))operator(,) ident(f_expt)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(FLT_RADIX)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(n)operator(\))operator(\))operator(\))operator(;) keyword(return) ident(x)operator(;) operator(}) comment(/** floor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(floor)operator(()operator(\)) operator({) keyword(return) ident(dbl2num)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(floor)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) comment(/** flo_ceil * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(ceil)operator(()operator(\)) operator({) keyword(return) ident(dbl2num)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(ceil)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) comment(/** flo_round * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(round)operator(()operator(\)) operator({) type(double) ident(f) operator(=) ident(value)operator(;) keyword(if) operator(()ident(f) operator(>) float(0.0)operator(\)) operator({) ident(f) operator(=) pre_type(Math)operator(.)ident(floor)operator(()ident(f) operator(+) float(0.5)operator(\))operator(;) operator(}) keyword(if) operator(()ident(f) operator(<) float(0.0)operator(\)) operator({) ident(f) operator(=) pre_type(Math)operator(.)ident(ceil)operator(()ident(f) operator(-) float(0.5)operator(\))operator(;) operator(}) keyword(return) ident(dbl2num)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(f)operator(\))operator(;) operator(}) comment(/** flo_is_nan_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nan_p)operator(()operator(\)) operator({) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) comment(/** flo_is_infinite_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(infinite_p)operator(()operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value) operator(<) integer(0) operator(?) operator(-)integer(1) operator(:) integer(1)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** flo_is_finite_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(finite_p)operator(()operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(value)operator(\)) operator(||) pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyFloat) ident(aFloat)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(aFloat)operator(\))operator(;) pre_type(String) ident(strValue) operator(=) ident(aFloat)operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(aFloat)operator(.)ident(value)operator(\))operator(\)) operator({) ident(strValue) operator(=) ident(aFloat)operator(.)ident(value) operator(<) integer(0) operator(?) string operator(:) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(aFloat)operator(.)ident(value)operator(\))operator(\)) operator({) ident(strValue) operator(=) stringoperator(;) operator(}) ident(output)operator(.)ident(writeString)operator(()ident(strValue)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyFloat) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(RubyFloat) ident(result) operator(=) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(org)operator(.)ident(jruby)operator(.)ident(util)operator(.)ident(Convert)operator(.)ident(byteListToDouble)operator(()ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(,)pre_constant(false)operator(\))operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * GC (Garbage Collection\) Module * * Note: Since we rely on Java's memory model we can't provide the * kind of control over garbage collection that MRI provides. * * @author Anders */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyGC) operator({) directive(public) directive(static) ident(RubyModule) ident(createGCModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(result) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setGC)operator(()ident(result)operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyGC)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(start)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) pre_type(System)operator(.)ident(gc)operator(()operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(garbage_collect)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) pre_type(System)operator(.)ident(gc)operator(()operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(enable)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(EMPTY_IMPLEMENTATION)operator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(disable)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(EMPTY_IMPLEMENTATION)operator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Tim Azzopardi * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2006 Michael Studman * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.util.io.STDIO)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.environment.OSEnvironmentReaderExcepton)operator(;) keyword(import) include(org.jruby.environment.OSEnvironment)operator(;) keyword(import) include(org.jruby.internal.runtime.ValueAccessor)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Constants)operator(;) keyword(import) include(org.jruby.runtime.GlobalVariable)operator(;) keyword(import) include(org.jruby.runtime.IAccessor)operator(;) keyword(import) include(org.jruby.runtime.ReadonlyGlobalVariable)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.KCode)operator(;) comment(/** This class initializes global variables and constants. * * @author jpetersen */) directive(public) type(class) class(RubyGlobal) operator({) comment(/** * Obligate string-keyed and string-valued hash, used for ENV and ENV_JAVA * */) directive(public) directive(static) type(class) class(StringOnlyRubyHash) directive(extends) ident(RubyHash) operator({) directive(public) ident(StringOnlyRubyHash)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Map) ident(valueMap)operator(,) ident(IRubyObject) ident(defaultValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(valueMap)operator(,) ident(defaultValue)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(RubyHash) ident(to_hash)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyHash) ident(hash) operator(=) ident(RubyHash)operator(.)ident(newHash)operator(()ident(runtime)operator(\))operator(;) ident(hash)operator(.)ident(replace)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(;) keyword(return) ident(hash)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(\)) operator({) keyword(return) local_variable(super)operator(.)ident(op_aref)operator(()ident(context)operator(,) ident(key)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()operator(!)ident(key)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(key)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(value)operator(.)ident(respondsTo)operator(()stringoperator(\)) operator(&&) operator(!)ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(value)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) local_variable(super)operator(.)ident(delete)operator(()ident(context)operator(,) ident(key)operator(,) ident(org)operator(.)ident(jruby)operator(.)ident(runtime)operator(.)ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) comment(//return super.aset(getRuntime(\).newString("sadfasdF"\), getRuntime(\).newString("sadfasdF"\)\);) keyword(return) local_variable(super)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(key)operator(,) stringoperator(\))operator(,) ident(value)operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(value)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\))operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(void) ident(createGlobals)operator(()ident(ThreadContext) ident(context)operator(,) ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newBinding)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) comment(// define ARGV and $* for this runtime) ident(RubyArray) ident(argvArray) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) pre_type(String)type([]) ident(argv) operator(=) ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getArgv)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(argv)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(argvArray)operator(.)ident(append)operator(()ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(argv)operator([)ident(i)operator(])operator(.)ident(getBytes)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(argvArray)operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(argvArray)operator(\))operator(\))operator(;) ident(IAccessor) ident(d) operator(=) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(newString)operator(() ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(displayedFileName)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(define)operator(()stringoperator(,) ident(d)operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(define)operator(()stringoperator(,) ident(d)operator(\))operator(;) comment(// Version information:) ident(IRubyObject) ident(version) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(RUBY_VERSION)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(IRubyObject) ident(release) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(COMPILE_DATE)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(IRubyObject) ident(platform) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(PLATFORM)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(IRubyObject) ident(engine) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(ENGINE)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(version)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(RUBY_PATCHLEVEL)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(release)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(platform)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(engine)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(version)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(release)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(platform)operator(\))operator(;) ident(IRubyObject) ident(jrubyVersion) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Constants)operator(.)ident(VERSION)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(jrubyVersion)operator(\))operator(;) ident(GlobalVariable) ident(kcodeGV) operator(=) keyword(new) ident(KCodeGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()ident(kcodeGV)operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(GlobalVariable)operator(.)ident(Copy)operator(()ident(runtime)operator(,) stringoperator(,) ident(kcodeGV)operator(\))operator(\))operator(;) ident(IRubyObject) ident(defaultRS) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getRecordSeparator)operator(()operator(\))operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(GlobalVariable) ident(rs) operator(=) keyword(new) ident(StringGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(defaultRS)operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()ident(rs)operator(\))operator(;) ident(runtime)operator(.)ident(setRecordSeparatorVar)operator(()ident(rs)operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(setDefaultSeparator)operator(()ident(defaultRS)operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(StringGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(StringGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LineNumberGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LastlineGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LastExitStatusVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(ErrorInfoGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(NonEffectiveGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(\))operator(\))operator(;) keyword(if)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getInputFieldSeparator)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(GlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(GlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getInputFieldSeparator)operator(()operator(\))operator(,) integer(0)operator(\))operator(\))operator(\))operator(;) operator(}) pre_type(Boolean) ident(verbose) operator(=) ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getVerbose)operator(()operator(\))operator(;) ident(IRubyObject) ident(verboseValue) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(verbose) operator(==) pre_constant(null)operator(\)) operator({) ident(verboseValue) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(verbose) operator(==) pre_type(Boolean)operator(.)ident(TRUE)operator(\)) operator({) ident(verboseValue) operator(=) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(verboseValue) operator(=) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(VerboseGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(verboseValue)operator(\))operator(\))operator(;) ident(IRubyObject) ident(debug) operator(=) ident(runtime)operator(.)ident(newBoolean)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isDebug)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(DebugGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(debug)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(DebugGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(debug)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(SafeGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(BacktraceGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(IRubyObject) ident(stdin) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(STDIO)operator(.)ident(IN)operator(\))operator(;) ident(IRubyObject) ident(stdout) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(STDIO)operator(.)ident(OUT)operator(\))operator(;) ident(IRubyObject) ident(stderr) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(STDIO)operator(.)ident(ERR)operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(InputGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(stdin)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(OutputGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(stdout)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(alias)operator(()string)delimiter(")>operator(,) stringoperator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(alias)operator(()stringoperator(,) stringoperator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(OutputGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(,) ident(stderr)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(alias)operator(()stringoperator(,) stringoperator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(stdin)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(stdout)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(stderr)operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LoadedFeatures)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LoadedFeatures)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LoadPath)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LoadPath)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LoadPath)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(MatchMatchGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(PreMatchGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(PostMatchGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(LastMatchGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) ident(runtime)operator(.)ident(defineVariable)operator(()keyword(new) ident(BackRefGlobalVariable)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(;) comment(// On platforms without a c-library accessable through JNA, getpid will return hashCode ) comment(// as $$ used to. Using $$ to kill processes could take down many runtimes, but by basing) comment(// $$ on getpid(\) where available, we have the same semantics as MRI.) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(newFixnum)operator(()ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpid)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) comment(// after defn of $stderr as the call may produce warnings) ident(defineGlobalEnvConstants)operator(()ident(runtime)operator(\))operator(;) comment(// Fixme: Do we need the check or does Main.java not call this...they should consolidate ) keyword(if) operator(()ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isAssumePrinting)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isAssumeLoop)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isSplit)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(defineReadonly)operator(()stringoperator(,) keyword(new) ident(ValueAccessor)operator(()ident(runtime)operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(isProcessLineEnds)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) comment(// ARGF, $< object) ident(RubyArgsFile)operator(.)ident(initArgsFile)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(defineGlobalEnvConstants)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) pre_type(Map) ident(environmentVariableMap) operator(=) pre_constant(null)operator(;) ident(OSEnvironment) ident(environment) operator(=) keyword(new) ident(OSEnvironment)operator(()operator(\))operator(;) keyword(try) operator({) ident(environmentVariableMap) operator(=) ident(environment)operator(.)ident(getEnvironmentVariableMap)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(OSEnvironmentReaderExcepton) ident(e)operator(\)) operator({) comment(// If the environment variables are not accessible shouldn't terminate ) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MISCELLANEOUS)operator(,) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(environmentVariableMap) operator(==) pre_constant(null)operator(\)) operator({) comment(// if the environment variables can't be obtained, define an empty ENV) ident(environmentVariableMap) operator(=) keyword(new) pre_type(HashMap)operator(()operator(\))operator(;) operator(}) ident(StringOnlyRubyHash) ident(h1) operator(=) keyword(new) ident(StringOnlyRubyHash)operator(()ident(runtime)operator(,) ident(environmentVariableMap)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) ident(h1)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(StringOnlyRubyHash)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(h1)operator(\))operator(;) comment(// Define System.getProperties(\) in ENV_JAVA) pre_type(Map) ident(systemProps) operator(=) ident(environment)operator(.)ident(getSystemPropertiesMap)operator(()ident(runtime)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) keyword(new) ident(StringOnlyRubyHash)operator(() ident(runtime)operator(,) ident(systemProps)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) type(class) class(NonEffectiveGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(NonEffectiveGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(INEFFECTIVE_GLOBAL)operator(,) string operator(+) ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(INEFFECTIVE_GLOBAL)operator(,) string operator(+) ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(LastExitStatusVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(LastExitStatusVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) ident(IRubyObject) ident(lastExitStatus) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getLastExitStatus)operator(()operator(\))operator(;) keyword(return) ident(lastExitStatus) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(lastExitStatus)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(lastExitStatus)operator(\)) operator({) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(setLastExitStatus)operator(()ident(lastExitStatus)operator(\))operator(;) keyword(return) ident(lastExitStatus)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(MatchMatchGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(MatchMatchGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(last_match)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(PreMatchGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(PreMatchGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(match_pre)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(PostMatchGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(PostMatchGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(match_post)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(LastMatchGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(LastMatchGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(match_last)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(BackRefGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(BackRefGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(getBackref)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) ident(RuntimeHelpers)operator(.)ident(setBackref)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) comment(// Accessor methods.) directive(private) directive(static) type(class) class(LineNumberGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(LineNumberGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(RubyFixnum) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) ident(RubyArgsFile)operator(.)ident(setCurrentLineNumber)operator(()ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(,)ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(value)operator(\))operator(\))operator(;) keyword(return) local_variable(super)operator(.)ident(set)operator(()ident(value)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(ErrorInfoGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(ErrorInfoGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) ident(set)operator(()ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()operator(!)ident(value)operator(.)ident(isNil)operator(()operator(\)) operator(&&) operator(!)ident(runtime)operator(.)ident(getException)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(value)operator(\)) operator(&&) operator(!)operator(()ident(JavaUtil)operator(.)ident(isJavaObject)operator(()ident(value)operator(\)) operator(&&) ident(JavaUtil)operator(.)ident(unwrapJavaObject)operator(()ident(value)operator(\)) keyword(instanceof) exception(Exception)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(setErrorInfo)operator(()ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getErrorInfo)operator(()operator(\))operator(;) operator(}) operator(}) comment(// FIXME: move out of this class!) directive(public) directive(static) type(class) class(StringGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(StringGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()operator(!)ident(value)operator(.)ident(isNil)operator(()operator(\)) operator(&&) operator(!) operator(()ident(value) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(name)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) local_variable(super)operator(.)ident(set)operator(()ident(value)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(KCodeGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(KCodeGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getKCode)operator(()operator(\))operator(.)ident(kcode)operator(()ident(runtime)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) ident(runtime)operator(.)ident(setKCode)operator(()ident(KCode)operator(.)ident(create)operator(()ident(runtime)operator(,) ident(value)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(SafeGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(SafeGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) comment(// int level = RubyNumeric.fix2int(value\);) comment(// if (level < runtime.getSafeLevel(\)\) {) comment(// throw runtime.newSecurityError("tried to downgrade safe level from " + ) comment(// runtime.getSafeLevel(\) + " to " + level\);) comment(// }) comment(// runtime.setSafeLevel(level\);) comment(// thread.setSafeLevel(level\);) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(SAFE_NOT_SUPPORTED)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(VerboseGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(VerboseGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(initialValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(initialValue)operator(\))operator(;) ident(set)operator(()ident(initialValue)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getVerbose)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(newValue)operator(\)) operator({) keyword(if) operator(()ident(newValue)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(setVerbose)operator(()ident(newValue)operator(\))operator(;) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(setVerbose)operator(()ident(runtime)operator(.)ident(newBoolean)operator(()ident(newValue)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(newValue)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(DebugGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(DebugGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(initialValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(initialValue)operator(\))operator(;) ident(set)operator(()ident(initialValue)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getDebug)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(newValue)operator(\)) operator({) keyword(if) operator(()ident(newValue)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(setDebug)operator(()ident(newValue)operator(\))operator(;) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(setDebug)operator(()ident(runtime)operator(.)ident(newBoolean)operator(()ident(newValue)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(newValue)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(BacktraceGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(BacktraceGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) ident(IRubyObject) ident(errorInfo) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) ident(IRubyObject) ident(backtrace) operator(=) ident(errorInfo)operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(errorInfo)operator(.)ident(callMethod)operator(()ident(errorInfo)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) comment(//$@ returns nil if $!.backtrace is not an array) keyword(if) operator(()operator(!)operator(()ident(backtrace) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) operator({) ident(backtrace) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(backtrace)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(value)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(value)operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(LastlineGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(LastlineGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(getLastLine)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) ident(RuntimeHelpers)operator(.)ident(setLastLine)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(InputGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(InputGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(value) operator(==) ident(get)operator(()operator(\))operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(return) local_variable(super)operator(.)ident(set)operator(()ident(value)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(OutputGlobalVariable) directive(extends) ident(GlobalVariable) operator({) directive(public) ident(OutputGlobalVariable)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(value) operator(==) ident(get)operator(()operator(\))operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(if) operator(()ident(value) keyword(instanceof) ident(RubyIO)operator(\)) operator({) ident(RubyIO) ident(io) operator(=) operator(()ident(RubyIO)operator(\))ident(value)operator(;) comment(// HACK: in order to have stdout/err act like ttys and flush always,) comment(// we set anything assigned to stdout/stderr to sync) ident(io)operator(.)ident(getHandler)operator(()operator(\))operator(.)ident(setSync)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(value)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(name)operator(()operator(\)) operator(+) string operator(+) ident(value)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) local_variable(super)operator(.)ident(set)operator(()ident(value)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(LoadPath) directive(extends) ident(ReadonlyGlobalVariable) operator({) directive(public) ident(LoadPath)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.GlobalVariable#get(\) */) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(getLoadPath)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(class) class(LoadedFeatures) directive(extends) ident(ReadonlyGlobalVariable) operator({) directive(public) ident(LoadedFeatures)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(name)operator(,) pre_constant(null)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.GlobalVariable#get(\) */) annotation(@Override) directive(public) ident(IRubyObject) ident(get)operator(()operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(getLoadedFeatures)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004-2006 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Tim Azzopardi * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2007 MenTaLguY * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.AbstractCollection)operator(;) keyword(import) include(java.util.AbstractSet)operator(;) keyword(import) include(java.util.Collection)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.NoSuchElementException)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) comment(// Design overview:) comment(//) comment(// RubyHash is implemented as hash table with a singly-linked list of) comment(// RubyHash.RubyHashEntry objects for each bucket. RubyHashEntry objects) comment(// are also kept in a doubly-linked list which reflects their insertion) comment(// order and is used for iteration. For simplicity, this latter list is) comment(// circular; a dummy RubyHashEntry, RubyHash.head, is used to mark the) comment(// ends of the list.) comment(//) comment(// When an entry is removed from the table, it is also removed from the) comment(// doubly-linked list. However, while the reference to the previous) comment(// RubyHashEntry is cleared (to mark the entry as dead\), the reference) comment(// to the next RubyHashEntry is preserved so that iterators are not) comment(// invalidated: any iterator with a reference to a dead entry can climb) comment(// back up into the list of live entries by chasing next references until) comment(// it finds a live entry (or head\).) comment(//) comment(// Ordinarily, this scheme would require O(N\) time to clear a hash (since) comment(// each RubyHashEntry would need to be visited and unlinked from the) comment(// iteration list\), but RubyHash also maintains a generation count. Every) comment(// time the hash is cleared, the doubly-linked list is simply discarded and) comment(// the generation count incremented. Iterators check to see whether the) comment(// generation count has changed; if it has, they reset themselves back to) comment(// the new start of the list.) comment(//) comment(// This design means that iterators are never invalidated by changes to the) comment(// hashtable, and they do not need to modify the structure during their) comment(// lifecycle.) comment(//) comment(/** Implementation of the Hash class. * * Concurrency: no synchronization is required among readers, but * all users must synchronize externally with writers. * */) annotation(@JRubyClass)operator(()ident(name) operator(=) stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyHash) directive(extends) ident(RubyObject) directive(implements) pre_type(Map) operator({) directive(public) directive(static) ident(RubyClass) ident(createHashClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(hashc) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(HASH_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setHash)operator(()ident(hashc)operator(\))operator(;) ident(hashc)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(HASH)operator(;) ident(hashc)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyHash)operator(;) operator(}) operator(})operator(;) ident(hashc)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(hashc)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyHash)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(hashc)operator(;) operator(}) directive(private) directive(final) directive(static) ident(ObjectAllocator) ident(HASH_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyHash)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(HASH)operator(;) operator(}) comment(/** rb_hash_s_create * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(create)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\)) ident(recv)operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyHash) ident(hash)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(() ident(args)operator([)integer(0)operator(])operator(,) ident(runtime)operator(.)ident(getHash)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_HASH)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(RubyHash) ident(otherHash) operator(=) operator(()ident(RubyHash)operator(\)) ident(tmp)operator(;) keyword(return) keyword(new) ident(RubyHash)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(otherHash)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(()ident(args)operator(.)ident(length) operator(&) integer(1)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(hash) operator(=) operator(()ident(RubyHash)operator(\))ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(+=)integer(2)operator(\)) ident(hash)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(,) ident(args)operator([)ident(i)operator(+)integer(1)operator(])operator(\))operator(;) keyword(return) ident(hash)operator(;) operator(}) comment(/** rb_hash_new * */) directive(public) directive(static) directive(final) ident(RubyHash) ident(newHash)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(RubyHash)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(/** rb_hash_new * */) directive(public) directive(static) directive(final) ident(RubyHash) ident(newHash)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Map) ident(valueMap)operator(,) ident(IRubyObject) ident(defaultValue)operator(\)) operator({) keyword(assert) ident(defaultValue) operator(!=) pre_constant(null)operator(;) keyword(return) keyword(new) ident(RubyHash)operator(()ident(runtime)operator(,) ident(valueMap)operator(,) ident(defaultValue)operator(\))operator(;) operator(}) directive(private) ident(RubyHashEntry)type([]) ident(table)operator(;) directive(private) type(int) ident(size) operator(=) integer(0)operator(;) directive(private) type(int) ident(threshold)operator(;) directive(private) directive(static) directive(final) type(int) ident(PROCDEFAULT_HASH_F) operator(=) integer(1) operator(<)operator(<) integer(10)operator(;) directive(private) ident(IRubyObject) ident(ifNone)operator(;) directive(private) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(,) ident(RubyHash) ident(other)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) local_variable(this)operator(.)ident(ifNone) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(threshold) operator(=) ident(INITIAL_THRESHOLD)operator(;) ident(table) operator(=) ident(other)operator(.)ident(internalCopyTable)operator(()ident(head)operator(\))operator(;) ident(size) operator(=) ident(other)operator(.)ident(size)operator(;) operator(}) directive(public) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) local_variable(this)operator(.)ident(ifNone) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(alloc)operator(()operator(\))operator(;) operator(}) directive(public) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(defaultValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getHash)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(ifNone) operator(=) ident(defaultValue)operator(;) ident(alloc)operator(()operator(\))operator(;) operator(}) comment(/* * Constructor for internal usage (mainly for Array#|, Array#&, Array#- and Array#uniq\) * it doesn't initialize ifNone field */) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getHash)operator(()operator(\))operator(,) ident(objectSpace)operator(\))operator(;) ident(alloc)operator(()operator(\))operator(;) operator(}) comment(// TODO should this be deprecated ? (to be efficient, internals should deal with RubyHash directly\)) directive(public) ident(RubyHash)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Map) ident(valueMap)operator(,) ident(IRubyObject) ident(defaultValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getHash)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(ifNone) operator(=) ident(defaultValue)operator(;) ident(alloc)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(valueMap)operator(.)ident(entrySet)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;)ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(Map)operator(.)ident(Entry) ident(e) operator(=) operator(()pre_type(Map)operator(.)ident(Entry)operator(\))ident(iter)operator(.)ident(next)operator(()operator(\))operator(;) ident(internalPut)operator(()operator(()ident(IRubyObject)operator(\))ident(e)operator(.)ident(getKey)operator(()operator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(e)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(final) type(void) ident(alloc)operator(()operator(\)) operator({) ident(threshold) operator(=) ident(INITIAL_THRESHOLD)operator(;) ident(generation)operator(++)operator(;) ident(head)operator(.)ident(nextAdded) operator(=) ident(head)operator(.)ident(prevAdded) operator(=) ident(head)operator(;) ident(table) operator(=) keyword(new) ident(RubyHashEntry)operator([)ident(MRI_HASH_RESIZE) operator(?) ident(MRI_INITIAL_CAPACITY) operator(:) ident(JAVASOFT_INITIAL_CAPACITY)operator(])operator(;) operator(}) comment(/* ============================ * Here are hash internals * (This could be extracted to a separate class but it's not too large though\) * ============================ */) directive(private) directive(static) directive(final) type(int) ident(MRI_PRIMES)type([]) operator(=) operator({) integer(8) operator(+) integer(3)operator(,) integer(16) operator(+) integer(3)operator(,) integer(32) operator(+) integer(5)operator(,) integer(64) operator(+) integer(3)operator(,) integer(128) operator(+) integer(3)operator(,) integer(256) operator(+) integer(27)operator(,) integer(512) operator(+) integer(9)operator(,) integer(1024) operator(+) integer(9)operator(,) integer(2048) operator(+) integer(5)operator(,) integer(4096) operator(+) integer(3)operator(,) integer(8192) operator(+) integer(27)operator(,) integer(16384) operator(+) integer(43)operator(,) integer(32768) operator(+) integer(3)operator(,) integer(65536) operator(+) integer(45)operator(,) integer(131072) operator(+) integer(29)operator(,) integer(262144) operator(+) integer(3)operator(,) integer(524288) operator(+) integer(21)operator(,) integer(1048576) operator(+) integer(7)operator(,) integer(2097152) operator(+) integer(17)operator(,) integer(4194304) operator(+) integer(15)operator(,) integer(8388608) operator(+) integer(9)operator(,) integer(16777216) operator(+) integer(43)operator(,) integer(33554432) operator(+) integer(35)operator(,) integer(67108864) operator(+) integer(15)operator(,) integer(134217728) operator(+) integer(29)operator(,) integer(268435456) operator(+) integer(3)operator(,) integer(536870912) operator(+) integer(11)operator(,) integer(1073741824) operator(+) integer(85)operator(,) integer(0) operator(})operator(;) directive(private) directive(static) directive(final) type(int) ident(JAVASOFT_INITIAL_CAPACITY) operator(=) integer(8)operator(;) comment(// 16 ?) directive(private) directive(static) directive(final) type(int) ident(MRI_INITIAL_CAPACITY) operator(=) ident(MRI_PRIMES)operator([)integer(0)operator(])operator(;) directive(private) directive(static) directive(final) type(int) ident(INITIAL_THRESHOLD) operator(=) ident(JAVASOFT_INITIAL_CAPACITY) operator(-) operator(()ident(JAVASOFT_INITIAL_CAPACITY) operator(>)operator(>) integer(2)operator(\))operator(;) directive(private) directive(static) directive(final) type(int) ident(MAXIMUM_CAPACITY) operator(=) integer(1) operator(<)operator(<) integer(30)operator(;) directive(private) directive(static) directive(final) ident(RubyHashEntry) ident(NO_ENTRY) operator(=) keyword(new) ident(RubyHashEntry)operator(()operator(\))operator(;) directive(private) type(int) ident(generation) operator(=) integer(0)operator(;) comment(// generation count for O(1\) clears) directive(private) directive(final) ident(RubyHashEntry) ident(head) operator(=) keyword(new) ident(RubyHashEntry)operator(()operator(\))operator(;) operator({) ident(head)operator(.)ident(prevAdded) operator(=) ident(head)operator(.)ident(nextAdded) operator(=) ident(head)operator(;) operator(}) directive(static) directive(final) type(class) class(RubyHashEntry) directive(implements) pre_type(Map)operator(.)ident(Entry) operator({) directive(private) ident(IRubyObject) ident(key)operator(;) directive(private) ident(IRubyObject) ident(value)operator(;) directive(private) ident(RubyHashEntry) ident(next)operator(;) directive(private) ident(RubyHashEntry) ident(prevAdded)operator(;) directive(private) ident(RubyHashEntry) ident(nextAdded)operator(;) directive(private) type(int) ident(hash)operator(;) ident(RubyHashEntry)operator(()operator(\)) operator({) ident(key) operator(=) ident(NEVER)operator(;) operator(}) ident(RubyHashEntry)operator(()type(int) ident(h)operator(,) ident(IRubyObject) ident(k)operator(,) ident(IRubyObject) ident(v)operator(,) ident(RubyHashEntry) ident(e)operator(,) ident(RubyHashEntry) ident(head)operator(\)) operator({) ident(key) operator(=) ident(k)operator(;) ident(value) operator(=) ident(v)operator(;) ident(next) operator(=) ident(e)operator(;) ident(hash) operator(=) ident(h)operator(;) ident(prevAdded) operator(=) ident(head)operator(.)ident(prevAdded)operator(;) ident(nextAdded) operator(=) ident(head)operator(;) ident(nextAdded)operator(.)ident(prevAdded) operator(=) local_variable(this)operator(;) ident(prevAdded)operator(.)ident(nextAdded) operator(=) local_variable(this)operator(;) operator(}) directive(public) type(void) ident(detach)operator(()operator(\)) operator({) keyword(if) operator(()ident(prevAdded) operator(!=) pre_constant(null)operator(\)) operator({) ident(prevAdded)operator(.)ident(nextAdded) operator(=) ident(nextAdded)operator(;) ident(nextAdded)operator(.)ident(prevAdded) operator(=) ident(prevAdded)operator(;) ident(prevAdded) operator(=) pre_constant(null)operator(;) operator(}) operator(}) directive(public) type(boolean) ident(isLive)operator(()operator(\)) operator({) keyword(return) ident(prevAdded) operator(!=) pre_constant(null)operator(;) operator(}) directive(public) pre_type(Object) ident(getKey)operator(()operator(\)) operator({) keyword(return) ident(key)operator(;) operator(}) directive(public) pre_type(Object) ident(getJavaifiedKey)operator(()operator(\))operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(key)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(public) pre_type(Object) ident(getJavaifiedValue)operator(()operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(value)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(setValue)operator(()pre_type(Object) ident(value)operator(\)) operator({) ident(IRubyObject) ident(oldValue) operator(=) local_variable(this)operator(.)ident(value)operator(;) keyword(if) operator(()ident(value) keyword(instanceof) ident(IRubyObject)operator(\)) operator({) local_variable(this)operator(.)ident(value) operator(=) operator(()ident(IRubyObject)operator(\))ident(value)operator(;) operator(}) keyword(else) operator({) keyword(throw) keyword(new) exception(UnsupportedOperationException)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(oldValue)operator(;) operator(}) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\))operator({) keyword(if)operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyHashEntry)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(RubyHashEntry) ident(otherEntry) operator(=) operator(()ident(RubyHashEntry)operator(\))ident(other)operator(;) keyword(if)operator(()ident(key) operator(==) ident(otherEntry)operator(.)ident(key) operator(||) ident(key)operator(.)ident(eql)operator(()ident(otherEntry)operator(.)ident(key)operator(\))operator(\))operator({) keyword(if)operator(()ident(value) operator(==) ident(otherEntry)operator(.)ident(value) operator(||) ident(value)operator(.)ident(equals)operator(()ident(otherEntry)operator(.)ident(value)operator(\))operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(int) ident(hashCode)operator(()operator(\))operator({) keyword(return) ident(key)operator(.)ident(hashCode)operator(()operator(\)) operator(^) ident(value)operator(.)ident(hashCode)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(int) ident(JavaSoftHashValue)operator(()type(int) ident(h)operator(\)) operator({) ident(h) operator(^=) operator(()ident(h) operator(>)operator(>)operator(>) integer(20)operator(\)) operator(^) operator(()ident(h) operator(>)operator(>)operator(>) integer(12)operator(\))operator(;) keyword(return) ident(h) operator(^) operator(()ident(h) operator(>)operator(>)operator(>) integer(7)operator(\)) operator(^) operator(()ident(h) operator(>)operator(>)operator(>) integer(4)operator(\))operator(;) operator(}) directive(private) directive(static) type(int) ident(JavaSoftBucketIndex)operator(()directive(final) type(int) ident(h)operator(,) directive(final) type(int) ident(length)operator(\)) operator({) keyword(return) ident(h) operator(&) operator(()ident(length) operator(-) integer(1)operator(\))operator(;) operator(}) directive(private) directive(static) type(int) ident(MRIHashValue)operator(()type(int) ident(h)operator(\)) operator({) keyword(return) ident(h) operator(&) ident(HASH_SIGN_BIT_MASK)operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(HASH_SIGN_BIT_MASK) operator(=) operator(~)operator(()integer(1) operator(<)operator(<) integer(31)operator(\))operator(;) directive(private) directive(static) type(int) ident(MRIBucketIndex)operator(()directive(final) type(int) ident(h)operator(,) directive(final) type(int) ident(length)operator(\)) operator({) keyword(return) operator(()ident(h) operator(%) ident(length)operator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(resize)operator(()type(int) ident(newCapacity)operator(\)) operator({) directive(final) ident(RubyHashEntry)type([]) ident(oldTable) operator(=) ident(table)operator(;) directive(final) ident(RubyHashEntry)type([]) ident(newTable) operator(=) keyword(new) ident(RubyHashEntry)operator([)ident(newCapacity)operator(])operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(oldTable)operator(.)ident(length)operator(;) ident(j)operator(++)operator(\)) operator({) ident(RubyHashEntry) ident(entry) operator(=) ident(oldTable)operator([)ident(j)operator(])operator(;) ident(oldTable)operator([)ident(j)operator(]) operator(=) pre_constant(null)operator(;) keyword(while) operator(()ident(entry) operator(!=) pre_constant(null)operator(\)) operator({) ident(RubyHashEntry) ident(next) operator(=) ident(entry)operator(.)ident(next)operator(;) type(int) ident(i) operator(=) ident(bucketIndex)operator(()ident(entry)operator(.)ident(hash)operator(,) ident(newCapacity)operator(\))operator(;) ident(entry)operator(.)ident(next) operator(=) ident(newTable)operator([)ident(i)operator(])operator(;) ident(newTable)operator([)ident(i)operator(]) operator(=) ident(entry)operator(;) ident(entry) operator(=) ident(next)operator(;) operator(}) operator(}) ident(table) operator(=) ident(newTable)operator(;) operator(}) directive(private) directive(final) type(void) ident(JavaSoftCheckResize)operator(()operator(\)) operator({) keyword(if) operator(()ident(size) operator(>) ident(threshold)operator(\)) operator({) type(int) ident(oldCapacity) operator(=) ident(table)operator(.)ident(length)operator(;) keyword(if) operator(()ident(oldCapacity) operator(==) ident(MAXIMUM_CAPACITY)operator(\)) operator({) ident(threshold) operator(=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(;) keyword(return)operator(;) operator(}) type(int) ident(newCapacity) operator(=) ident(table)operator(.)ident(length) operator(<)operator(<) integer(1)operator(;) ident(resize)operator(()ident(newCapacity)operator(\))operator(;) ident(threshold) operator(=) ident(newCapacity) operator(-) operator(()ident(newCapacity) operator(>)operator(>) integer(2)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) directive(final) type(int) ident(MIN_CAPA) operator(=) integer(8)operator(;) directive(private) directive(static) directive(final) type(int) ident(ST_DEFAULT_MAX_DENSITY) operator(=) integer(5)operator(;) directive(private) directive(final) type(void) ident(MRICheckResize)operator(()operator(\)) operator({) keyword(if) operator(()ident(size) operator(/) ident(table)operator(.)ident(length) operator(>) ident(ST_DEFAULT_MAX_DENSITY)operator(\)) operator({) type(int) ident(forSize) operator(=) ident(table)operator(.)ident(length) operator(+) integer(1)operator(;) comment(// size + 1;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(,) ident(newCapacity) operator(=) ident(MIN_CAPA)operator(;) ident(i) operator(<) ident(MRI_PRIMES)operator(.)ident(length)operator(;) ident(i)operator(++)operator(,) ident(newCapacity) operator(<)operator(<=) integer(1)operator(\)) operator({) keyword(if) operator(()ident(newCapacity) operator(>) ident(forSize)operator(\)) operator({) ident(resize)operator(()ident(MRI_PRIMES)operator([)ident(i)operator(])operator(\))operator(;) keyword(return)operator(;) operator(}) operator(}) keyword(return)operator(;) comment(// suboptimal for large hashes (> 1073741824 + 85 entries\) not very likely to happen) operator(}) operator(}) comment(// ------------------------------) directive(private) directive(static) type(boolean) ident(MRI_HASH) operator(=) pre_constant(true)operator(;) directive(private) directive(static) type(boolean) ident(MRI_HASH_RESIZE) operator(=) pre_constant(true)operator(;) directive(private) directive(static) type(int) ident(hashValue)operator(()directive(final) type(int) ident(h)operator(\)) operator({) keyword(return) ident(MRI_HASH) operator(?) ident(MRIHashValue)operator(()ident(h)operator(\)) operator(:) ident(JavaSoftHashValue)operator(()ident(h)operator(\))operator(;) operator(}) directive(private) directive(static) type(int) ident(bucketIndex)operator(()directive(final) type(int) ident(h)operator(,) directive(final) type(int) ident(length)operator(\)) operator({) keyword(return) ident(MRI_HASH) operator(?) ident(MRIBucketIndex)operator(()ident(h)operator(,) ident(length)operator(\)) operator(:) ident(JavaSoftBucketIndex)operator(()ident(h)operator(,) ident(length)operator(\))operator(;) operator(}) directive(private) type(void) ident(checkResize)operator(()operator(\)) operator({) keyword(if) operator(()ident(MRI_HASH_RESIZE)operator(\)) ident(MRICheckResize)operator(()operator(\))operator(;) keyword(else) ident(JavaSoftCheckResize)operator(()operator(\))operator(;) operator(}) comment(// ------------------------------) directive(public) directive(static) type(long) ident(collisions) operator(=) integer(0)operator(;) comment(// put implementation) directive(private) directive(final) type(void) ident(internalPut)operator(()directive(final) ident(IRubyObject) ident(key)operator(,) directive(final) ident(IRubyObject) ident(value)operator(\)) operator({) ident(internalPut)operator(()ident(key)operator(,) ident(value)operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(internalPut)operator(()directive(final) ident(IRubyObject) ident(key)operator(,) directive(final) ident(IRubyObject) ident(value)operator(,) directive(final) type(boolean) ident(checkForExisting)operator(\)) operator({) ident(checkResize)operator(()operator(\))operator(;) directive(final) type(int) ident(hash) operator(=) ident(hashValue)operator(()ident(key)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) directive(final) type(int) ident(i) operator(=) ident(bucketIndex)operator(()ident(hash)operator(,) ident(table)operator(.)ident(length)operator(\))operator(;) comment(// if (table[i] != null\) collisions++;) keyword(if) operator(()ident(checkForExisting)operator(\)) operator({) keyword(for) operator(()ident(RubyHashEntry) ident(entry) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(entry) operator(!=) pre_constant(null)operator(;) ident(entry) operator(=) ident(entry)operator(.)ident(next)operator(\)) operator({) ident(IRubyObject) ident(k)operator(;) keyword(if) operator(()ident(entry)operator(.)ident(hash) operator(==) ident(hash) operator(&&) operator(()operator(()ident(k) operator(=) ident(entry)operator(.)ident(key)operator(\)) operator(==) ident(key) operator(||) ident(key)operator(.)ident(eql)operator(()ident(k)operator(\))operator(\))operator(\)) operator({) ident(entry)operator(.)ident(value) operator(=) ident(value)operator(;) keyword(return)operator(;) operator(}) operator(}) operator(}) ident(table)operator([)ident(i)operator(]) operator(=) keyword(new) ident(RubyHashEntry)operator(()ident(hash)operator(,) ident(key)operator(,) ident(value)operator(,) ident(table)operator([)ident(i)operator(])operator(,) ident(head)operator(\))operator(;) ident(size)operator(++)operator(;) operator(}) comment(// get implementation) directive(private) directive(final) ident(IRubyObject) ident(internalGet)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) comment(// specialized for value) keyword(return) ident(internalGetEntry)operator(()ident(key)operator(\))operator(.)ident(value)operator(;) operator(}) directive(private) directive(final) ident(RubyHashEntry) ident(internalGetEntry)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) directive(final) type(int) ident(hash) operator(=) ident(hashValue)operator(()ident(key)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()ident(RubyHashEntry) ident(entry) operator(=) ident(table)operator([)ident(bucketIndex)operator(()ident(hash)operator(,) ident(table)operator(.)ident(length)operator(\))operator(])operator(;) ident(entry) operator(!=) pre_constant(null)operator(;) ident(entry) operator(=) ident(entry)operator(.)ident(next)operator(\)) operator({) ident(IRubyObject) ident(k)operator(;) keyword(if) operator(()ident(entry)operator(.)ident(hash) operator(==) ident(hash) operator(&&) operator(()operator(()ident(k) operator(=) ident(entry)operator(.)ident(key)operator(\)) operator(==) ident(key) operator(||) ident(key)operator(.)ident(eql)operator(()ident(k)operator(\))operator(\))operator(\)) keyword(return) ident(entry)operator(;) operator(}) keyword(return) ident(NO_ENTRY)operator(;) operator(}) comment(// delete implementation) directive(private) directive(final) ident(RubyHashEntry) ident(internalDelete)operator(()directive(final) ident(IRubyObject) ident(key)operator(\)) operator({) keyword(return) ident(internalDelete)operator(()ident(hashValue)operator(()ident(key)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(,) ident(MATCH_KEY)operator(,) ident(key)operator(\))operator(;) operator(}) directive(private) directive(final) ident(RubyHashEntry) ident(internalDeleteEntry)operator(()directive(final) ident(RubyHashEntry) ident(entry)operator(\)) operator({) comment(// n.b. we need to recompute the hash in case the key object was modified) keyword(return) ident(internalDelete)operator(()ident(hashValue)operator(()ident(entry)operator(.)ident(key)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(,) ident(MATCH_ENTRY)operator(,) ident(entry)operator(\))operator(;) operator(}) directive(private) directive(final) ident(RubyHashEntry) ident(internalDelete)operator(()directive(final) type(int) ident(hash)operator(,) directive(final) ident(EntryMatchType) ident(matchType)operator(,) directive(final) pre_type(Object) ident(obj)operator(\)) operator({) directive(final) type(int) ident(i) operator(=) ident(bucketIndex)operator(()ident(hash)operator(,) ident(table)operator(.)ident(length)operator(\))operator(;) ident(RubyHashEntry) ident(entry) operator(=) ident(table)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(entry) operator(!=) pre_constant(null)operator(\)) operator({) ident(RubyHashEntry) ident(prior) operator(=) pre_constant(null)operator(;) keyword(for) operator(()operator(;) ident(entry) operator(!=) pre_constant(null)operator(;) ident(prior) operator(=) ident(entry)operator(,) ident(entry) operator(=) ident(entry)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(entry)operator(.)ident(hash) operator(==) ident(hash) operator(&&) ident(matchType)operator(.)ident(matches)operator(()ident(entry)operator(,) ident(obj)operator(\))operator(\)) operator({) keyword(if) operator(()ident(prior) operator(!=) pre_constant(null)operator(\)) operator({) ident(prior)operator(.)ident(next) operator(=) ident(entry)operator(.)ident(next)operator(;) operator(}) keyword(else) operator({) ident(table)operator([)ident(i)operator(]) operator(=) ident(entry)operator(.)ident(next)operator(;) operator(}) ident(entry)operator(.)ident(detach)operator(()operator(\))operator(;) ident(size)operator(--)operator(;) keyword(return) ident(entry)operator(;) operator(}) operator(}) operator(}) keyword(return) ident(NO_ENTRY)operator(;) operator(}) directive(private) directive(static) directive(abstract) type(class) class(EntryMatchType) operator({) directive(public) directive(abstract) type(boolean) ident(matches)operator(()directive(final) ident(RubyHashEntry) ident(entry)operator(,) directive(final) pre_type(Object) ident(obj)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(EntryMatchType) ident(MATCH_KEY) operator(=) keyword(new) ident(EntryMatchType)operator(()operator(\)) operator({) directive(public) type(boolean) ident(matches)operator(()directive(final) ident(RubyHashEntry) ident(entry)operator(,) directive(final) pre_type(Object) ident(obj)operator(\)) operator({) directive(final) ident(IRubyObject) ident(key) operator(=) ident(entry)operator(.)ident(key)operator(;) keyword(return) ident(obj) operator(==) ident(key) operator(||) operator(()operator(()operator(()ident(IRubyObject)operator(\))ident(obj)operator(\))operator(.)ident(eql)operator(()ident(key)operator(\))operator(\))operator(;) operator(}) operator(})operator(;) directive(private) directive(static) directive(final) ident(EntryMatchType) ident(MATCH_ENTRY) operator(=) keyword(new) ident(EntryMatchType)operator(()operator(\)) operator({) directive(public) type(boolean) ident(matches)operator(()directive(final) ident(RubyHashEntry) ident(entry)operator(,) directive(final) pre_type(Object) ident(obj)operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(equals)operator(()ident(obj)operator(\))operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(RubyHashEntry)type([]) ident(internalCopyTable)operator(()ident(RubyHashEntry) ident(destHead)operator(\)) operator({) ident(RubyHashEntry)type([])ident(newTable) operator(=) keyword(new) ident(RubyHashEntry)operator([)ident(table)operator(.)ident(length)operator(])operator(;) keyword(for) operator(()ident(RubyHashEntry) ident(entry) operator(=) ident(head)operator(.)ident(nextAdded)operator(;) ident(entry) operator(!=) ident(head)operator(;) ident(entry) operator(=) ident(entry)operator(.)ident(nextAdded)operator(\)) operator({) type(int) ident(i) operator(=) ident(bucketIndex)operator(()ident(entry)operator(.)ident(hash)operator(,) ident(table)operator(.)ident(length)operator(\))operator(;) ident(newTable)operator([)ident(i)operator(]) operator(=) keyword(new) ident(RubyHashEntry)operator(()ident(entry)operator(.)ident(hash)operator(,) ident(entry)operator(.)ident(key)operator(,) ident(entry)operator(.)ident(value)operator(,) ident(newTable)operator([)ident(i)operator(])operator(,) ident(destHead)operator(\))operator(;) operator(}) keyword(return) ident(newTable)operator(;) operator(}) directive(public) directive(static) directive(abstract) type(class) class(Visitor) operator({) directive(public) directive(abstract) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\))operator(;) operator(}) directive(public) type(void) ident(visitAll)operator(()ident(Visitor) ident(visitor)operator(\)) operator({) type(int) ident(startGeneration) operator(=) ident(generation)operator(;) keyword(for) operator(()ident(RubyHashEntry) ident(entry) operator(=) ident(head)operator(.)ident(nextAdded)operator(;) ident(entry) operator(!=) ident(head)operator(;) ident(entry) operator(=) ident(entry)operator(.)ident(nextAdded)operator(\)) operator({) keyword(if) operator(()ident(startGeneration) operator(!=) ident(generation)operator(\)) operator({) ident(startGeneration) operator(=) ident(generation)operator(;) ident(entry) operator(=) ident(head)operator(.)ident(nextAdded)operator(;) keyword(if) operator(()ident(entry) operator(==) ident(head)operator(\)) keyword(break)operator(;) operator(}) keyword(if) operator(()ident(entry)operator(.)ident(isLive)operator(()operator(\))operator(\)) ident(visitor)operator(.)ident(visit)operator(()ident(entry)operator(.)ident(key)operator(,) ident(entry)operator(.)ident(value)operator(\))operator(;) operator(}) operator(}) comment(/* ============================ * End of hash internals * ============================ */) comment(/* ================ * Instance Methods * ================ */) comment(/** rb_hash_initialize * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) ident(ifNone) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(,) ident(block)operator(\))operator(;) ident(flags) operator(|=) ident(PROCDEFAULT_HASH_F)operator(;) operator(}) keyword(else) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) ident(ifNone) operator(=) ident(args)operator([)integer(0)operator(])operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_default * */) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(default_value_get)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(default_value_get)operator(()ident(context)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(default_value_get)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(1)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(default_value_get)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(ifNone)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(default_value_get)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(ifNone)operator(,) stringoperator(,) local_variable(this)operator(,) ident(arg)operator(\))operator(;) operator(}) keyword(return) ident(ifNone)operator(;) operator(}) comment(/** rb_hash_set_default * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(default_value_set)operator(()directive(final) ident(IRubyObject) ident(defaultValue)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) ident(ifNone) operator(=) ident(defaultValue)operator(;) ident(flags) operator(&=) operator(~)ident(PROCDEFAULT_HASH_F)operator(;) keyword(return) ident(ifNone)operator(;) operator(}) comment(/** rb_hash_default_proc * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(default_proc)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0) operator(?) ident(ifNone) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_hash_modify * */) directive(public) type(void) ident(modify)operator(()operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** inspect_hash * */) directive(private) ident(IRubyObject) ident(inspectHash)operator(()directive(final) ident(ThreadContext) ident(context)operator(\)) operator({) directive(final) ident(ByteList) ident(buffer) operator(=) keyword(new) ident(ByteList)operator(()operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) directive(final) type(boolean)type([]) ident(firstEntry) operator(=) keyword(new) type(boolean)operator([)integer(1)operator(])operator(;) ident(firstEntry)operator([)integer(0)operator(]) operator(=) pre_constant(true)operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()operator(!)ident(firstEntry)operator([)integer(0)operator(])operator(\)) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()ident(inspect)operator(()ident(context)operator(,) ident(key)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()string)delimiter(')>operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()ident(inspect)operator(()ident(context)operator(,) ident(value)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(firstEntry)operator([)integer(0)operator(]) operator(=) pre_constant(false)operator(;) operator(}) operator(})operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buffer)operator(\))operator(;) operator(}) comment(/** rb_hash_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(size) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(inspectHash)operator(()ident(context)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) comment(/** rb_hash_size * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyFixnum) ident(rb_size)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(size)operator(\))operator(;) operator(}) comment(/** rb_hash_empty_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(empty_p)operator(()operator(\)) operator({) keyword(return) ident(size) operator(==) integer(0) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_hash_to_a * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(result) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(size)operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(key)operator(,) ident(value)operator(\))operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(result)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_hash_to_s & to_s_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(to_a)operator(()operator(\))operator(.)ident(to_s)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) comment(/** rb_hash_rehash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyHash) ident(rehash)operator(()operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) directive(final) ident(RubyHashEntry)type([]) ident(oldTable) operator(=) ident(table)operator(;) directive(final) ident(RubyHashEntry)type([]) ident(newTable) operator(=) keyword(new) ident(RubyHashEntry)operator([)ident(oldTable)operator(.)ident(length)operator(])operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(oldTable)operator(.)ident(length)operator(;) ident(j)operator(++)operator(\)) operator({) ident(RubyHashEntry) ident(entry) operator(=) ident(oldTable)operator([)ident(j)operator(])operator(;) ident(oldTable)operator([)ident(j)operator(]) operator(=) pre_constant(null)operator(;) keyword(while) operator(()ident(entry) operator(!=) pre_constant(null)operator(\)) operator({) ident(RubyHashEntry) ident(next) operator(=) ident(entry)operator(.)ident(next)operator(;) ident(entry)operator(.)ident(hash) operator(=) ident(entry)operator(.)ident(key)operator(.)ident(hashCode)operator(()operator(\))operator(;) comment(// update the hash value) type(int) ident(i) operator(=) ident(bucketIndex)operator(()ident(entry)operator(.)ident(hash)operator(,) ident(newTable)operator(.)ident(length)operator(\))operator(;) ident(entry)operator(.)ident(next) operator(=) ident(newTable)operator([)ident(i)operator(])operator(;) ident(newTable)operator([)ident(i)operator(]) operator(=) ident(entry)operator(;) ident(entry) operator(=) ident(next)operator(;) operator(}) operator(}) ident(table) operator(=) ident(newTable)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_to_hash * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyHash) ident(to_hash)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) ident(RubyHash) ident(convertToHash)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) directive(final) type(void) ident(fastASet)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(internalPut)operator(()ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(op_aset)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** rb_hash_aset * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(key) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) ident(internalPut)operator(()ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) keyword(else) operator({) directive(final) ident(RubyHashEntry) ident(entry) operator(=) ident(internalGetEntry)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(entry) operator(!=) ident(NO_ENTRY)operator(\)) operator({) ident(entry)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) keyword(else) operator({) ident(RubyString) ident(realKey) operator(=) operator(()ident(RubyString)operator(\))ident(key)operator(;) keyword(if) operator(()operator(!)ident(realKey)operator(.)ident(isFrozen)operator(()operator(\))operator(\)) operator({) ident(realKey) operator(=) ident(realKey)operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(realKey)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(\))operator(;)operator(;) ident(realKey)operator(.)ident(setFrozen)operator(()pre_constant(true)operator(\))operator(;) operator(}) ident(internalPut)operator(()ident(realKey)operator(,) ident(value)operator(,) pre_constant(false)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** * Note: this is included as a compatibility measure for AR-JDBC * @deprecated use RubyHash.op_aset instead */) directive(public) ident(IRubyObject) ident(aset)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(op_aset)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * Note: this is included as a compatibility measure for Mongrel+JRuby * @deprecated use RubyHash.op_aref instead */) directive(public) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) keyword(return) ident(op_aref)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(key)operator(\))operator(;) operator(}) directive(public) directive(final) ident(IRubyObject) ident(fastARef)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) comment(// retuns null when not found to avoid unnecessary getRuntime(\).getNil(\) call) keyword(return) ident(internalGet)operator(()ident(key)operator(\))operator(;) operator(}) comment(/** rb_hash_aref * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(\)) operator({) ident(IRubyObject) ident(value)operator(;) keyword(return) operator(()operator(()ident(value) operator(=) ident(internalGet)operator(()ident(key)operator(\))operator(\)) operator(==) pre_constant(null)operator(\)) operator(?) ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(DEFAULT)operator(,) stringoperator(,) ident(key)operator(\)) operator(:) ident(value)operator(;) operator(}) comment(/** rb_hash_fetch * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(fetch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2) operator(&&) ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(BLOCK_BEATS_DEFAULT_VALUE)operator(,) stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(internalGet)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) keyword(return) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** rb_hash_has_key * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(has_key_p)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) keyword(return) ident(internalGetEntry)operator(()ident(key)operator(\)) operator(==) ident(NO_ENTRY) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) directive(private) type(class) class(Found) directive(extends) exception(RuntimeException) operator({)operator(}) directive(private) type(boolean) ident(hasValue)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(expected)operator(\)) operator({) keyword(try) operator({) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(value)operator(,) ident(expected)operator(\))operator(\)) operator({) keyword(throw) keyword(new) ident(Found)operator(()operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) keyword(catch) operator(()ident(Found) ident(found)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) comment(/** rb_hash_has_value * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(has_value_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(expected)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(hasValue)operator(()ident(context)operator(,) ident(expected)operator(\))operator(\))operator(;) operator(}) comment(/** rb_hash_each * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(each)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) comment(// rb_assoc_new equivalent) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(key)operator(,) ident(value)operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(false)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_each_pair * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(each_pair)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) comment(// rb_yield_values(2,...\) equivalent) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(key)operator(,) ident(value)operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(true)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_each_value * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(each_value)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(value)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_each_key * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(each_key)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(key)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_sort * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(sort)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(to_a)operator(()operator(\))operator(.)ident(sort_bang)operator(()ident(block)operator(\))operator(;) operator(}) directive(private) directive(static) type(class) class(FoundKey) directive(extends) exception(RuntimeException) operator({) directive(public) ident(IRubyObject) ident(key)operator(;) ident(FoundKey)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) local_variable(super)operator(()operator(\))operator(;) local_variable(this)operator(.)ident(key) operator(=) ident(key)operator(;) operator(}) operator(}) comment(/** rb_hash_index * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(expected)operator(\)) operator({) ident(IRubyObject) ident(key) operator(=) ident(internalIndex)operator(()ident(context)operator(,) ident(expected)operator(\))operator(;) keyword(if) operator(()ident(key) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(key)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(internalIndex)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(expected)operator(\)) operator({) keyword(try) operator({) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(value)operator(,) ident(expected)operator(\))operator(\)) operator({) keyword(throw) keyword(new) ident(FoundKey)operator(()ident(key)operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) keyword(catch) operator(()ident(FoundKey) ident(found)operator(\)) operator({) keyword(return) ident(found)operator(.)ident(key)operator(;) operator(}) operator(}) comment(/** rb_hash_indexes * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(indices)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(indices)operator(\)) operator({) keyword(return) ident(values_at)operator(()ident(context)operator(,) ident(indices)operator(\))operator(;) operator(}) comment(/** rb_hash_keys * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(keys)operator(()operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyArray) ident(keys) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(size)operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(keys)operator(.)ident(append)operator(()ident(key)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(keys)operator(;) operator(}) comment(/** rb_hash_values * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(rb_values)operator(()operator(\)) operator({) directive(final) ident(RubyArray) ident(values) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(size)operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(values)operator(.)ident(append)operator(()ident(value)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(values)operator(;) operator(}) comment(/** rb_hash_equal * */) directive(private) directive(static) directive(final) type(boolean) ident(EQUAL_CHECK_DEFAULT_VALUE) operator(=) pre_constant(false)operator(;) directive(private) directive(static) type(class) class(Mismatch) directive(extends) exception(RuntimeException) operator({)operator(}) annotation(@Override) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyHash)operator(\))operator(\)) operator({) keyword(if) operator(()ident(other)operator(.)ident(respondsTo)operator(()stringoperator(\)) operator(&&) ident(equalInternal)operator(()ident(context)operator(,) ident(other)operator(,) local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(final) ident(RubyHash) ident(otherHash) operator(=) operator(()ident(RubyHash)operator(\))ident(other)operator(;) keyword(if) operator(()ident(size) operator(!=) ident(otherHash)operator(.)ident(size)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(EQUAL_CHECK_DEFAULT_VALUE)operator(\)) operator({) keyword(if) operator(()operator(!)ident(equalInternal)operator(()ident(context)operator(,) ident(ifNone)operator(,) ident(otherHash)operator(.)ident(ifNone)operator(\)) operator(&&) operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) operator(()ident(otherHash)operator(.)ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(IRubyObject) ident(otherValue) operator(=) ident(otherHash)operator(.)ident(internalGet)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(otherValue) operator(==) pre_constant(null) operator(||) operator(!)ident(equalInternal)operator(()ident(context)operator(,) ident(value)operator(,) ident(otherValue)operator(\))operator(\)) keyword(throw) keyword(new) ident(Mismatch)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(Mismatch) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_hash_shift * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(shift)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) ident(RubyHashEntry) ident(entry) operator(=) ident(head)operator(.)ident(nextAdded)operator(;) keyword(if) operator(()ident(entry) operator(!=) ident(head)operator(\)) operator({) ident(RubyArray) ident(result) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(entry)operator(.)ident(key)operator(,) ident(entry)operator(.)ident(value)operator(\))operator(;) ident(internalDeleteEntry)operator(()ident(entry)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) keyword(if) operator(()operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(ifNone)operator(,) stringoperator(,) local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(ifNone)operator(;) operator(}) operator(}) directive(public) directive(final) type(boolean) ident(fastDelete)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) keyword(return) ident(internalDelete)operator(()ident(key)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) comment(/** rb_hash_delete * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(delete)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(key)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) directive(final) ident(RubyHashEntry) ident(entry) operator(=) ident(internalDelete)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(entry) operator(!=) ident(NO_ENTRY)operator(\)) keyword(return) ident(entry)operator(.)ident(value)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(key)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_hash_select * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(select)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(RubyArray) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newArray)operator(()ident(key)operator(,) ident(value)operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(true)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newArray)operator(()ident(key)operator(,) ident(value)operator(\))operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_hash_delete_if * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(delete_if)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyHash) ident(self) operator(=) local_variable(this)operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(key)operator(,) ident(value)operator(\))operator(,) pre_constant(null)operator(,) pre_constant(null)operator(,) pre_constant(true)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(self)operator(.)ident(delete)operator(()ident(context)operator(,) ident(key)operator(,) ident(block)operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_reject * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(reject)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyHash)operator(\))ident(dup)operator(()operator(\))operator(\))operator(.)ident(delete_if)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** rb_hash_reject_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(reject_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(n) operator(=) ident(size)operator(;) ident(delete_if)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) keyword(if) operator(()ident(n) operator(==) ident(size)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_clear * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyHash) ident(rb_clear)operator(()operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(size) operator(>) integer(0)operator(\)) operator({) ident(alloc)operator(()operator(\))operator(;) ident(size) operator(=) integer(0)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_invert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyHash) ident(invert)operator(()directive(final) ident(ThreadContext) ident(context)operator(\)) operator({) directive(final) ident(RubyHash) ident(result) operator(=) ident(newHash)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(result)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(value)operator(,) ident(key)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_hash_update * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(merge_bang)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(other)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyHash) ident(otherHash) operator(=) ident(other)operator(.)ident(convertToHash)operator(()operator(\))operator(;) directive(final) ident(RubyHash) ident(self) operator(=) local_variable(this)operator(;) ident(otherHash)operator(.)ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(existing) operator(=) ident(self)operator(.)ident(internalGet)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(existing) operator(!=) pre_constant(null)operator(\)) ident(value) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyArray)operator(.)ident(newArrayNoCopy)operator(()ident(runtime)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(key)operator(,) ident(existing)operator(,) ident(value)operator(})operator(\))operator(\))operator(;) operator(}) ident(self)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_merge * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyHash) ident(merge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyHash)operator(\))ident(dup)operator(()operator(\))operator(\))operator(.)ident(merge_bang)operator(()ident(context)operator(,) ident(other)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** rb_hash_replace * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(RubyHash) ident(initialize_copy)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(replace)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_hash_replace * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyHash) ident(replace)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) directive(final) ident(RubyHash) ident(otherHash) operator(=) ident(other)operator(.)ident(convertToHash)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(otherHash)operator(\)) keyword(return) local_variable(this)operator(;) ident(rb_clear)operator(()operator(\))operator(;) directive(final) ident(RubyHash) ident(self) operator(=) local_variable(this)operator(;) ident(otherHash)operator(.)ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(self)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(key)operator(,) ident(value)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(ifNone) operator(=) ident(otherHash)operator(.)ident(ifNone)operator(;) keyword(if) operator(()operator(()ident(otherHash)operator(.)ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(flags) operator(|=) ident(PROCDEFAULT_HASH_F)operator(;) operator(}) keyword(else) operator({) ident(flags) operator(&=) operator(~)ident(PROCDEFAULT_HASH_F)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_hash_values_at * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyArray) ident(values_at)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyArray) ident(result) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(op_aref)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(public) type(boolean) ident(hasDefaultProc)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(PROCDEFAULT_HASH_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getIfNone)operator(()operator(\))operator({) keyword(return) ident(ifNone)operator(;) operator(}) directive(private) directive(static) type(class) class(VisitorIOException) directive(extends) exception(RuntimeException) operator({) ident(VisitorIOException)operator(()pre_type(Throwable) ident(cause)operator(\)) operator({) local_variable(super)operator(()ident(cause)operator(\))operator(;) operator(}) operator(}) comment(// FIXME: Total hack to get flash in Rails marshalling/unmarshalling in session ok...We need) comment(// to totally change marshalling to work with overridden core classes.) directive(public) directive(static) type(void) ident(marshalTo)operator(()directive(final) ident(RubyHash) ident(hash)operator(,) directive(final) ident(MarshalStream) ident(output)operator(\)) directive(throws) exception(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(hash)operator(\))operator(;) ident(output)operator(.)ident(writeInt)operator(()ident(hash)operator(.)ident(size)operator(\))operator(;) keyword(try) operator({) ident(hash)operator(.)ident(visitAll)operator(()keyword(new) ident(Visitor)operator(()operator(\)) operator({) directive(public) type(void) ident(visit)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(try) operator({) ident(output)operator(.)ident(dumpObject)operator(()ident(key)operator(\))operator(;) ident(output)operator(.)ident(dumpObject)operator(()ident(value)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) keyword(new) ident(VisitorIOException)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()ident(VisitorIOException) ident(e)operator(\)) operator({) keyword(throw) operator(()exception(IOException)operator(\))ident(e)operator(.)ident(getCause)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(hash)operator(.)ident(ifNone)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(output)operator(.)ident(dumpObject)operator(()ident(hash)operator(.)ident(ifNone)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyHash) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(,) type(boolean) ident(defaultValue)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyHash) ident(result) operator(=) ident(newHash)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) type(int) ident(size) operator(=) ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(size)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(,) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(defaultValue)operator(\)) ident(result)operator(.)ident(default_value_set)operator(()ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(public) pre_type(Class) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) pre_type(Map)operator(.)ident(class)operator(;) operator(}) comment(// Satisfy java.util.Set interface (for Java integration\)) directive(public) type(int) ident(size)operator(()operator(\)) operator({) keyword(return) ident(size)operator(;) operator(}) directive(public) type(boolean) ident(isEmpty)operator(()operator(\)) operator({) keyword(return) ident(size) operator(==) integer(0)operator(;) operator(}) directive(public) type(boolean) ident(containsKey)operator(()pre_type(Object) ident(key)operator(\)) operator({) keyword(return) ident(internalGet)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(key)operator(\))operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) directive(public) type(boolean) ident(containsValue)operator(()pre_type(Object) ident(value)operator(\)) operator({) keyword(return) ident(hasValue)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(get)operator(()pre_type(Object) ident(key)operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(internalGet)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(key)operator(\))operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(put)operator(()pre_type(Object) ident(key)operator(,) pre_type(Object) ident(value)operator(\)) operator({) ident(internalPut)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(key)operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(\))operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) directive(public) pre_type(Object) ident(remove)operator(()pre_type(Object) ident(key)operator(\)) operator({) ident(IRubyObject) ident(rubyKey) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(key)operator(\))operator(;) keyword(return) ident(internalDelete)operator(()ident(rubyKey)operator(\))operator(.)ident(value)operator(;) operator(}) directive(public) type(void) ident(putAll)operator(()pre_type(Map) ident(map)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(map)operator(.)ident(keySet)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(Object) ident(key) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(;) ident(internalPut)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(runtime)operator(,) ident(key)operator(\))operator(,) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(runtime)operator(,) ident(map)operator(.)ident(get)operator(()ident(key)operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(clear)operator(()operator(\)) operator({) ident(rb_clear)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyHash)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) pre_constant(true)operator(;) keyword(return) ident(op_equal)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) operator(()ident(RubyHash)operator(\))ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(?) pre_constant(true) operator(:) pre_constant(false)operator(;) operator(}) directive(public) pre_type(Set) ident(keySet)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseSet)operator(()ident(KEY_VIEW)operator(\))operator(;) operator(}) directive(public) pre_type(Set) ident(directKeySet)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseSet)operator(()ident(DIRECT_KEY_VIEW)operator(\))operator(;) operator(}) directive(public) pre_type(Collection) ident(values)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseCollection)operator(()ident(VALUE_VIEW)operator(\))operator(;) operator(}) directive(public) pre_type(Collection) ident(directValues)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseCollection)operator(()ident(DIRECT_VALUE_VIEW)operator(\))operator(;) operator(}) directive(public) pre_type(Set) ident(entrySet)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseSet)operator(()ident(ENTRY_VIEW)operator(\))operator(;) operator(}) directive(public) pre_type(Set) ident(directEntrySet)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseSet)operator(()ident(DIRECT_ENTRY_VIEW)operator(\))operator(;) operator(}) directive(private) type(class) class(BaseSet) directive(extends) pre_type(AbstractSet) operator({) directive(final) ident(EntryView) ident(view)operator(;) directive(public) ident(BaseSet)operator(()ident(EntryView) ident(view)operator(\)) operator({) local_variable(this)operator(.)ident(view) operator(=) ident(view)operator(;) operator(}) directive(public) pre_type(Iterator) ident(iterator)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseIterator)operator(()ident(view)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(view)operator(.)ident(contains)operator(()ident(RubyHash)operator(.)ident(this)operator(,) ident(o)operator(\))operator(;) operator(}) directive(public) type(void) ident(clear)operator(()operator(\)) operator({) ident(RubyHash)operator(.)ident(this)operator(.)ident(clear)operator(()operator(\))operator(;) operator(}) directive(public) type(int) ident(size)operator(()operator(\)) operator({) keyword(return) ident(RubyHash)operator(.)ident(this)operator(.)ident(size)operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(view)operator(.)ident(remove)operator(()ident(RubyHash)operator(.)ident(this)operator(,) ident(o)operator(\))operator(;) operator(}) operator(}) directive(private) type(class) class(BaseCollection) directive(extends) pre_type(AbstractCollection) operator({) directive(final) ident(EntryView) ident(view)operator(;) directive(public) ident(BaseCollection)operator(()ident(EntryView) ident(view)operator(\)) operator({) local_variable(this)operator(.)ident(view) operator(=) ident(view)operator(;) operator(}) directive(public) pre_type(Iterator) ident(iterator)operator(()operator(\)) operator({) keyword(return) keyword(new) ident(BaseIterator)operator(()ident(view)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(view)operator(.)ident(contains)operator(()ident(RubyHash)operator(.)ident(this)operator(,) ident(o)operator(\))operator(;) operator(}) directive(public) type(void) ident(clear)operator(()operator(\)) operator({) ident(RubyHash)operator(.)ident(this)operator(.)ident(clear)operator(()operator(\))operator(;) operator(}) directive(public) type(int) ident(size)operator(()operator(\)) operator({) keyword(return) ident(RubyHash)operator(.)ident(this)operator(.)ident(size)operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(view)operator(.)ident(remove)operator(()ident(RubyHash)operator(.)ident(this)operator(,) ident(o)operator(\))operator(;) operator(}) operator(}) directive(private) type(class) class(BaseIterator) directive(implements) pre_type(Iterator) operator({) directive(final) directive(private) ident(EntryView) ident(view)operator(;) directive(private) ident(RubyHashEntry) ident(entry)operator(;) directive(private) type(boolean) ident(peeking)operator(;) directive(private) type(int) ident(startGeneration)operator(;) directive(public) ident(BaseIterator)operator(()ident(EntryView) ident(view)operator(\)) operator({) local_variable(this)operator(.)ident(view) operator(=) ident(view)operator(;) local_variable(this)operator(.)ident(entry) operator(=) ident(head)operator(;) local_variable(this)operator(.)ident(startGeneration) operator(=) ident(generation)operator(;) operator(}) directive(private) type(void) ident(advance)operator(()type(boolean) ident(consume)operator(\)) operator({) keyword(if) operator(()operator(!)ident(peeking)operator(\)) operator({) keyword(do) operator({) keyword(if) operator(()ident(startGeneration) operator(!=) ident(generation)operator(\)) operator({) ident(startGeneration) operator(=) ident(generation)operator(;) ident(entry) operator(=) ident(head)operator(;) operator(}) ident(entry) operator(=) ident(entry)operator(.)ident(nextAdded)operator(;) operator(}) keyword(while) operator(()ident(entry) operator(!=) ident(head) operator(&&) operator(!)ident(entry)operator(.)ident(isLive)operator(()operator(\))operator(\))operator(;) operator(}) ident(peeking) operator(=) operator(!)ident(consume)operator(;) operator(}) directive(public) pre_type(Object) ident(next)operator(()operator(\)) operator({) ident(advance)operator(()pre_constant(true)operator(\))operator(;) keyword(if) operator(()ident(entry) operator(==) ident(head)operator(\)) operator({) ident(peeking) operator(=) pre_constant(true)operator(;) comment(// remain where we are) keyword(throw) keyword(new) exception(NoSuchElementException)operator(()operator(\))operator(;) operator(}) keyword(return) ident(view)operator(.)ident(convertEntry)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(entry)operator(\))operator(;) operator(}) comment(// once hasNext has been called, we commit to next(\) returning) comment(// the entry it found, even if it were subsequently deleted) directive(public) type(boolean) ident(hasNext)operator(()operator(\)) operator({) ident(advance)operator(()pre_constant(false)operator(\))operator(;) keyword(return) ident(entry) operator(!=) ident(head)operator(;) operator(}) directive(public) type(void) ident(remove)operator(()operator(\)) operator({) keyword(if) operator(()ident(entry) operator(==) ident(head)operator(\)) operator({) keyword(throw) keyword(new) exception(IllegalStateException)operator(()stringoperator(\))operator(;) operator(}) ident(internalDeleteEntry)operator(()ident(entry)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) directive(abstract) type(class) class(EntryView) operator({) directive(public) directive(abstract) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(value)operator(\))operator(;) directive(public) directive(abstract) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\))operator(;) directive(public) directive(abstract) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(EntryView) ident(DIRECT_KEY_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(key)operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(IRubyObject)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) keyword(return) ident(hash)operator(.)ident(internalGet)operator(()operator(()ident(IRubyObject)operator(\))ident(o)operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(IRubyObject)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) keyword(return) ident(hash)operator(.)ident(internalDelete)operator(()operator(()ident(IRubyObject)operator(\))ident(o)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) operator(})operator(;) directive(private) directive(static) directive(final) ident(EntryView) ident(KEY_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(entry)operator(.)ident(key)operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(hash)operator(.)ident(containsKey)operator(()ident(o)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(hash)operator(.)ident(remove)operator(()ident(o)operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) operator(})operator(;) directive(private) directive(static) directive(final) ident(EntryView) ident(DIRECT_VALUE_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(value)operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(IRubyObject)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(IRubyObject) ident(obj) operator(=) operator(()ident(IRubyObject)operator(\))ident(o)operator(;) keyword(return) ident(hash)operator(.)ident(hasValue)operator(()ident(obj)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(obj)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(IRubyObject)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(IRubyObject) ident(obj) operator(=) operator(()ident(IRubyObject)operator(\)) ident(o)operator(;) ident(IRubyObject) ident(key) operator(=) ident(hash)operator(.)ident(internalIndex)operator(()ident(obj)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(obj)operator(\))operator(;) keyword(if) operator(()ident(key) operator(==) pre_constant(null)operator(\)) keyword(return) pre_constant(false)operator(;) keyword(return) ident(hash)operator(.)ident(internalDelete)operator(()ident(key)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(EntryView) ident(VALUE_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(entry)operator(.)ident(value)operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(hash)operator(.)ident(containsValue)operator(()ident(o)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) ident(IRubyObject) ident(value) operator(=) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(hash)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(o)operator(\))operator(;) ident(IRubyObject) ident(key) operator(=) ident(hash)operator(.)ident(internalIndex)operator(()ident(hash)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) keyword(if) operator(()ident(key) operator(==) pre_constant(null)operator(\)) keyword(return) pre_constant(false)operator(;) keyword(return) ident(hash)operator(.)ident(internalDelete)operator(()ident(key)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(EntryView) ident(DIRECT_ENTRY_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) ident(entry)operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(RubyHashEntry)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(RubyHashEntry) ident(entry) operator(=) operator(()ident(RubyHashEntry)operator(\))ident(o)operator(;) ident(RubyHashEntry) ident(candidate) operator(=) ident(internalGetEntry)operator(()ident(entry)operator(.)ident(key)operator(\))operator(;) keyword(return) ident(candidate) operator(!=) ident(NO_ENTRY) operator(&&) ident(entry)operator(.)ident(equals)operator(()ident(candidate)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(RubyHashEntry)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) keyword(return) ident(hash)operator(.)ident(internalDeleteEntry)operator(()operator(()ident(RubyHashEntry)operator(\))ident(o)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(EntryView) ident(ENTRY_VIEW) operator(=) keyword(new) ident(EntryView)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(convertEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) keyword(return) keyword(new) ident(ConvertingEntry)operator(()ident(runtime)operator(,) ident(entry)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(contains)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(ConvertingEntry)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(ConvertingEntry) ident(entry) operator(=) operator(()ident(ConvertingEntry)operator(\))ident(o)operator(;) ident(RubyHashEntry) ident(candidate) operator(=) ident(hash)operator(.)ident(internalGetEntry)operator(()ident(entry)operator(.)ident(entry)operator(.)ident(key)operator(\))operator(;) keyword(return) ident(candidate) operator(!=) ident(NO_ENTRY) operator(&&) ident(entry)operator(.)ident(entry)operator(.)ident(equals)operator(()ident(candidate)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(remove)operator(()ident(RubyHash) ident(hash)operator(,) pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(ConvertingEntry)operator(\))operator(\)) keyword(return) pre_constant(false)operator(;) ident(ConvertingEntry) ident(entry) operator(=) operator(()ident(ConvertingEntry)operator(\))ident(o)operator(;) keyword(return) ident(hash)operator(.)ident(internalDeleteEntry)operator(()ident(entry)operator(.)ident(entry)operator(\)) operator(!=) ident(NO_ENTRY)operator(;) operator(}) operator(})operator(;) directive(private) directive(static) type(class) class(ConvertingEntry) directive(implements) pre_type(Map)operator(.)ident(Entry) operator({) directive(private) directive(final) ident(RubyHashEntry) ident(entry)operator(;) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(public) ident(ConvertingEntry)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyHashEntry) ident(entry)operator(\)) operator({) local_variable(this)operator(.)ident(entry) operator(=) ident(entry)operator(;) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) operator(}) directive(public) pre_type(Object) ident(getKey)operator(()operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(entry)operator(.)ident(key)operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(entry)operator(.)ident(value)operator(,) pre_type(Object)operator(.)ident(class)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(setValue)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(setValue)operator(()ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(runtime)operator(,) ident(o)operator(\))operator(\))operator(;) operator(}) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(o)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(o) keyword(instanceof) ident(ConvertingEntry)operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) ident(ConvertingEntry) ident(other) operator(=) operator(()ident(ConvertingEntry)operator(\))ident(o)operator(;) keyword(return) ident(entry)operator(.)ident(equals)operator(()ident(other)operator(.)ident(entry)operator(\))operator(;) operator(}) directive(public) type(int) ident(hashCode)operator(()operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(hashCode)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Thomas E Enebo * Copyright (C\) 2007 Koichiro Ohba * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.nio.ByteBuffer)operator(;) keyword(import) include(java.nio.CharBuffer)operator(;) keyword(import) include(java.nio.charset.CharacterCodingException)operator(;) keyword(import) include(java.nio.charset.Charset)operator(;) keyword(import) include(java.nio.charset.CharsetDecoder)operator(;) keyword(import) include(java.nio.charset.CharsetEncoder)operator(;) keyword(import) include(java.nio.charset.CodingErrorAction)operator(;) keyword(import) include(java.nio.charset.IllegalCharsetNameException)operator(;) keyword(import) include(java.nio.charset.MalformedInputException)operator(;) keyword(import) include(java.nio.charset.UnmappableCharacterException)operator(;) keyword(import) include(java.nio.charset.UnsupportedCharsetException)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyIconv) directive(extends) ident(RubyObject) operator({) comment(//static private final String TRANSLIT = "//translit";) directive(static) directive(private) directive(final) pre_type(String) ident(IGNORE) operator(=) stringoperator(;) directive(private) pre_type(CharsetDecoder) ident(fromEncoding)operator(;) directive(private) pre_type(CharsetEncoder) ident(toEncoding)operator(;) directive(public) ident(RubyIconv)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(ObjectAllocator) ident(ICONV_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyIconv)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Failure) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(IllegalSequence) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(InvalidCharacter) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(InvalidEncoding) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(OutOfRange) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(BrokenLibrary) operator({)operator(}) directive(public) directive(static) type(void) ident(createIconv)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(iconvClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ICONV_ALLOCATOR)operator(\))operator(;) ident(iconvClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyIconv)operator(.)ident(class)operator(\))operator(;) ident(RubyModule) ident(failure) operator(=) ident(iconvClass)operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(argumentError) operator(=) ident(runtime)operator(.)ident(getArgumentError)operator(()operator(\))operator(;) pre_type(String)type([]) ident(iconvErrors) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(iconvErrors)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyClass) ident(subClass) operator(=) ident(iconvClass)operator(.)ident(defineClassUnder)operator(()ident(iconvErrors)operator([)ident(i)operator(])operator(,) ident(argumentError)operator(,) ident(RubyFailure)operator(.)ident(ICONV_FAILURE_ALLOCATOR)operator(\))operator(;) ident(subClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyFailure)operator(.)ident(class)operator(\))operator(;) ident(subClass)operator(.)ident(includeModule)operator(()ident(failure)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(RubyFailure) directive(extends) ident(RubyException) operator({) directive(private) ident(IRubyObject) ident(success)operator(;) directive(private) ident(IRubyObject) ident(failed)operator(;) directive(public) directive(static) ident(RubyFailure) ident(newInstance)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(excptnClass)operator(,) pre_type(String) ident(msg)operator(\)) operator({) keyword(return) keyword(new) ident(RubyFailure)operator(()ident(runtime)operator(,) ident(excptnClass)operator(,) ident(msg)operator(\))operator(;) operator(}) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(ICONV_FAILURE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyFailure)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(protected) ident(RubyFailure)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(RubyFailure)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(String) ident(message)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) ident(message)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) local_variable(super)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) ident(success) operator(=) ident(args)operator(.)ident(length) operator(>=) integer(2) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(failed) operator(=) ident(args)operator(.)ident(length) operator(==) integer(3) operator(?) ident(args)operator([)integer(2)operator(]) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(success)operator(()operator(\)) operator({) keyword(return) ident(success)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(failed)operator(()operator(\)) operator({) keyword(return) ident(failed)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(RubyModule) ident(rubyClass) operator(=) ident(getMetaClass)operator(()operator(\))operator(;) pre_type(StringBuilder) ident(buffer) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()ident(rubyClass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(success)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(failed)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buffer)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) pre_type(String) ident(getCharset)operator(()pre_type(String) ident(encoding)operator(\)) operator({) type(int) ident(index) operator(=) ident(encoding)operator(.)ident(indexOf)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(index) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(encoding)operator(;) keyword(return) ident(encoding)operator(.)ident(substring)operator(()integer(0)operator(,) ident(index)operator(\))operator(;) operator(}) comment(/* Currently dead code, but useful when we figure out how to actually perform translit. private static boolean isTranslit(String encoding\) { return encoding.toLowerCase(\).indexOf(TRANSLIT\) != -1 ? true : false; }*/) directive(private) directive(static) type(boolean) ident(isIgnore)operator(()pre_type(String) ident(encoding)operator(\)) operator({) keyword(return) ident(encoding)operator(.)ident(toLowerCase)operator(()operator(\))operator(.)ident(indexOf)operator(()ident(IGNORE)operator(\)) operator(!=) operator(-)integer(1) operator(?) pre_constant(true) operator(:) pre_constant(false)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(to)operator(,) ident(IRubyObject) ident(from)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyIconv) ident(iconv) operator(=) ident(newIconv)operator(()ident(context)operator(,) ident(recv)operator(,) ident(to)operator(,) ident(from)operator(\))operator(;) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(return) ident(iconv)operator(;) ident(IRubyObject) ident(result) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(try) operator({) ident(result) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(iconv)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(iconv)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(static) ident(RubyIconv) ident(newIconv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(to)operator(,) ident(IRubyObject) ident(from)operator(\)) operator({) ident(RubyClass) ident(klazz) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) keyword(return) operator(()ident(RubyIconv)operator(\)) ident(klazz)operator(.)ident(newInstance)operator(() ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(to)operator(,) ident(from)operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(arg1)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(arg1)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(arg2)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(arg2)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) pre_type(String) ident(to) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) pre_type(String) ident(from) operator(=) ident(arg2)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(try) operator({) ident(fromEncoding) operator(=) pre_type(Charset)operator(.)ident(forName)operator(()ident(getCharset)operator(()ident(from)operator(\))operator(\))operator(.)ident(newDecoder)operator(()operator(\))operator(;) ident(toEncoding) operator(=) pre_type(Charset)operator(.)ident(forName)operator(()ident(getCharset)operator(()ident(to)operator(\))operator(\))operator(.)ident(newEncoder)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isIgnore)operator(()ident(from)operator(\))operator(\)) ident(fromEncoding)operator(.)ident(onUnmappableCharacter)operator(()pre_type(CodingErrorAction)operator(.)ident(REPORT)operator(\))operator(;) keyword(if) operator(()operator(!)ident(isIgnore)operator(()ident(to)operator(\))operator(\)) ident(toEncoding)operator(.)ident(onUnmappableCharacter)operator(()pre_type(CodingErrorAction)operator(.)ident(REPORT)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IllegalCharsetNameException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newInvalidEncoding)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedCharsetException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newInvalidEncoding)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSystemCallError)operator(()ident(e)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) ident(toEncoding) operator(=) pre_constant(null)operator(;) ident(fromEncoding) operator(=) pre_constant(null)operator(;) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(iconv)operator(()ident(IRubyObject) ident(str)operator(\)) operator({) keyword(return) ident(iconv)operator(()ident(str)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(iconv)operator(()ident(IRubyObject) ident(str)operator(,) ident(IRubyObject) ident(startArg)operator(\)) operator({) type(int) ident(start) operator(=) integer(0)operator(;) keyword(if) operator(()operator(!)ident(startArg)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(start) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(startArg)operator(\))operator(;) keyword(return) ident(iconv)operator(()ident(str)operator(,) ident(start)operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(iconv)operator(()ident(IRubyObject) ident(str)operator(,) ident(IRubyObject) ident(startArg)operator(,) ident(IRubyObject) ident(endArg)operator(\)) operator({) type(int) ident(start) operator(=) integer(0)operator(;) type(int) ident(end) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()operator(!)ident(startArg)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(start) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(startArg)operator(\))operator(;) keyword(if) operator(()operator(!)ident(endArg)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(end) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(endArg)operator(\))operator(;) keyword(return) ident(iconv)operator(()ident(str)operator(,) ident(start)operator(,) ident(end)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(iconv)operator(()ident(IRubyObject) ident(str)operator(,) type(int) ident(start)operator(,) type(int) ident(end)operator(\)) operator({) keyword(if) operator(()ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(fromEncoding)operator(.)ident(reset)operator(()operator(\))operator(;) ident(toEncoding)operator(.)ident(reset)operator(()operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(_iconv)operator(()ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(,) ident(start)operator(,) ident(end)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one, two or three arguments. */) directive(public) ident(IRubyObject) ident(iconv)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(iconv)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(iconv)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) integer(3)operator(:) keyword(return) ident(iconv)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(// FIXME: We are assuming that original string will be raw bytes. If -Ku is provided) comment(// this will not be true, but that is ok for now. Deal with that when someone needs it.) directive(private) ident(IRubyObject) ident(_iconv)operator(()ident(RubyString) ident(str)operator(,) type(int) ident(start)operator(,) type(int) ident(end)operator(\)) operator({) keyword(if) operator(()ident(fromEncoding) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(ByteList) ident(bytes) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) comment(// treat start and end as start...end for end >= 0, start..end for end < 0) keyword(if) operator(()ident(start) operator(<) integer(0)operator(\)) operator({) ident(start) operator(+=) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(end) operator(<) integer(0)operator(\)) operator({) ident(end) operator(+=) integer(1) operator(+) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(end) operator(>) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(end) operator(=) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(start) operator(<) integer(0) operator(||) ident(end) operator(<) ident(start)operator(\)) operator({) comment(// invalid ranges result in an empty string) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) pre_type(ByteBuffer) ident(buf) operator(=) pre_type(ByteBuffer)operator(.)ident(wrap)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\)) operator(+) ident(start)operator(,) ident(end) operator(-) ident(start)operator(\))operator(;) keyword(try) operator({) pre_type(CharBuffer) ident(cbuf) operator(=) ident(fromEncoding)operator(.)ident(decode)operator(()ident(buf)operator(\))operator(;) ident(buf) operator(=) ident(toEncoding)operator(.)ident(encode)operator(()ident(cbuf)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(MalformedInputException) ident(e)operator(\)) operator({) operator(}) keyword(catch) operator(()exception(UnmappableCharacterException) ident(e)operator(\)) operator({) operator(}) keyword(catch) operator(()exception(CharacterCodingException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newInvalidEncoding)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(IllegalStateException) ident(e)operator(\)) operator({) operator(}) type(byte)type([]) ident(arr) operator(=) ident(buf)operator(.)ident(array)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()ident(arr)operator(,) integer(0)operator(,) ident(buf)operator(.)ident(limit)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(iconv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(convertWithArgs)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(3)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(conv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(convertWithArgs)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(,) stringoperator(\))operator(.)ident(join)operator(()ident(context)operator(,) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta)operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(charset_map_get)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCharsetMap)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String) ident(mapCharset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(val)operator(\)) operator({) ident(RubyHash) ident(charset) operator(=) ident(val)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCharsetMap)operator(()operator(\))operator(;) keyword(if) operator(()ident(charset)operator(.)ident(size)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) ident(RubyString) ident(key) operator(=) ident(val)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(IRubyObject) ident(tryVal) operator(=) ident(charset)operator(.)ident(fastARef)operator(()ident(key)operator(\))operator(;) keyword(if) operator(()ident(tryVal) operator(!=) pre_constant(null)operator(\)) ident(val) operator(=) ident(tryVal)operator(;) operator(}) keyword(return) ident(val)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(convertWithArgs)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) pre_type(String) ident(function)operator(\)) operator({) keyword(assert) ident(args)operator(.)ident(length) operator(>=) integer(2)operator(;) ident(RubyArray) ident(array) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(args)operator(.)ident(length) operator(-) integer(2)operator(\))operator(;) ident(RubyIconv) ident(iconv) operator(=) ident(newIconv)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(try) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(2)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(iconv)operator(.)ident(iconv)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(iconv)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) keyword(return) ident(array)operator(;) operator(}) comment(/* private static IRubyObject convert(String fromEncoding, String toEncoding, RubyString original\) throws UnsupportedEncodingException { // Get all bytes from PLAIN string pretend they are not encoded in any way. byte[] string = original.getBytes(\); // Now create a string pretending it is from fromEncoding string = new String(string, fromEncoding\).getBytes(toEncoding\); // Finally recode back to PLAIN return RubyString.newString(original.getRuntime(\), string\); } */) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Nick Sieger * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.BufferedInputStream)operator(;) keyword(import) include(java.io.ByteArrayInputStream)operator(;) keyword(import) include(java.io.File)operator(;) keyword(import) include(java.io.FileInputStream)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.PrintStream)operator(;) keyword(import) include(java.io.UnsupportedEncodingException)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.HashSet)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(java.util.StringTokenizer)operator(;) keyword(import) include(org.jruby.ast.executable.Script)operator(;) keyword(import) include(org.jruby.exceptions.MainExitException)operator(;) keyword(import) include(org.jruby.runtime.Constants)operator(;) keyword(import) include(org.jruby.runtime.load.LoadService)operator(;) keyword(import) include(org.jruby.util.ClassCache)operator(;) keyword(import) include(org.jruby.util.JRubyFile)operator(;) keyword(import) include(org.jruby.util.KCode)operator(;) keyword(import) include(org.jruby.util.NormalizedFile)operator(;) keyword(import) include(org.jruby.util.SafePropertyAccessor)operator(;) keyword(import) include(org.objectweb.asm.Opcodes)operator(;) directive(public) type(class) class(RubyInstanceConfig) operator({) comment(/** * The max count of active methods eligible for JIT-compilation. */) directive(private) directive(static) directive(final) type(int) ident(JIT_MAX_METHODS_LIMIT) operator(=) integer(4096)operator(;) comment(/** * The max size of JIT-compiled methods (full class size\) allowed. */) directive(private) directive(static) directive(final) type(int) ident(JIT_MAX_SIZE_LIMIT) operator(=) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(;) comment(/** * The JIT threshold to the specified method invocation count. */) directive(private) directive(static) directive(final) type(int) ident(JIT_THRESHOLD) operator(=) integer(50)operator(;) comment(/** The version to use for generated classes. Set to current JVM version by default */) directive(public) directive(static) directive(final) type(int) ident(JAVA_VERSION)operator(;) comment(/** * Default size for chained compilation. */) directive(private) directive(static) directive(final) type(int) ident(CHAINED_COMPILE_LINE_COUNT_DEFAULT) operator(=) integer(500)operator(;) comment(/** * The number of lines at which a method, class, or block body is split into * chained methods (to dodge 64k method-size limit in JVM\). */) directive(public) directive(static) directive(final) type(int) ident(CHAINED_COMPILE_LINE_COUNT) operator(=) ident(SafePropertyAccessor)operator(.)ident(getInt)operator(()stringoperator(,) ident(CHAINED_COMPILE_LINE_COUNT_DEFAULT)operator(\))operator(;) directive(public) type(enum) ident(CompileMode) operator({) ident(JIT)operator(,) ident(FORCE)operator(,) ident(OFF)operator(;) directive(public) type(boolean) ident(shouldPrecompileCLI)operator(()operator(\)) operator({) keyword(switch) operator(()local_variable(this)operator(\)) operator({) keyword(case) ident(JIT)operator(:) keyword(case) ident(FORCE)operator(:) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(shouldJIT)operator(()operator(\)) operator({) keyword(switch) operator(()local_variable(this)operator(\)) operator({) keyword(case) ident(JIT)operator(:) keyword(case) ident(FORCE)operator(:) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(shouldPrecompileAll)operator(()operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(FORCE)operator(;) operator(}) operator(}) directive(private) pre_type(InputStream) ident(input) operator(=) pre_type(System)operator(.)ident(in)operator(;) directive(private) pre_type(PrintStream) ident(output) operator(=) pre_type(System)operator(.)ident(out)operator(;) directive(private) pre_type(PrintStream) ident(error) operator(=) pre_type(System)operator(.)ident(err)operator(;) directive(private) ident(Profile) ident(profile) operator(=) ident(Profile)operator(.)ident(DEFAULT)operator(;) directive(private) type(boolean) ident(objectSpaceEnabled) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(false)operator(\))operator(;) directive(private) ident(CompileMode) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(JIT)operator(;) directive(private) type(boolean) ident(runRubyInProcess) operator(=) pre_constant(true)operator(;) directive(private) pre_type(String) ident(currentDirectory)operator(;) directive(private) pre_type(Map) ident(environment)operator(;) directive(private) pre_type(String)type([]) ident(argv) operator(=) operator({)operator(})operator(;) directive(private) directive(final) type(boolean) ident(jitLogging)operator(;) directive(private) directive(final) type(boolean) ident(jitLoggingVerbose)operator(;) directive(private) directive(final) type(int) ident(jitLogEvery)operator(;) directive(private) directive(final) type(int) ident(jitThreshold)operator(;) directive(private) directive(final) type(int) ident(jitMax)operator(;) directive(private) directive(final) type(int) ident(jitMaxSize)operator(;) directive(private) directive(final) type(boolean) ident(samplingEnabled)operator(;) directive(private) ident(CompatVersion) ident(compatVersion)operator(;) directive(private) pre_type(ClassLoader) ident(contextLoader) operator(=) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\))operator(.)ident(getContextClassLoader)operator(()operator(\))operator(;) directive(private) pre_type(ClassLoader) ident(loader) operator(=) ident(contextLoader) operator(==) pre_constant(null) operator(?) ident(RubyInstanceConfig)operator(.)ident(class)operator(.)ident(getClassLoader)operator(()operator(\)) operator(:) ident(contextLoader)operator(;) directive(private) ident(ClassCache)operator(<)ident(Script)operator(>) ident(classCache)operator(;) comment(// from CommandlineParser) directive(private) pre_type(List)operator(<)pre_type(String)operator(>) ident(loadPaths) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) directive(private) pre_type(Set)operator(<)pre_type(String)operator(>) ident(excludedMethods) operator(=) keyword(new) pre_type(HashSet)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) directive(private) pre_type(StringBuffer) ident(inlineScript) operator(=) keyword(new) pre_type(StringBuffer)operator(()operator(\))operator(;) directive(private) type(boolean) ident(hasInlineScript) operator(=) pre_constant(false)operator(;) directive(private) pre_type(String) ident(scriptFileName) operator(=) pre_constant(null)operator(;) directive(private) pre_type(List)operator(<)pre_type(String)operator(>) ident(requiredLibraries) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) directive(private) type(boolean) ident(benchmarking) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(argvGlobalsOn) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(assumeLoop) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(assumePrinting) operator(=) pre_constant(false)operator(;) directive(private) pre_type(Map) ident(optionGlobals) operator(=) keyword(new) pre_type(HashMap)operator(()operator(\))operator(;) directive(private) type(boolean) ident(processLineEnds) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(split) operator(=) pre_constant(false)operator(;) comment(// This property is a Boolean, to allow three values, so it can match MRI's nil, false and true) directive(private) pre_type(Boolean) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(FALSE)operator(;) directive(private) type(boolean) ident(debug) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(showVersion) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(showBytecode) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(showCopyright) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(endOfArguments) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(shouldRunInterpreter) operator(=) pre_constant(true)operator(;) directive(private) type(boolean) ident(shouldPrintUsage) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(shouldPrintProperties)operator(=)pre_constant(false)operator(;) directive(private) type(boolean) ident(yarv) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(rubinius) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(yarvCompile) operator(=) pre_constant(false)operator(;) directive(private) ident(KCode) ident(kcode) operator(=) ident(KCode)operator(.)ident(NONE)operator(;) directive(private) pre_type(String) ident(recordSeparator) operator(=) stringoperator(;) directive(private) type(boolean) ident(shouldCheckSyntax) operator(=) pre_constant(false)operator(;) directive(private) pre_type(String) ident(inputFieldSeparator) operator(=) pre_constant(null)operator(;) directive(private) type(boolean) ident(managementEnabled) operator(=) pre_constant(true)operator(;) directive(private) type(int) ident(safeLevel) operator(=) integer(0)operator(;) directive(private) pre_type(String) ident(jrubyHome)operator(;) directive(public) directive(static) directive(final) type(boolean) ident(FASTEST_COMPILE_ENABLED) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(BOXED_COMPILE_ENABLED) operator(=) ident(FASTEST_COMPILE_ENABLED) operator(||) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(FASTOPS_COMPILE_ENABLED) operator(=) ident(FASTEST_COMPILE_ENABLED) operator(||) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(FRAMELESS_COMPILE_ENABLED) operator(=) ident(FASTEST_COMPILE_ENABLED) operator(||) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(POSITIONLESS_COMPILE_ENABLED) operator(=) ident(FASTEST_COMPILE_ENABLED) operator(||) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(THREADLESS_COMPILE_ENABLED) operator(=) ident(FASTEST_COMPILE_ENABLED) operator(||) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(LAZYHANDLES_COMPILE) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(false)operator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(FORK_ENABLED) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(POOLING_ENABLED) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(POOL_MAX) operator(=) ident(SafePropertyAccessor)operator(.)ident(getInt)operator(()stringoperator(,) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(POOL_MIN) operator(=) ident(SafePropertyAccessor)operator(.)ident(getInt)operator(()stringoperator(,) integer(0)operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(POOL_TTL) operator(=) ident(SafePropertyAccessor)operator(.)ident(getInt)operator(()stringoperator(,) integer(60)operator(\))operator(;) directive(public) directive(static) directive(final) type(boolean) ident(NATIVE_NET_PROTOCOL) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(false)operator(\))operator(;) directive(public) directive(static) type(boolean) ident(FULL_TRACE_ENABLED) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(false)operator(\))operator(;) directive(public) directive(static) directive(final) pre_type(String) ident(COMPILE_EXCLUDE) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) directive(public) directive(static) type(boolean) ident(nativeEnabled) operator(=) pre_constant(true)operator(;) directive(public) directive(static) type(interface) class(LoadServiceCreator) operator({) ident(LoadService) ident(create)operator(()ident(Ruby) ident(runtime)operator(\))operator(;) ident(LoadServiceCreator) ident(DEFAULT) operator(=) keyword(new) ident(LoadServiceCreator)operator(()operator(\)) operator({) directive(public) ident(LoadService) ident(create)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(LoadService)operator(()ident(runtime)operator(\))operator(;) operator(}) operator(})operator(;) operator(}) directive(private) ident(LoadServiceCreator) ident(creator) operator(=) ident(LoadServiceCreator)operator(.)ident(DEFAULT)operator(;) directive(static) operator({) pre_type(String) ident(specVersion) operator(=) pre_constant(null)operator(;) keyword(try) operator({) ident(specVersion) operator(=) pre_type(System)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(specVersion) operator(==) pre_constant(null)operator(\)) operator({) ident(specVersion) operator(=) pre_type(System)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()pre_type(System)operator(.)ident(getProperty)operator(()stringoperator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(nativeEnabled) operator(=) pre_type(Boolean)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(SecurityException) ident(se)operator(\)) operator({) ident(nativeEnabled) operator(=) pre_constant(false)operator(;) ident(specVersion) operator(=) stringoperator(;) operator(}) keyword(if) operator(()ident(specVersion)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(JAVA_VERSION) operator(=) ident(Opcodes)operator(.)ident(V1_5)operator(;) operator(}) keyword(else) operator({) ident(JAVA_VERSION) operator(=) ident(Opcodes)operator(.)ident(V1_6)operator(;) operator(}) operator(}) directive(public) type(int) ident(characterIndex) operator(=) integer(0)operator(;) directive(public) ident(RubyInstanceConfig)operator(()operator(\)) operator({) keyword(if) operator(()ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\))operator(\)) ident(currentDirectory) operator(=) stringoperator(;) keyword(else) operator({) ident(currentDirectory) operator(=) ident(JRubyFile)operator(.)ident(getFileProperty)operator(()stringoperator(\))operator(;) operator(}) ident(samplingEnabled) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(false)operator(\))operator(;) pre_type(String) ident(compatString) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(compatString)operator(.)ident(equalsIgnoreCase)operator(()stringoperator(\))operator(\)) operator({) ident(compatVersion) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(compatString)operator(.)ident(equalsIgnoreCase)operator(()stringoperator(\))operator(\)) operator({) ident(compatVersion) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(;) operator(}) keyword(else) operator({) pre_type(System)operator(.)ident(err)operator(.)ident(println)operator(()string operator(+) ident(compatString) operator(+) stringoperator(\))operator(;) ident(compatVersion) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(;) operator(}) keyword(if) operator(()ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(OFF)operator(;) ident(jitLogging) operator(=) pre_constant(false)operator(;) ident(jitLoggingVerbose) operator(=) pre_constant(false)operator(;) ident(jitLogEvery) operator(=) integer(0)operator(;) ident(jitThreshold) operator(=) operator(-)integer(1)operator(;) ident(jitMax) operator(=) integer(0)operator(;) ident(jitMaxSize) operator(=) operator(-)integer(1)operator(;) ident(managementEnabled) operator(=) pre_constant(false)operator(;) operator(}) keyword(else) operator({) pre_type(String) ident(threshold) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) pre_type(String) ident(max) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) pre_type(String) ident(maxSize) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(COMPILE_EXCLUDE) operator(!=) pre_constant(null)operator(\)) operator({) pre_type(String)type([]) ident(elements) operator(=) ident(COMPILE_EXCLUDE)operator(.)ident(split)operator(()stringoperator(\))operator(;) keyword(for) operator(()pre_type(String) ident(element) operator(:) ident(elements)operator(\)) ident(excludedMethods)operator(.)ident(add)operator(()ident(element)operator(\))operator(;) operator(}) ident(managementEnabled) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(true)operator(\))operator(;) ident(runRubyInProcess) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(,) pre_constant(true)operator(\))operator(;) type(boolean) ident(jitProperty) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\)) operator(!=) pre_constant(null)operator(;) keyword(if) operator(()ident(jitProperty)operator(\)) operator({) ident(error)operator(.)ident(print)operator(()stringoperator(\))operator(;) ident(compileMode) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\)) operator(?) ident(CompileMode)operator(.)ident(JIT) operator(:) ident(CompileMode)operator(.)ident(OFF)operator(;) operator(}) keyword(else) operator({) pre_type(String) ident(jitModeProperty) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(jitModeProperty)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(OFF)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(jitModeProperty)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(JIT)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(jitModeProperty)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(FORCE)operator(;) operator(}) keyword(else) operator({) ident(error)operator(.)ident(print)operator(()stringoperator(\))operator(;) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(JIT)operator(;) operator(}) operator(}) ident(jitLogging) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) ident(jitLoggingVerbose) operator(=) ident(SafePropertyAccessor)operator(.)ident(getBoolean)operator(()stringoperator(\))operator(;) pre_type(String) ident(logEvery) operator(=) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) ident(jitLogEvery) operator(=) ident(logEvery) operator(==) pre_constant(null) operator(?) integer(0) operator(:) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(logEvery)operator(\))operator(;) ident(jitThreshold) operator(=) ident(threshold) operator(==) pre_constant(null) operator(?) ident(JIT_THRESHOLD) operator(:) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(threshold)operator(\))operator(;) ident(jitMax) operator(=) ident(max) operator(==) pre_constant(null) operator(?) ident(JIT_MAX_METHODS_LIMIT) operator(:) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(max)operator(\))operator(;) ident(jitMaxSize) operator(=) ident(maxSize) operator(==) pre_constant(null) operator(?) ident(JIT_MAX_SIZE_LIMIT) operator(:) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(maxSize)operator(\))operator(;) operator(}) comment(// default ClassCache using jitMax as a soft upper bound) ident(classCache) operator(=) keyword(new) ident(ClassCache)operator(<)ident(Script)operator(>)operator(()ident(loader)operator(,) ident(jitMax)operator(\))operator(;) keyword(if) operator(()ident(FORK_ENABLED)operator(\)) operator({) ident(error)operator(.)ident(print)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(public) ident(LoadServiceCreator) ident(getLoadServiceCreator)operator(()operator(\)) operator({) keyword(return) ident(creator)operator(;) operator(}) directive(public) type(void) ident(setLoadServiceCreator)operator(()ident(LoadServiceCreator) ident(creator)operator(\)) operator({) local_variable(this)operator(.)ident(creator) operator(=) ident(creator)operator(;) operator(}) directive(public) ident(LoadService) ident(createLoadService)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(creator)operator(.)ident(create)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(public) pre_type(String) ident(getBasicUsageHelp)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(sb) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(sb) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) comment(//.append(" -i[extension] edit ARGV files in place (make backup if extension supplied\)\\n"\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) comment(//.append(" -x[directory] strip off text before #!ruby line and perhaps cd to directory\\n"\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(return) ident(sb)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(String) ident(getExtendedHelp)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(sb) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(sb) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(return) ident(sb)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(String) ident(getPropertyHelp)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(sb) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) ident(sb) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string=)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()string operator(+) ident(CHAINED_COMPILE_LINE_COUNT_DEFAULT) operator(+) stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()string operator(+) ident(JIT_THRESHOLD) operator(+) stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string operator(+) ident(JIT_MAX_METHODS_LIMIT) operator(+) stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()string)char(\\n)delimiter(")>operator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\)) operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(return) ident(sb)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(String) ident(getVersionString)operator(()operator(\)) operator({) pre_type(String) ident(ver) operator(=) ident(Constants)operator(.)ident(RUBY_VERSION)operator(;) keyword(switch) operator(()ident(compatVersion)operator(\)) operator({) keyword(case) ident(RUBY1_8)operator(:) ident(ver) operator(=) ident(Constants)operator(.)ident(RUBY_VERSION)operator(;) keyword(break)operator(;) keyword(case) ident(RUBY1_9)operator(:) ident(ver) operator(=) ident(Constants)operator(.)ident(RUBY1_9_VERSION)operator(;) keyword(break)operator(;) operator(}) pre_type(String) ident(fullVersion) operator(=) pre_type(String)operator(.)ident(format)operator(() stringoperator(,) ident(Constants)operator(.)ident(VERSION)operator(,) ident(ver)operator(,) ident(Constants)operator(.)ident(RUBY_PATCHLEVEL)operator(,) ident(Constants)operator(.)ident(COMPILE_DATE)operator(,) ident(Constants)operator(.)ident(REVISION)operator(,) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(,) stringoperator(\)) operator(\))operator(;) keyword(return) ident(fullVersion)operator(;) operator(}) directive(public) pre_type(String) ident(getCopyrightString)operator(()operator(\)) operator({) keyword(return) stringoperator(;) operator(}) directive(public) type(void) ident(processArguments)operator(()pre_type(String)type([]) ident(arguments)operator(\)) operator({) keyword(new) ident(ArgumentProcessor)operator(()ident(arguments)operator(\))operator(.)ident(processArguments)operator(()operator(\))operator(;) operator(}) directive(public) ident(CompileMode) ident(getCompileMode)operator(()operator(\)) operator({) keyword(return) ident(compileMode)operator(;) operator(}) directive(public) type(void) ident(setCompileMode)operator(()ident(CompileMode) ident(compileMode)operator(\)) operator({) local_variable(this)operator(.)ident(compileMode) operator(=) ident(compileMode)operator(;) operator(}) directive(public) type(boolean) ident(isJitLogging)operator(()operator(\)) operator({) keyword(return) ident(jitLogging)operator(;) operator(}) directive(public) type(boolean) ident(isJitLoggingVerbose)operator(()operator(\)) operator({) keyword(return) ident(jitLoggingVerbose)operator(;) operator(}) directive(public) type(int) ident(getJitLogEvery)operator(()operator(\)) operator({) keyword(return) ident(jitLogEvery)operator(;) operator(}) directive(public) type(boolean) ident(isSamplingEnabled)operator(()operator(\)) operator({) keyword(return) ident(samplingEnabled)operator(;) operator(}) directive(public) type(int) ident(getJitThreshold)operator(()operator(\)) operator({) keyword(return) ident(jitThreshold)operator(;) operator(}) directive(public) type(int) ident(getJitMax)operator(()operator(\)) operator({) keyword(return) ident(jitMax)operator(;) operator(}) directive(public) type(int) ident(getJitMaxSize)operator(()operator(\)) operator({) keyword(return) ident(jitMaxSize)operator(;) operator(}) directive(public) type(boolean) ident(isRunRubyInProcess)operator(()operator(\)) operator({) keyword(return) ident(runRubyInProcess)operator(;) operator(}) directive(public) type(void) ident(setRunRubyInProcess)operator(()type(boolean) ident(flag)operator(\)) operator({) local_variable(this)operator(.)ident(runRubyInProcess) operator(=) ident(flag)operator(;) operator(}) directive(public) type(void) ident(setInput)operator(()pre_type(InputStream) ident(newInput)operator(\)) operator({) ident(input) operator(=) ident(newInput)operator(;) operator(}) directive(public) pre_type(InputStream) ident(getInput)operator(()operator(\)) operator({) keyword(return) ident(input)operator(;) operator(}) directive(public) ident(CompatVersion) ident(getCompatVersion)operator(()operator(\)) operator({) keyword(return) ident(compatVersion)operator(;) operator(}) directive(public) type(void) ident(setOutput)operator(()pre_type(PrintStream) ident(newOutput)operator(\)) operator({) ident(output) operator(=) ident(newOutput)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getOutput)operator(()operator(\)) operator({) keyword(return) ident(output)operator(;) operator(}) directive(public) type(void) ident(setError)operator(()pre_type(PrintStream) ident(newError)operator(\)) operator({) ident(error) operator(=) ident(newError)operator(;) operator(}) directive(public) pre_type(PrintStream) ident(getError)operator(()operator(\)) operator({) keyword(return) ident(error)operator(;) operator(}) directive(public) type(void) ident(setCurrentDirectory)operator(()pre_type(String) ident(newCurrentDirectory)operator(\)) operator({) ident(currentDirectory) operator(=) ident(newCurrentDirectory)operator(;) operator(}) directive(public) pre_type(String) ident(getCurrentDirectory)operator(()operator(\)) operator({) keyword(return) ident(currentDirectory)operator(;) operator(}) directive(public) type(void) ident(setProfile)operator(()ident(Profile) ident(newProfile)operator(\)) operator({) ident(profile) operator(=) ident(newProfile)operator(;) operator(}) directive(public) ident(Profile) ident(getProfile)operator(()operator(\)) operator({) keyword(return) ident(profile)operator(;) operator(}) directive(public) type(void) ident(setObjectSpaceEnabled)operator(()type(boolean) ident(newObjectSpaceEnabled)operator(\)) operator({) ident(objectSpaceEnabled) operator(=) ident(newObjectSpaceEnabled)operator(;) operator(}) directive(public) type(boolean) ident(isObjectSpaceEnabled)operator(()operator(\)) operator({) keyword(return) ident(objectSpaceEnabled)operator(;) operator(}) directive(public) type(void) ident(setEnvironment)operator(()pre_type(Map) ident(newEnvironment)operator(\)) operator({) ident(environment) operator(=) ident(newEnvironment)operator(;) operator(}) directive(public) pre_type(Map) ident(getEnvironment)operator(()operator(\)) operator({) keyword(return) ident(environment)operator(;) operator(}) directive(public) pre_type(ClassLoader) ident(getLoader)operator(()operator(\)) operator({) keyword(return) ident(loader)operator(;) operator(}) directive(public) type(void) ident(setLoader)operator(()pre_type(ClassLoader) ident(loader)operator(\)) operator({) comment(// Setting the loader needs to reset the class cache) keyword(if)operator(()local_variable(this)operator(.)ident(loader) operator(!=) ident(loader)operator(\)) operator({) local_variable(this)operator(.)ident(classCache) operator(=) keyword(new) ident(ClassCache)operator(<)ident(Script)operator(>)operator(()ident(loader)operator(,) local_variable(this)operator(.)ident(classCache)operator(.)ident(getMax)operator(()operator(\))operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(loader) operator(=) ident(loader)operator(;) operator(}) directive(public) pre_type(String)type([]) ident(getArgv)operator(()operator(\)) operator({) keyword(return) ident(argv)operator(;) operator(}) directive(public) type(void) ident(setArgv)operator(()pre_type(String)type([]) ident(argv)operator(\)) operator({) local_variable(this)operator(.)ident(argv) operator(=) ident(argv)operator(;) operator(}) directive(public) pre_type(String) ident(getJRubyHome)operator(()operator(\)) operator({) keyword(if) operator(()ident(jrubyHome) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(Ruby)operator(.)ident(isSecurityRestricted)operator(()operator(\))operator(\)) operator({) keyword(return) stringoperator(;) operator(}) ident(jrubyHome) operator(=) ident(verifyHome)operator(()ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(,) ident(SafePropertyAccessor)operator(.)ident(getProperty)operator(()stringoperator(\)) operator(+) stringoperator(\))operator(\))operator(;) keyword(try) operator({) comment(// This comment also in rbConfigLibrary) comment(// Our shell scripts pass in non-canonicalized paths, but even if we didn't) comment(// anyone who did would become unhappy because Ruby apps expect no relative) comment(// operators in the pathname (rubygems, for example\).) ident(jrubyHome) operator(=) keyword(new) ident(NormalizedFile)operator(()ident(jrubyHome)operator(\))operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) operator(}) ident(jrubyHome) operator(=) keyword(new) ident(NormalizedFile)operator(()ident(jrubyHome)operator(\))operator(.)ident(getAbsolutePath)operator(()operator(\))operator(;) operator(}) keyword(return) ident(jrubyHome)operator(;) operator(}) directive(public) type(void) ident(setJRubyHome)operator(()pre_type(String) ident(home)operator(\)) operator({) ident(jrubyHome) operator(=) ident(verifyHome)operator(()ident(home)operator(\))operator(;) operator(}) comment(// We require the home directory to be absolute) directive(private) pre_type(String) ident(verifyHome)operator(()pre_type(String) ident(home)operator(\)) operator({) keyword(if) operator(()ident(home)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(home) operator(=) pre_type(System)operator(.)ident(getProperty)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(home)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) ident(NormalizedFile) ident(f) operator(=) keyword(new) ident(NormalizedFile)operator(()ident(home)operator(\))operator(;) keyword(if) operator(()operator(!)ident(f)operator(.)ident(isAbsolute)operator(()operator(\))operator(\)) operator({) ident(home) operator(=) ident(f)operator(.)ident(getAbsolutePath)operator(()operator(\))operator(;) operator(}) ident(f)operator(.)ident(mkdirs)operator(()operator(\))operator(;) operator(}) keyword(return) ident(home)operator(;) operator(}) directive(private) type(class) class(ArgumentProcessor) operator({) directive(private) pre_type(String)type([]) ident(arguments)operator(;) directive(private) type(int) ident(argumentIndex) operator(=) integer(0)operator(;) directive(public) ident(ArgumentProcessor)operator(()pre_type(String)type([]) ident(arguments)operator(\)) operator({) local_variable(this)operator(.)ident(arguments) operator(=) ident(arguments)operator(;) operator(}) directive(public) type(void) ident(processArguments)operator(()operator(\)) operator({) keyword(while) operator(()ident(argumentIndex) operator(<) ident(arguments)operator(.)ident(length) operator(&&) ident(isInterpreterArgument)operator(()ident(arguments)operator([)ident(argumentIndex)operator(])operator(\))operator(\)) operator({) ident(processArgument)operator(()operator(\))operator(;) ident(argumentIndex)operator(++)operator(;) operator(}) keyword(if) operator(()operator(!)ident(hasInlineScript) operator(&&) ident(scriptFileName) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(argumentIndex) operator(<) ident(arguments)operator(.)ident(length)operator(\)) operator({) ident(setScriptFileName)operator(()ident(arguments)operator([)ident(argumentIndex)operator(])operator(\))operator(;) comment(//consume the file name) ident(argumentIndex)operator(++)operator(;) operator(}) operator(}) ident(processArgv)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(processArgv)operator(()operator(\)) operator({) pre_type(List)operator(<)pre_type(String)operator(>) ident(arglist) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()operator(;) ident(argumentIndex) operator(<) ident(arguments)operator(.)ident(length)operator(;) ident(argumentIndex)operator(++)operator(\)) operator({) pre_type(String) ident(arg) operator(=) ident(arguments)operator([)ident(argumentIndex)operator(])operator(;) keyword(if) operator(()ident(argvGlobalsOn) operator(&&) ident(arg)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) ident(arg) operator(=) ident(arg)operator(.)ident(substring)operator(()integer(1)operator(\))operator(;) keyword(if) operator(()ident(arg)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(>) integer(0)operator(\)) operator({) pre_type(String)type([]) ident(keyvalue) operator(=) ident(arg)operator(.)ident(split)operator(()stringoperator(,) integer(2)operator(\))operator(;) ident(optionGlobals)operator(.)ident(put)operator(()ident(keyvalue)operator([)integer(0)operator(])operator(,) ident(keyvalue)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(optionGlobals)operator(.)ident(put)operator(()ident(arg)operator(,) pre_constant(null)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(argvGlobalsOn) operator(=) pre_constant(false)operator(;) ident(arglist)operator(.)ident(add)operator(()ident(arg)operator(\))operator(;) operator(}) operator(}) comment(// Remaining arguments are for the script itself) ident(argv) operator(=) ident(arglist)operator(.)ident(toArray)operator(()keyword(new) pre_type(String)operator([)ident(arglist)operator(.)ident(size)operator(()operator(\))operator(])operator(\))operator(;) operator(}) directive(private) type(boolean) ident(isInterpreterArgument)operator(()pre_type(String) ident(argument)operator(\)) operator({) keyword(return) operator(()ident(argument)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) string operator(||) ident(argument)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) operator(&&) operator(!)ident(endOfArguments)operator(;) operator(}) directive(private) pre_type(String) ident(getArgumentError)operator(()pre_type(String) ident(additionalError)operator(\)) operator({) keyword(return) string operator(+) ident(additionalError) operator(+) stringoperator(;) operator(}) directive(private) type(void) ident(processArgument)operator(()operator(\)) operator({) pre_type(String) ident(argument) operator(=) ident(arguments)operator([)ident(argumentIndex)operator(])operator(;) ident(FOR) operator(:) keyword(for) operator(()ident(characterIndex) operator(=) integer(1)operator(;) ident(characterIndex) operator(<) ident(argument)operator(.)ident(length)operator(()operator(\))operator(;) ident(characterIndex)operator(++)operator(\)) operator({) keyword(switch) operator(()ident(argument)operator(.)ident(charAt)operator(()ident(characterIndex)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) operator({) pre_type(String) ident(temp) operator(=) ident(grabOptionalValue)operator(()operator(\))operator(;) keyword(if) operator(()pre_constant(null) operator(==) ident(temp)operator(\)) operator({) ident(recordSeparator) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(temp)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(recordSeparator) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(temp)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(recordSeparator) operator(=) stringoperator(;) comment(// Specify something that can't separate) operator(}) keyword(else) operator({) keyword(try) operator({) type(int) ident(val) operator(=) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(temp)operator(,) integer(8)operator(\))operator(;) ident(recordSeparator) operator(=) string operator(+) operator(()type(char)operator(\)) ident(val)operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) operator(}) keyword(break) ident(FOR)operator(;) operator(}) keyword(case) stringoperator(:) ident(split) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(benchmarking) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(shouldCheckSyntax) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(try) operator({) pre_type(String) ident(saved) operator(=) ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) pre_type(File) ident(base) operator(=) keyword(new) pre_type(File)operator(()ident(currentDirectory)operator(\))operator(;) pre_type(File) ident(newDir) operator(=) keyword(new) pre_type(File)operator(()ident(saved)operator(\))operator(;) keyword(if) operator(()ident(newDir)operator(.)ident(isAbsolute)operator(()operator(\))operator(\)) operator({) ident(currentDirectory) operator(=) ident(newDir)operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(currentDirectory) operator(=) keyword(new) pre_type(File)operator(()ident(base)operator(,) ident(newDir)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)operator(()keyword(new) pre_type(File)operator(()ident(currentDirectory)operator(\))operator(.)ident(isDirectory)operator(()operator(\))operator(\))operator(\)) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) string operator(+) ident(saved) operator(+) stringoperator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) keyword(break)operator(;) keyword(case) stringoperator(:) ident(debug) operator(=) pre_constant(true)operator(;) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(TRUE)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(inlineScript)operator(.)ident(append)operator(()ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(\))operator(;) ident(inlineScript)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(hasInlineScript) operator(=) pre_constant(true)operator(;) keyword(break) ident(FOR)operator(;) keyword(case) stringoperator(:) ident(inputFieldSeparator) operator(=) ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(shouldPrintUsage) operator(=) pre_constant(true)operator(;) ident(shouldRunInterpreter) operator(=) pre_constant(false)operator(;) keyword(break)operator(;) comment(// FIXME: -i flag not supported) comment(// case 'i' :) comment(// break;) keyword(case) stringoperator(:) pre_type(String) ident(s) operator(=) ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) pre_type(String)type([]) ident(ls) operator(=) ident(s)operator(.)ident(split)operator(()ident(java)operator(.)ident(io)operator(.)ident(File)operator(.)ident(pathSeparator)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(ls)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(loadPaths)operator(.)ident(add)operator(()ident(ls)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(break) ident(FOR)operator(;) keyword(case) stringoperator(:) comment(// FIXME: No argument seems to work for -K in MRI plus this should not) comment(// siphon off additional args 'jruby -K ~/scripts/foo'. Also better error) comment(// processing.) pre_type(String) ident(eArg) operator(=) ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) ident(kcode) operator(=) ident(KCode)operator(.)ident(create)operator(()pre_constant(null)operator(,) ident(eArg)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(processLineEnds) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(assumeLoop) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(assumePrinting) operator(=) pre_constant(true)operator(;) ident(assumeLoop) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(requiredLibraries)operator(.)ident(add)operator(()ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(break) ident(FOR)operator(;) keyword(case) string operator(:) ident(argvGlobalsOn) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(runBinScript)operator(()operator(\))operator(;) keyword(break) ident(FOR)operator(;) keyword(case) string operator(:)operator({) pre_type(String) ident(temp) operator(=) ident(grabOptionalValue)operator(()operator(\))operator(;) type(int) ident(value) operator(=) integer(1)operator(;) keyword(if)operator(()ident(temp)operator(!=)pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(value) operator(=) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(temp)operator(,) integer(8)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) ident(value) operator(=) integer(1)operator(;) operator(}) operator(}) ident(safeLevel) operator(=) ident(value)operator(;) keyword(break) ident(FOR)operator(;) operator(}) keyword(case) stringoperator(:) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(TRUE)operator(;) ident(setShowVersion)operator(()pre_constant(true)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(TRUE)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) operator({) pre_type(String) ident(temp) operator(=) ident(grabOptionalValue)operator(()operator(\))operator(;) type(int) ident(value) operator(=) integer(2)operator(;) keyword(if) operator(()pre_constant(null) operator(!=) ident(temp)operator(\)) operator({) keyword(if) operator(()ident(temp)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(value) operator(=) integer(2)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(temp)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(value) operator(=) integer(1)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(temp)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(value) operator(=) integer(0)operator(;) operator(}) keyword(else) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) operator(}) keyword(switch) operator(()ident(value)operator(\)) operator({) keyword(case) integer(0)operator(:) ident(verbose) operator(=) pre_constant(null)operator(;) keyword(break)operator(;) keyword(case) integer(1)operator(:) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(FALSE)operator(;) keyword(break)operator(;) keyword(case) integer(2)operator(:) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(TRUE)operator(;) keyword(break)operator(;) operator(}) keyword(break) ident(FOR)operator(;) operator(}) comment(// FIXME: -x flag not supported) comment(// case 'x' :) comment(// break;) keyword(case) stringoperator(:) pre_type(String) ident(extendedOption) operator(=) ident(grabOptionalValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(extendedOption) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) keyword(new) ident(MainExitException)operator(()integer(0)operator(,) string operator(+) ident(getExtendedHelp)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(objectSpaceEnabled) operator(=) pre_constant(false)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(objectSpaceEnabled) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(OFF)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(FORCE)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(yarv) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(yarvCompile) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(extendedOption)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(rubinius) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) string operator(+) ident(extendedOption) operator(+) stringoperator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) keyword(break) ident(FOR)operator(;) keyword(case) stringoperator(:) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(characterIndex) operator(=) ident(argument)operator(.)ident(length)operator(()operator(\))operator(;) ident(runBinScript)operator(()operator(\))operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(characterIndex) operator(=) ident(argument)operator(.)ident(length)operator(()operator(\))operator(;) ident(compatVersion) operator(=) ident(CompatVersion)operator(.)ident(getVersionFromString)operator(()ident(grabValue)operator(()ident(getArgumentError)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(if) operator(()ident(compatVersion) operator(==) pre_constant(null)operator(\)) operator({) ident(compatVersion) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(;) operator(}) keyword(break) ident(FOR)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(setShowCopyright)operator(()pre_constant(true)operator(\))operator(;) ident(shouldRunInterpreter) operator(=) pre_constant(false)operator(;) keyword(break) ident(FOR)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(compileMode) operator(=) ident(CompileMode)operator(.)ident(OFF)operator(;) ident(FULL_TRACE_ENABLED) operator(=) pre_constant(true)operator(;) pre_type(System)operator(.)ident(setProperty)operator(()stringoperator(,) stringoperator(\))operator(;) keyword(break) ident(FOR)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(debug) operator(=) pre_constant(true)operator(;) ident(verbose) operator(=) pre_type(Boolean)operator(.)ident(TRUE)operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(shouldPrintUsage) operator(=) pre_constant(true)operator(;) ident(shouldRunInterpreter) operator(=) pre_constant(false)operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(shouldPrintProperties) operator(=) pre_constant(true)operator(;) ident(shouldRunInterpreter) operator(=) pre_constant(false)operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(setShowVersion)operator(()pre_constant(true)operator(\))operator(;) keyword(break) ident(FOR)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(setShowBytecode)operator(()pre_constant(true)operator(\))operator(;) keyword(break) ident(FOR)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(argument)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) comment(// ruby interpreter compatibilty) comment(// Usage: ruby [switches] [--] [programfile] [arguments]\)) ident(endOfArguments) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) operator(}) operator(}) keyword(default)operator(:) keyword(throw) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) string operator(+) ident(argument)operator(\))operator(;) operator(}) operator(}) operator(}) directive(private) type(void) ident(runBinScript)operator(()operator(\)) operator({) pre_type(String) ident(scriptName) operator(=) ident(grabValue)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(scriptName)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(scriptName) operator(=) stringoperator(;) operator(}) ident(scriptFileName) operator(=) ident(scriptName)operator(;) keyword(if) operator(()operator(!)keyword(new) pre_type(File)operator(()ident(scriptFileName)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) pre_type(String) ident(jrubyHome) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()pre_type(System)operator(.)ident(getProperty)operator(()stringoperator(\))operator(,) ident(JRubyFile)operator(.)ident(getFileProperty)operator(()stringoperator(\))operator(\))operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) ident(scriptFileName) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(jrubyHome) operator(+) ident(JRubyFile)operator(.)ident(separator) operator(+) stringoperator(,) ident(scriptName)operator(\))operator(.)ident(getCanonicalPath)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(io)operator(\)) operator({) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) stringoperator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) operator(}) comment(// route 'gem' through ruby code in case we're running out of the complete jar) keyword(if) operator(()ident(scriptName)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) operator(!)keyword(new) pre_type(File)operator(()ident(scriptFileName)operator(\))operator(.)ident(exists)operator(()operator(\))operator(\)) operator({) ident(requiredLibraries)operator(.)ident(add)operator(()stringoperator(\))operator(;) ident(inlineScript)operator(.)ident(append)operator(()string operator(+) ident(scriptName)operator(\))operator(;) ident(inlineScript)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(hasInlineScript) operator(=) pre_constant(true)operator(;) operator(}) ident(endOfArguments) operator(=) pre_constant(true)operator(;) operator(}) directive(private) pre_type(String) ident(grabValue)operator(()pre_type(String) ident(errorMessage)operator(\)) operator({) ident(characterIndex)operator(++)operator(;) keyword(if) operator(()ident(characterIndex) operator(<) ident(arguments)operator([)ident(argumentIndex)operator(])operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(return) ident(arguments)operator([)ident(argumentIndex)operator(])operator(.)ident(substring)operator(()ident(characterIndex)operator(\))operator(;) operator(}) ident(argumentIndex)operator(++)operator(;) keyword(if) operator(()ident(argumentIndex) operator(<) ident(arguments)operator(.)ident(length)operator(\)) operator({) keyword(return) ident(arguments)operator([)ident(argumentIndex)operator(])operator(;) operator(}) ident(MainExitException) ident(mee) operator(=) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) ident(errorMessage)operator(\))operator(;) ident(mee)operator(.)ident(setUsageError)operator(()pre_constant(true)operator(\))operator(;) keyword(throw) ident(mee)operator(;) operator(}) directive(private) pre_type(String) ident(grabOptionalValue)operator(()operator(\)) operator({) ident(characterIndex)operator(++)operator(;) keyword(if) operator(()ident(characterIndex) operator(<) ident(arguments)operator([)ident(argumentIndex)operator(])operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(return) ident(arguments)operator([)ident(argumentIndex)operator(])operator(.)ident(substring)operator(()ident(characterIndex)operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) directive(public) type(byte)type([]) ident(inlineScript)operator(()operator(\)) operator({) keyword(return) ident(inlineScript)operator(.)ident(toString)operator(()operator(\))operator(.)ident(getBytes)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(requiredLibraries)operator(()operator(\)) operator({) keyword(return) ident(requiredLibraries)operator(;) operator(}) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(loadPaths)operator(()operator(\)) operator({) keyword(return) ident(loadPaths)operator(;) operator(}) directive(public) type(boolean) ident(shouldRunInterpreter)operator(()operator(\)) operator({) keyword(if)operator(()ident(isShowVersion)operator(()operator(\)) operator(&&) operator(()ident(hasInlineScript) operator(||) ident(scriptFileName) operator(!=) pre_constant(null)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) ident(isShouldRunInterpreter)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(shouldPrintUsage)operator(()operator(\)) operator({) keyword(return) ident(shouldPrintUsage)operator(;) operator(}) directive(public) type(boolean) ident(shouldPrintProperties)operator(()operator(\)) operator({) keyword(return) ident(shouldPrintProperties)operator(;) operator(}) directive(private) type(boolean) ident(isSourceFromStdin)operator(()operator(\)) operator({) keyword(return) ident(getScriptFileName)operator(()operator(\)) operator(==) pre_constant(null)operator(;) operator(}) directive(public) type(boolean) ident(isInlineScript)operator(()operator(\)) operator({) keyword(return) ident(hasInlineScript)operator(;) operator(}) directive(public) pre_type(InputStream) ident(getScriptSource)operator(()operator(\)) operator({) keyword(try) operator({) comment(// KCode.NONE is used because KCODE does not affect parse in Ruby 1.8) comment(// if Ruby 2.0 encoding pragmas are implemented, this will need to change) keyword(if) operator(()ident(hasInlineScript)operator(\)) operator({) keyword(return) keyword(new) pre_type(ByteArrayInputStream)operator(()ident(inlineScript)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isSourceFromStdin)operator(()operator(\))operator(\)) operator({) comment(// can't use -v and stdin) keyword(if) operator(()ident(isShowVersion)operator(()operator(\))operator(\)) operator({) keyword(return) pre_constant(null)operator(;) operator(}) keyword(return) ident(getInput)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(File) ident(file) operator(=) ident(JRubyFile)operator(.)ident(create)operator(()ident(getCurrentDirectory)operator(()operator(\))operator(,) ident(getScriptFileName)operator(()operator(\))operator(\))operator(;) keyword(return) keyword(new) pre_type(BufferedInputStream)operator(()keyword(new) pre_type(FileInputStream)operator(()ident(file)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) keyword(new) ident(MainExitException)operator(()integer(1)operator(,) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) pre_type(String) ident(displayedFileName)operator(()operator(\)) operator({) keyword(if) operator(()ident(hasInlineScript)operator(\)) operator({) keyword(if) operator(()ident(scriptFileName) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(scriptFileName)operator(;) operator(}) keyword(else) operator({) keyword(return) stringoperator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(isSourceFromStdin)operator(()operator(\))operator(\)) operator({) keyword(return) stringoperator(;) operator(}) keyword(else) operator({) keyword(return) ident(getScriptFileName)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(setScriptFileName)operator(()pre_type(String) ident(scriptFileName)operator(\)) operator({) local_variable(this)operator(.)ident(scriptFileName) operator(=) ident(scriptFileName)operator(;) operator(}) directive(public) pre_type(String) ident(getScriptFileName)operator(()operator(\)) operator({) keyword(return) ident(scriptFileName)operator(;) operator(}) directive(public) type(boolean) ident(isBenchmarking)operator(()operator(\)) operator({) keyword(return) ident(benchmarking)operator(;) operator(}) directive(public) type(boolean) ident(isAssumeLoop)operator(()operator(\)) operator({) keyword(return) ident(assumeLoop)operator(;) operator(}) directive(public) type(boolean) ident(isAssumePrinting)operator(()operator(\)) operator({) keyword(return) ident(assumePrinting)operator(;) operator(}) directive(public) type(boolean) ident(isProcessLineEnds)operator(()operator(\)) operator({) keyword(return) ident(processLineEnds)operator(;) operator(}) directive(public) type(boolean) ident(isSplit)operator(()operator(\)) operator({) keyword(return) ident(split)operator(;) operator(}) directive(public) type(boolean) ident(isVerbose)operator(()operator(\)) operator({) keyword(return) ident(verbose) operator(==) pre_type(Boolean)operator(.)ident(TRUE)operator(;) operator(}) directive(public) pre_type(Boolean) ident(getVerbose)operator(()operator(\)) operator({) keyword(return) ident(verbose)operator(;) operator(}) directive(public) type(boolean) ident(isDebug)operator(()operator(\)) operator({) keyword(return) ident(debug)operator(;) operator(}) directive(public) type(boolean) ident(isShowVersion)operator(()operator(\)) operator({) keyword(return) ident(showVersion)operator(;) operator(}) directive(public) type(boolean) ident(isShowBytecode)operator(()operator(\)) operator({) keyword(return) ident(showBytecode)operator(;) operator(}) directive(public) type(boolean) ident(isShowCopyright)operator(()operator(\)) operator({) keyword(return) ident(showCopyright)operator(;) operator(}) directive(protected) type(void) ident(setShowVersion)operator(()type(boolean) ident(showVersion)operator(\)) operator({) local_variable(this)operator(.)ident(showVersion) operator(=) ident(showVersion)operator(;) operator(}) directive(protected) type(void) ident(setShowBytecode)operator(()type(boolean) ident(showBytecode)operator(\)) operator({) local_variable(this)operator(.)ident(showBytecode) operator(=) ident(showBytecode)operator(;) operator(}) directive(protected) type(void) ident(setShowCopyright)operator(()type(boolean) ident(showCopyright)operator(\)) operator({) local_variable(this)operator(.)ident(showCopyright) operator(=) ident(showCopyright)operator(;) operator(}) directive(public) type(boolean) ident(isShouldRunInterpreter)operator(()operator(\)) operator({) keyword(return) ident(shouldRunInterpreter)operator(;) operator(}) directive(public) type(boolean) ident(isShouldCheckSyntax)operator(()operator(\)) operator({) keyword(return) ident(shouldCheckSyntax)operator(;) operator(}) directive(public) type(boolean) ident(isYARVEnabled)operator(()operator(\)) operator({) keyword(return) ident(yarv)operator(;) operator(}) directive(public) pre_type(String) ident(getInputFieldSeparator)operator(()operator(\)) operator({) keyword(return) ident(inputFieldSeparator)operator(;) operator(}) directive(public) type(boolean) ident(isRubiniusEnabled)operator(()operator(\)) operator({) keyword(return) ident(rubinius)operator(;) operator(}) directive(public) type(boolean) ident(isYARVCompileEnabled)operator(()operator(\)) operator({) keyword(return) ident(yarvCompile)operator(;) operator(}) directive(public) ident(KCode) ident(getKCode)operator(()operator(\)) operator({) keyword(return) ident(kcode)operator(;) operator(}) directive(public) pre_type(String) ident(getRecordSeparator)operator(()operator(\)) operator({) keyword(return) ident(recordSeparator)operator(;) operator(}) directive(public) type(int) ident(getSafeLevel)operator(()operator(\)) operator({) keyword(return) ident(safeLevel)operator(;) operator(}) directive(public) type(void) ident(setRecordSeparator)operator(()pre_type(String) ident(recordSeparator)operator(\)) operator({) local_variable(this)operator(.)ident(recordSeparator) operator(=) ident(recordSeparator)operator(;) operator(}) directive(public) ident(ClassCache) ident(getClassCache)operator(()operator(\)) operator({) keyword(return) ident(classCache)operator(;) operator(}) directive(public) type(void) ident(setClassCache)operator(()ident(ClassCache) ident(classCache)operator(\)) operator({) local_variable(this)operator(.)ident(classCache) operator(=) ident(classCache)operator(;) operator(}) directive(public) pre_type(Map) ident(getOptionGlobals)operator(()operator(\)) operator({) keyword(return) ident(optionGlobals)operator(;) operator(}) directive(public) type(boolean) ident(isManagementEnabled)operator(()operator(\)) operator({) keyword(return) ident(managementEnabled)operator(;) operator(}) directive(public) pre_type(Set) ident(getExcludedMethods)operator(()operator(\)) operator({) keyword(return) ident(excludedMethods)operator(;) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Anders Bengtsson * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.BlockBody)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** Implementation of the Integer class. * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(abstract) type(class) class(RubyInteger) directive(extends) ident(RubyNumeric) operator({) directive(public) directive(static) ident(RubyClass) ident(createIntegerClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(integer) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setInteger)operator(()ident(integer)operator(\))operator(;) ident(integer)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyInteger)operator(;) operator(}) operator(})operator(;) ident(integer)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(integer)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getPrecision)operator(()operator(\))operator(\))operator(;) ident(integer)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyInteger)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(integer)operator(;) operator(}) directive(public) ident(RubyInteger)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) operator(}) directive(public) ident(RubyInteger)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) type(boolean) ident(useObjectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) ident(useObjectSpace)operator(\))operator(;) operator(}) directive(public) ident(RubyInteger) ident(convertToInteger)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(// conversion) directive(protected) ident(RubyFloat) ident(toFloat)operator(()operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** int_int_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(integer_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** int_upto * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(upto)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(to)operator(,) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(to) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(RubyFixnum) ident(toFixnum) operator(=) operator(()ident(RubyFixnum)operator(\)) ident(to)operator(;) directive(final) type(long) ident(toValue) operator(=) ident(toFixnum)operator(.)ident(getLongValue)operator(()operator(\))operator(;) directive(final) type(long) ident(fromValue) operator(=) ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(getBody)operator(()operator(\))operator(.)ident(getArgumentType)operator(()operator(\)) operator(==) ident(BlockBody)operator(.)ident(ZERO_ARGS)operator(\)) operator({) directive(final) ident(IRubyObject) ident(nil) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(for) operator(()type(long) ident(i) operator(=) ident(fromValue)operator(;) ident(i) operator(<=) ident(toValue)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(nil)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(long) ident(i) operator(=) ident(fromValue)operator(;) ident(i) operator(<=) ident(toValue)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) ident(RubyNumeric) ident(i) operator(=) local_variable(this)operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(if) operator(()ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_GT)operator(,) string)delimiter(")>operator(,) ident(to)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(i)operator(\))operator(;) ident(i) operator(=) operator(()ident(RubyNumeric)operator(\)) ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** int_downto * */) comment(// TODO: Make callCoerced work in block context...then fix downto, step, and upto.) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(downto)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(to)operator(,) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(to) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(RubyFixnum) ident(toFixnum) operator(=) operator(()ident(RubyFixnum)operator(\)) ident(to)operator(;) directive(final) type(long) ident(toValue) operator(=) ident(toFixnum)operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(getBody)operator(()operator(\))operator(.)ident(getArgumentType)operator(()operator(\)) operator(==) ident(BlockBody)operator(.)ident(ZERO_ARGS)operator(\)) operator({) directive(final) ident(IRubyObject) ident(nil) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(for) operator(()type(long) ident(i) operator(=) ident(getLongValue)operator(()operator(\))operator(;) ident(i) operator(>=) ident(toValue)operator(;) ident(i)operator(--)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(nil)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(long) ident(i) operator(=) ident(getLongValue)operator(()operator(\))operator(;) ident(i) operator(>=) ident(toValue)operator(;) ident(i)operator(--)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) ident(RubyNumeric) ident(i) operator(=) local_variable(this)operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(if) operator(()ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(to)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(i)operator(\))operator(;) ident(i) operator(=) operator(()ident(RubyNumeric)operator(\)) ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(times)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) directive(final) type(long) ident(value) operator(=) ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(getBody)operator(()operator(\))operator(.)ident(getArgumentType)operator(()operator(\)) operator(==) ident(BlockBody)operator(.)ident(ZERO_ARGS)operator(\)) operator({) directive(final) ident(IRubyObject) ident(nil) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(for) operator(()type(long) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(value)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(nil)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(long) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(value)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) ident(RubyNumeric) ident(i) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(if) operator(()operator(!)ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) local_variable(this)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(i)operator(\))operator(;) ident(i) operator(=) operator(()ident(RubyNumeric)operator(\)) ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** int_succ * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(succ)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getLongValue)operator(()operator(\)) operator(+) integer(1L)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** int_chr * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(chr)operator(()operator(\)) operator({) keyword(if) operator(()ident(getLongValue)operator(()operator(\)) operator(<) integer(0) operator(||) ident(getLongValue)operator(()operator(\)) operator(>) hex(0xff)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()local_variable(this)operator(.)ident(toString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)operator(()type(byte)operator(\))ident(getLongValue)operator(()operator(\))operator(})operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) comment(/** int_to_i * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(to_i)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** integer_to_r * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalCanonicalize)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(odd_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(if)operator(()ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\)) operator(!=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(even_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(if)operator(()ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\)) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(pred)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) operator(}) comment(/* ================ * Singleton Methods * ================ */) comment(/** rb_int_induced_from * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(induced_from)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum) operator(||) ident(other) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(other)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFloat) operator(||) ident(other) keyword(instanceof) ident(RubyRational)operator(\)) operator({) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_I)operator(,) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(() string operator(+) ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2004-2006 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Evan Buswell * Copyright (C\) 2007 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.EOFException)operator(;) keyword(import) include(java.io.FileDescriptor)operator(;) keyword(import) include(java.io.FilterInputStream)operator(;) keyword(import) include(java.io.FilterOutputStream)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.OutputStream)operator(;) keyword(import) include(java.lang.ref.Reference)operator(;) keyword(import) include(java.lang.ref.WeakReference)operator(;) keyword(import) include(java.nio.channels.Channel)operator(;) keyword(import) include(java.nio.channels.Channels)operator(;) keyword(import) include(java.nio.channels.FileChannel)operator(;) keyword(import) include(java.nio.channels.Pipe)operator(;) keyword(import) include(java.nio.channels.SelectableChannel)operator(;) keyword(import) include(java.nio.channels.SelectionKey)operator(;) keyword(import) include(java.nio.channels.Selector)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.HashSet)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(java.util.concurrent.atomic.AtomicInteger)operator(;) keyword(import) include(org.jruby.anno.FrameField)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.ext.posix.util.FieldAccess)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.io.Stream)operator(;) keyword(import) include(org.jruby.util.io.ModeFlags)operator(;) keyword(import) include(org.jruby.util.ShellLauncher)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) keyword(import) include(org.jruby.util.io.BadDescriptorException)operator(;) keyword(import) include(org.jruby.util.io.ChannelStream)operator(;) keyword(import) include(org.jruby.util.io.InvalidValueException)operator(;) keyword(import) include(org.jruby.util.io.PipeException)operator(;) keyword(import) include(org.jruby.util.io.FileExistsException)operator(;) keyword(import) include(org.jruby.util.io.STDIO)operator(;) keyword(import) include(org.jruby.util.io.OpenFile)operator(;) keyword(import) include(org.jruby.util.io.ChannelDescriptor)operator(;) keyword(import) include(static) include(org.jruby.CompatVersion)operator(.)operator(*)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyIO) directive(extends) ident(RubyObject) operator({) directive(protected) ident(OpenFile) ident(openFile)operator(;) directive(protected) pre_type(List)operator(<)ident(RubyThread)operator(>) ident(blockingThreads)operator(;) directive(public) type(void) ident(registerDescriptor)operator(()ident(ChannelDescriptor) ident(descriptor)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getDescriptors)operator(()operator(\))operator(.)ident(put)operator(()keyword(new) pre_type(Integer)operator(()ident(descriptor)operator(.)ident(getFileno)operator(()operator(\))operator(\))operator(,) keyword(new) pre_type(WeakReference)operator(<)ident(ChannelDescriptor)operator(>)operator(()ident(descriptor)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(unregisterDescriptor)operator(()type(int) ident(aFileno)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getDescriptors)operator(()operator(\))operator(.)ident(remove)operator(()keyword(new) pre_type(Integer)operator(()ident(aFileno)operator(\))operator(\))operator(;) operator(}) directive(public) ident(ChannelDescriptor) ident(getDescriptorByFileno)operator(()type(int) ident(aFileno)operator(\)) operator({) pre_type(Reference)operator(<)ident(ChannelDescriptor)operator(>) ident(reference) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getDescriptors)operator(()operator(\))operator(.)ident(get)operator(()keyword(new) pre_type(Integer)operator(()ident(aFileno)operator(\))operator(\))operator(;) keyword(if) operator(()ident(reference) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) pre_constant(null)operator(;) operator(}) keyword(return) ident(reference)operator(.)ident(get)operator(()operator(\))operator(;) operator(}) comment(// FIXME can't use static; would interfere with other runtimes in the same JVM) directive(protected) directive(static) pre_type(AtomicInteger) ident(filenoIndex) operator(=) keyword(new) pre_type(AtomicInteger)operator(()integer(2)operator(\))operator(;) directive(public) directive(static) type(int) ident(getNewFileno)operator(()operator(\)) operator({) keyword(return) ident(filenoIndex)operator(.)ident(incrementAndGet)operator(()operator(\))operator(;) operator(}) comment(// This should only be called by this and RubyFile.) comment(// It allows this object to be created without a IOHandler.) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) operator(}) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(OutputStream) ident(outputStream)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(\))operator(;) comment(// We only want IO objects with valid streams (better to error now\). ) keyword(if) operator(()ident(outputStream) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) keyword(try) operator({) ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()pre_type(Channels)operator(.)ident(newChannel)operator(()ident(outputStream)operator(\))operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) ident(openFile)operator(.)ident(setMode)operator(()ident(OpenFile)operator(.)ident(WRITABLE) operator(|) ident(OpenFile)operator(.)ident(APPEND)operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(InputStream) ident(inputStream)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(inputStream) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) keyword(try) operator({) ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()pre_type(Channels)operator(.)ident(newChannel)operator(()ident(inputStream)operator(\))operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) ident(openFile)operator(.)ident(setMode)operator(()ident(OpenFile)operator(.)ident(READABLE)operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Channel) ident(channel)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(\))operator(;) comment(// We only want IO objects with valid streams (better to error now\). ) keyword(if) operator(()ident(channel) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) keyword(try) operator({) ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()ident(channel)operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) ident(openFile)operator(.)ident(setMode)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getModes)operator(()operator(\))operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) ident(ShellLauncher)operator(.)ident(POpenProcess) ident(process)operator(,) ident(ModeFlags) ident(modes)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(\))operator(;) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) ident(openFile)operator(.)ident(setMode)operator(()ident(modes)operator(.)ident(getOpenFileFlags)operator(()operator(\)) operator(|) ident(OpenFile)operator(.)ident(SYNC)operator(\))operator(;) ident(openFile)operator(.)ident(setProcess)operator(()ident(process)operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(openFile)operator(.)ident(isReadable)operator(()operator(\))operator(\)) operator({) pre_type(Channel) ident(inChannel)operator(;) keyword(if) operator(()ident(process)operator(.)ident(getInput)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) comment(// NIO-based) ident(inChannel) operator(=) ident(process)operator(.)ident(getInput)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) comment(// Stream-based) ident(inChannel) operator(=) pre_type(Channels)operator(.)ident(newChannel)operator(()ident(process)operator(.)ident(getInputStream)operator(()operator(\))operator(\))operator(;) operator(}) ident(ChannelDescriptor) ident(main) operator(=) keyword(new) ident(ChannelDescriptor)operator(() ident(inChannel)operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(;) ident(main)operator(.)ident(setCanBeSeekable)operator(()pre_constant(false)operator(\))operator(;) ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(main)operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(main)operator(\))operator(;) operator(}) keyword(if) operator(()ident(openFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) pre_type(Channel) ident(outChannel)operator(;) keyword(if) operator(()ident(process)operator(.)ident(getOutput)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) comment(// NIO-based) ident(outChannel) operator(=) ident(process)operator(.)ident(getOutput)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(outChannel) operator(=) pre_type(Channels)operator(.)ident(newChannel)operator(()ident(process)operator(.)ident(getOutputStream)operator(()operator(\))operator(\))operator(;) operator(}) ident(ChannelDescriptor) ident(pipe) operator(=) keyword(new) ident(ChannelDescriptor)operator(() ident(outChannel)operator(,) ident(getNewFileno)operator(()operator(\))operator(,) keyword(new) pre_type(FileDescriptor)operator(()operator(\))operator(\))operator(;) ident(pipe)operator(.)ident(setCanBeSeekable)operator(()pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(openFile)operator(.)ident(setPipeStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(pipe)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(openFile)operator(.)ident(setMainStream)operator(()keyword(new) ident(ChannelStream)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(pipe)operator(\))operator(\))operator(;) operator(}) ident(registerDescriptor)operator(()ident(pipe)operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) ident(RubyIO)operator(()ident(Ruby) ident(runtime)operator(,) ident(STDIO) ident(stdio)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(\))operator(;) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) keyword(try) operator({) keyword(switch) operator(()ident(stdio)operator(\)) operator({) keyword(case) ident(IN)operator(:) ident(openFile)operator(.)ident(setMainStream)operator(() keyword(new) ident(ChannelStream)operator(() ident(runtime)operator(,) comment(// special constructor that accepts stream, not channel) keyword(new) ident(ChannelDescriptor)operator(()ident(runtime)operator(.)ident(getIn)operator(()operator(\))operator(,) integer(0)operator(,) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(RDONLY)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(in)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(in)operator(\))operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(OUT)operator(:) ident(openFile)operator(.)ident(setMainStream)operator(() keyword(new) ident(ChannelStream)operator(() ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()pre_type(Channels)operator(.)ident(newChannel)operator(()ident(runtime)operator(.)ident(getOut)operator(()operator(\))operator(\))operator(,) integer(1)operator(,) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(WRONLY) operator(|) ident(ModeFlags)operator(.)ident(APPEND)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(out)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(out)operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setSync)operator(()pre_constant(true)operator(\))operator(;) keyword(break)operator(;) keyword(case) ident(ERR)operator(:) ident(openFile)operator(.)ident(setMainStream)operator(() keyword(new) ident(ChannelStream)operator(() ident(runtime)operator(,) keyword(new) ident(ChannelDescriptor)operator(()pre_type(Channels)operator(.)ident(newChannel)operator(()ident(runtime)operator(.)ident(getErr)operator(()operator(\))operator(\))operator(,) integer(2)operator(,) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(WRONLY) operator(|) ident(ModeFlags)operator(.)ident(APPEND)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(err)operator(\))operator(,) pre_type(FileDescriptor)operator(.)ident(err)operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setSync)operator(()pre_constant(true)operator(\))operator(;) keyword(break)operator(;) operator(}) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) ident(openFile)operator(.)ident(setMode)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getModes)operator(()operator(\))operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyIO) ident(newIO)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Channel) ident(channel)operator(\)) operator({) keyword(return) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(channel)operator(\))operator(;) operator(}) directive(public) ident(OpenFile) ident(getOpenFile)operator(()operator(\)) operator({) keyword(return) ident(openFile)operator(;) operator(}) directive(protected) ident(OpenFile) ident(getOpenFileChecked)operator(()operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(openFile)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(IO_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createIOClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(ioClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(IO_ALLOCATOR)operator(\))operator(;) ident(ioClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyIO)operator(;) operator(}) operator(})operator(;) ident(ioClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) comment(// TODO: Implement tty? and isatty. We have no real capability to) comment(// determine this from java, but if we could set tty status, then) comment(// we could invoke jruby differently to allow stdin to return true) comment(// on this. This would allow things like cgi.rb to work properly.) ident(ioClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyIO)operator(.)ident(class)operator(\))operator(;) comment(// Constants for seek) ident(ioClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Stream)operator(.)ident(SEEK_SET)operator(\))operator(\))operator(;) ident(ioClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Stream)operator(.)ident(SEEK_CUR)operator(\))operator(\))operator(;) ident(ioClass)operator(.)ident(fastSetConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Stream)operator(.)ident(SEEK_END)operator(\))operator(\))operator(;) keyword(return) ident(ioClass)operator(;) operator(}) directive(public) pre_type(OutputStream) ident(getOutStream)operator(()operator(\)) operator({) keyword(return) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(newOutputStream)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(InputStream) ident(getInStream)operator(()operator(\)) operator({) keyword(return) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(newInputStream)operator(()operator(\))operator(;) operator(}) directive(public) pre_type(Channel) ident(getChannel)operator(()operator(\)) operator({) keyword(if) operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\)) keyword(instanceof) ident(ChannelStream)operator(\)) operator({) keyword(return) operator(()operator(()ident(ChannelStream)operator(\)) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getChannel)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) directive(public) ident(Stream) ident(getHandler)operator(()operator(\)) operator({) keyword(return) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(reopen)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) ident(InvalidValueException) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(1)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(tmp) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(getIndex)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(RubyIO) ident(ios) operator(=) operator(()ident(RubyIO)operator(\)) ident(tmp)operator(;) keyword(if) operator(()ident(ios)operator(.)ident(openFile) operator(==) local_variable(this)operator(.)ident(openFile)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) ident(OpenFile) ident(originalFile) operator(=) ident(ios)operator(.)ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(OpenFile) ident(selfFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) type(long) ident(pos) operator(=) integer(0)operator(;) keyword(if) operator(()ident(originalFile)operator(.)ident(isReadable)operator(()operator(\))operator(\)) operator({) ident(pos) operator(=) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fgetpos)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(originalFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(selfFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) ident(selfFile)operator(.)ident(getWriteStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) operator(}) ident(selfFile)operator(.)ident(setMode)operator(()ident(originalFile)operator(.)ident(getMode)operator(()operator(\))operator(\))operator(;) ident(selfFile)operator(.)ident(setProcess)operator(()ident(originalFile)operator(.)ident(getProcess)operator(()operator(\))operator(\))operator(;) ident(selfFile)operator(.)ident(setLineNumber)operator(()ident(originalFile)operator(.)ident(getLineNumber)operator(()operator(\))operator(\))operator(;) ident(selfFile)operator(.)ident(setPath)operator(()ident(originalFile)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(;) ident(selfFile)operator(.)ident(setFinalizer)operator(()ident(originalFile)operator(.)ident(getFinalizer)operator(()operator(\))operator(\))operator(;) ident(ChannelDescriptor) ident(selfDescriptor) operator(=) ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) ident(ChannelDescriptor) ident(originalDescriptor) operator(=) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) comment(// confirm we're not reopening self's channel) keyword(if) operator(()ident(selfDescriptor)operator(.)ident(getChannel)operator(()operator(\)) operator(!=) ident(originalDescriptor)operator(.)ident(getChannel)operator(()operator(\))operator(\)) operator({) comment(// check if we're a stdio IO, and ensure we're not badly mutilated) keyword(if) operator(()ident(selfDescriptor)operator(.)ident(getFileno)operator(()operator(\)) operator(>=)integer(0) operator(&&) ident(selfDescriptor)operator(.)ident(getFileno)operator(()operator(\)) operator(<=) integer(2)operator(\)) operator({) ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) comment(// dup2 new fd into self to preserve fileno and references to it) ident(originalDescriptor)operator(.)ident(dup2Into)operator(()ident(selfDescriptor)operator(\))operator(;) comment(// re-register, since fileno points at something new now) ident(registerDescriptor)operator(()ident(selfDescriptor)operator(\))operator(;) operator(}) keyword(else) operator({) ident(Stream) ident(pipeFile) operator(=) ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(;) type(int) ident(mode) operator(=) ident(selfFile)operator(.)ident(getMode)operator(()operator(\))operator(;) ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(selfFile)operator(.)ident(setPipeStream)operator(()pre_constant(null)operator(\))operator(;) comment(// TODO: turn off readable? am I reading this right?) comment(// This only seems to be used while duping below, since modes gets) comment(// reset to actual modes afterward) comment(//fptr->mode &= (m & FMODE_READABLE\) ? ~FMODE_READABLE : ~FMODE_WRITABLE;) keyword(if) operator(()ident(pipeFile) operator(!=) pre_constant(null)operator(\)) operator({) ident(selfFile)operator(.)ident(setMainStream)operator(()ident(ChannelStream)operator(.)ident(fdopen)operator(()ident(runtime)operator(,) ident(originalDescriptor)operator(,) keyword(new) ident(ModeFlags)operator(()operator(\))operator(\))operator(\))operator(;) ident(selfFile)operator(.)ident(setPipeStream)operator(()ident(pipeFile)operator(\))operator(;) operator(}) keyword(else) operator({) ident(selfFile)operator(.)ident(setMainStream)operator(() keyword(new) ident(ChannelStream)operator(() ident(runtime)operator(,) ident(originalDescriptor)operator(.)ident(dup2)operator(()ident(selfDescriptor)operator(.)ident(getFileno)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) comment(// re-register the descriptor) ident(registerDescriptor)operator(()ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) comment(// since we're not actually duping the incoming channel into our handler, we need to) comment(// copy the original sync behavior from the other handler) ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setSync)operator(()ident(selfFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(isSync)operator(()operator(\))operator(\))operator(;) operator(}) ident(selfFile)operator(.)ident(setMode)operator(()ident(mode)operator(\))operator(;) operator(}) comment(// TODO: anything threads attached to original fd are notified of the close...) comment(// see rb_thread_fd_close) keyword(if) operator(()ident(originalFile)operator(.)ident(isReadable)operator(()operator(\)) operator(&&) ident(pos) operator(>=) integer(0)operator(\)) operator({) ident(selfFile)operator(.)ident(seek)operator(()ident(pos)operator(,) ident(Stream)operator(.)ident(SEEK_SET)operator(\))operator(;) ident(originalFile)operator(.)ident(seek)operator(()ident(pos)operator(,) ident(Stream)operator(.)ident(SEEK_SET)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null) operator(&&) ident(selfDescriptor)operator(.)ident(getFileno)operator(()operator(\)) operator(!=) ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\))operator(\)) operator({) type(int) ident(fd) operator(=) ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\))operator(;) keyword(if) operator(()ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(selfFile)operator(.)ident(setPipeStream)operator(()pre_constant(null)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(fd) operator(!=) ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\))operator(\)) operator({) ident(selfFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(ChannelDescriptor) ident(newFD2) operator(=) ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(dup2)operator(()ident(fd)operator(\))operator(;) ident(selfFile)operator(.)ident(setPipeStream)operator(()ident(ChannelStream)operator(.)ident(fdopen)operator(()ident(runtime)operator(,) ident(newFD2)operator(,) ident(getIOModes)operator(()ident(runtime)operator(,) stringoperator(\))operator(\))operator(\))operator(;) comment(// re-register, since fileno points at something new now) ident(registerDescriptor)operator(()ident(newFD2)operator(\))operator(;) operator(}) operator(}) comment(// TODO: restore binary mode) comment(// if (fptr->mode & FMODE_BINMODE\) {) comment(// rb_io_binmode(io\);) comment(// }) comment(// TODO: set our metaclass to target's class (i.e. scary!\)) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) comment(// TODO: better error handling) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(IRubyObject) ident(pathString) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) comment(// TODO: check safe, taint on incoming string) keyword(if) operator(()ident(openFile) operator(==) pre_constant(null)operator(\)) operator({) ident(openFile) operator(=) keyword(new) ident(OpenFile)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) ident(ModeFlags) ident(modes)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(IRubyObject) ident(modeString) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(modes) operator(=) ident(getIOModes)operator(()ident(runtime)operator(,) ident(modeString)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(setMode)operator(()ident(modes)operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(modes) operator(=) ident(getIOModes)operator(()ident(runtime)operator(,) stringoperator(\))operator(;) operator(}) pre_type(String) ident(path) operator(=) ident(pathString)operator(.)ident(toString)operator(()operator(\))operator(;) comment(// Ruby code frequently uses a platform check to choose "NUL:" on windows) comment(// but since that check doesn't work well on JRuby, we help it out) ident(openFile)operator(.)ident(setPath)operator(()ident(path)operator(\))operator(;) keyword(if) operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(openFile)operator(.)ident(setMainStream)operator(()ident(ChannelStream)operator(.)ident(fopen)operator(()ident(runtime)operator(,) ident(path)operator(,) ident(modes)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(FileExistsException) ident(fee)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEEXISTError)operator(()ident(path)operator(\))operator(;) operator(}) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(unregisterDescriptor)operator(()ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(setPipeStream)operator(()pre_constant(null)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) keyword(else) operator({) comment(// TODO: This is an freopen in MRI, this is close, but not quite the same) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(freopen)operator(()ident(path)operator(,) ident(getIOModes)operator(()ident(runtime)operator(,) ident(openFile)operator(.)ident(getModeAsString)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) comment(// re-register) ident(registerDescriptor)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) comment(// TODO: pipe handler to be reopened with path and "w" mode) operator(}) operator(}) operator(}) keyword(catch) operator(()ident(PipeException) ident(pe)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) operator(}) comment(// A potentially previously close IO is being 'reopened'.) keyword(return) local_variable(this)operator(;) operator(}) directive(public) directive(static) ident(ModeFlags) ident(getIOModes)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(modesString)operator(\)) directive(throws) ident(InvalidValueException) operator({) keyword(return) keyword(new) ident(ModeFlags)operator(()ident(getIOModesIntFromString)operator(()ident(runtime)operator(,) ident(modesString)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) type(int) ident(getIOModesIntFromString)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(modesString)operator(\)) operator({) type(int) ident(modes) operator(=) integer(0)operator(;) type(int) ident(length) operator(=) ident(modesString)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(length) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(switch) operator(()ident(modesString)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\)) operator({) keyword(case) string operator(:) ident(modes) operator(|=) ident(ModeFlags)operator(.)ident(RDONLY)operator(;) keyword(break)operator(;) keyword(case) string operator(:) ident(modes) operator(|=) ident(ModeFlags)operator(.)ident(APPEND) operator(|) ident(ModeFlags)operator(.)ident(WRONLY) operator(|) ident(ModeFlags)operator(.)ident(CREAT)operator(;) keyword(break)operator(;) keyword(case) string operator(:) ident(modes) operator(|=) ident(ModeFlags)operator(.)ident(WRONLY) operator(|) ident(ModeFlags)operator(.)ident(TRUNC) operator(|) ident(ModeFlags)operator(.)ident(CREAT)operator(;) keyword(break)operator(;) keyword(default) operator(:) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(modes)operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(n) operator(=) integer(1)operator(;) ident(n) operator(<) ident(length)operator(;) ident(n)operator(++)operator(\)) operator({) keyword(switch) operator(()ident(modesString)operator(.)ident(charAt)operator(()ident(n)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) ident(modes) operator(|=) ident(ModeFlags)operator(.)ident(BINARY)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(modes) operator(=) operator(()ident(modes) operator(&) operator(~)ident(ModeFlags)operator(.)ident(ACCMODE)operator(\)) operator(|) ident(ModeFlags)operator(.)ident(RDWR)operator(;) keyword(break)operator(;) keyword(default)operator(:) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(modes)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(modes)operator(;) operator(}) directive(private) directive(static) ident(ByteList) ident(getSeparatorFromArgs)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) type(int) ident(idx)operator(\)) operator({) ident(IRubyObject) ident(sepVal)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) ident(idx)operator(\)) operator({) ident(sepVal) operator(=) ident(args)operator([)ident(idx)operator(])operator(;) operator(}) keyword(else) operator({) ident(sepVal) operator(=) ident(runtime)operator(.)ident(getRecordSeparatorVar)operator(()operator(\))operator(.)ident(get)operator(()operator(\))operator(;) operator(}) ident(ByteList) ident(separator) operator(=) ident(sepVal)operator(.)ident(isNil)operator(()operator(\)) operator(?) pre_constant(null) operator(:) ident(sepVal)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(separator) operator(!=) pre_constant(null) operator(&&) ident(separator)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(separator) operator(=) ident(Stream)operator(.)ident(PARAGRAPH_DELIMETER)operator(;) operator(}) keyword(return) ident(separator)operator(;) operator(}) directive(private) ident(ByteList) ident(getSeparatorForGets)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(getSeparatorFromArgs)operator(()ident(runtime)operator(,) ident(args)operator(,) integer(0)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(getline)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(separator)operator(\)) operator({) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) type(boolean) ident(isParagraph) operator(=) ident(separator) operator(==) ident(Stream)operator(.)ident(PARAGRAPH_DELIMETER)operator(;) ident(separator) operator(=) operator(()ident(separator) operator(==) ident(Stream)operator(.)ident(PARAGRAPH_DELIMETER)operator(\)) operator(?) ident(Stream)operator(.)ident(PARAGRAPH_SEPARATOR) operator(:) ident(separator)operator(;) keyword(if) operator(()ident(isParagraph)operator(\)) operator({) ident(swallow)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(separator) operator(==) pre_constant(null)operator(\)) operator({) ident(IRubyObject) ident(str) operator(=) ident(readAll)operator(()pre_constant(null)operator(\))operator(;) keyword(if) operator(()operator(()operator(()ident(RubyString)operator(\))ident(str)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(incrementLineno)operator(()ident(runtime)operator(,) ident(myOpenFile)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(separator)operator(.)ident(length)operator(()operator(\)) operator(==) integer(1)operator(\)) operator({) keyword(return) ident(getlineFast)operator(()ident(runtime)operator(,) ident(separator)operator(.)ident(get)operator(()integer(0)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(Stream) ident(readStream) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(;) type(int) ident(c) operator(=) operator(-)integer(1)operator(;) type(int) ident(n) operator(=) operator(-)integer(1)operator(;) type(int) ident(newline) operator(=) ident(separator)operator(.)ident(get)operator(()ident(separator)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator(&) hex(0xFF)operator(;) ident(ByteList) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()integer(0)operator(\))operator(;) type(boolean) ident(update) operator(=) pre_constant(false)operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(do) operator({) ident(readCheck)operator(()ident(readStream)operator(\))operator(;) ident(readStream)operator(.)ident(clearerr)operator(()operator(\))operator(;) keyword(try) operator({) ident(n) operator(=) ident(readStream)operator(.)ident(getline)operator(()ident(buf)operator(,) operator(()type(byte)operator(\)) ident(newline)operator(\))operator(;) ident(c) operator(=) ident(buf)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(?) ident(buf)operator(.)ident(get)operator(()ident(buf)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator(&) hex(0xff) operator(:) operator(-)integer(1)operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) ident(n) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(if) operator(()ident(n) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(if) operator(()operator(!)ident(readStream)operator(.)ident(isBlocking)operator(()operator(\)) operator(&&) operator(()ident(readStream) keyword(instanceof) ident(ChannelStream)operator(\))operator(\)) operator({) keyword(if)operator(()operator(!)operator(()ident(waitReadable)operator(()operator(()operator(()ident(ChannelStream)operator(\))ident(readStream)operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(openFile)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(;) operator(}) keyword(continue)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) operator(}) ident(update) operator(=) pre_constant(true)operator(;) operator(}) keyword(while) operator(()ident(c) operator(!=) ident(newline)operator(\))operator(;) comment(// loop until we see the nth separator char) comment(// if we hit EOF, we're done) keyword(if) operator(()ident(n) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(break)operator(;) operator(}) comment(// if we've found the last char of the separator,) comment(// and we've found at least as many characters as separator length,) comment(// and the last n characters of our buffer match the separator, we're done) keyword(if) operator(()ident(c) operator(==) ident(newline) operator(&&) ident(buf)operator(.)ident(length)operator(()operator(\)) operator(>=) ident(separator)operator(.)ident(length)operator(()operator(\)) operator(&&) integer(0) operator(==) ident(ByteList)operator(.)ident(memcmp)operator(()ident(buf)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(buf)operator(.)ident(begin) operator(+) ident(buf)operator(.)ident(realSize) operator(-) ident(separator)operator(.)ident(length)operator(()operator(\))operator(,) ident(separator)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(separator)operator(.)ident(begin)operator(,) ident(separator)operator(.)ident(realSize)operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) operator(}) keyword(if) operator(()ident(isParagraph)operator(\)) operator({) keyword(if) operator(()ident(c) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(swallow)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(update)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(incrementLineno)operator(()ident(runtime)operator(,) ident(myOpenFile)operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buf)operator(\))operator(;) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) operator(}) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(incrementLineno)operator(()ident(Ruby) ident(runtime)operator(,) ident(OpenFile) ident(myOpenFile)operator(\)) operator({) type(int) ident(lineno) operator(=) ident(myOpenFile)operator(.)ident(getLineNumber)operator(()operator(\)) operator(+) integer(1)operator(;) ident(myOpenFile)operator(.)ident(setLineNumber)operator(()ident(lineno)operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(lineno)operator(\))operator(\))operator(;) comment(// this is for a range check, near as I can tell) ident(RubyNumeric)operator(.)ident(int2fix)operator(()ident(runtime)operator(,) ident(myOpenFile)operator(.)ident(getLineNumber)operator(()operator(\))operator(\))operator(;) operator(}) directive(protected) type(boolean) ident(swallow)operator(()type(int) ident(term)operator(\)) directive(throws) exception(IOException)operator(,) ident(BadDescriptorException) operator({) ident(Stream) ident(readStream) operator(=) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(;) type(int) ident(c)operator(;) keyword(do) operator({) ident(readCheck)operator(()ident(readStream)operator(\))operator(;) keyword(try) operator({) ident(c) operator(=) ident(readStream)operator(.)ident(fgetc)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) ident(c) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(if) operator(()ident(c) operator(!=) ident(term)operator(\)) operator({) ident(readStream)operator(.)ident(ungetc)operator(()ident(c)operator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(while) operator(()ident(c) operator(!=) operator(-)integer(1)operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getlineFast)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(delim)operator(\)) directive(throws) exception(IOException)operator(,) ident(BadDescriptorException) operator({) ident(Stream) ident(readStream) operator(=) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(;) type(int) ident(c) operator(=) operator(-)integer(1)operator(;) ident(ByteList) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()integer(0)operator(\))operator(;) type(boolean) ident(update) operator(=) pre_constant(false)operator(;) keyword(do) operator({) ident(readCheck)operator(()ident(readStream)operator(\))operator(;) ident(readStream)operator(.)ident(clearerr)operator(()operator(\))operator(;) type(int) ident(n)operator(;) keyword(try) operator({) ident(n) operator(=) ident(readStream)operator(.)ident(getline)operator(()ident(buf)operator(,) operator(()type(byte)operator(\)) ident(delim)operator(\))operator(;) ident(c) operator(=) ident(buf)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(?) ident(buf)operator(.)ident(get)operator(()ident(buf)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(\)) operator(&) hex(0xff) operator(:) operator(-)integer(1)operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) ident(n) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(if) operator(()ident(n) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(if) operator(()operator(!)ident(readStream)operator(.)ident(isBlocking)operator(()operator(\)) operator(&&) operator(()ident(readStream) keyword(instanceof) ident(ChannelStream)operator(\))operator(\)) operator({) keyword(if)operator(()operator(!)operator(()ident(waitReadable)operator(()operator(()operator(()ident(ChannelStream)operator(\))ident(readStream)operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(openFile)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(;) operator(}) keyword(continue)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) operator(}) ident(update) operator(=) pre_constant(true)operator(;) operator(}) keyword(while) operator(()ident(c) operator(!=) ident(delim)operator(\))operator(;) keyword(if) operator(()operator(!)ident(update)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(incrementLineno)operator(()ident(runtime)operator(,) ident(openFile)operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buf)operator(\))operator(;) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) operator(}) comment(// IO class methods.) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(className) operator(=) ident(klass)operator(.)ident(getName)operator(()operator(\))operator(;) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(() ident(ID)operator(.)ident(BLOCK_NOT_ACCEPTED)operator(,) ident(className) operator(+) string operator(+) ident(className) operator(+) stringoperator(,) ident(className) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(klass)operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) type(int) ident(argCount) operator(=) ident(args)operator(.)ident(length)operator(;) ident(ModeFlags) ident(modes)operator(;) type(int) ident(fileno) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(try) operator({) ident(ChannelDescriptor) ident(descriptor) operator(=) ident(getDescriptorByFileno)operator(()ident(fileno)operator(\))operator(;) keyword(if) operator(()ident(descriptor) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) ident(descriptor)operator(.)ident(checkOpen)operator(()operator(\))operator(;) keyword(if) operator(()ident(argCount) operator(==) integer(2)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(RubyFixnum)operator(.)ident(fix2long)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(modes) operator(=) ident(getIOModes)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) comment(// use original modes) ident(modes) operator(=) ident(descriptor)operator(.)ident(getOriginalModes)operator(()operator(\))operator(;) operator(}) ident(openFile)operator(.)ident(setMode)operator(()ident(modes)operator(.)ident(getOpenFileFlags)operator(()operator(\))operator(\))operator(;) ident(openFile)operator(.)ident(setMainStream)operator(()ident(fdopen)operator(()ident(descriptor)operator(,) ident(modes)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ive)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(protected) ident(Stream) ident(fdopen)operator(()ident(ChannelDescriptor) ident(existingDescriptor)operator(,) ident(ModeFlags) ident(modes)operator(\)) directive(throws) ident(InvalidValueException) operator({) comment(// See if we already have this descriptor open.) comment(// If so then we can mostly share the handler (keep open) comment(// file, but possibly change the mode\).) keyword(if) operator(()ident(existingDescriptor) operator(==) pre_constant(null)operator(\)) operator({) comment(// redundant, done above as well) comment(// this seems unlikely to happen unless it's a totally bogus fileno) comment(// ...so do we even need to bother trying to create one?) comment(// IN FACT, we should probably raise an error, yes?) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) comment(// if (mode == null\) {) comment(// mode = "r";) comment(// }) comment(// ) comment(// try {) comment(// openFile.setMainStream(streamForFileno(getRuntime(\), fileno\)\);) comment(// } catch (BadDescriptorException e\) {) comment(// throw getRuntime(\).newErrnoEBADFError(\);) comment(// } catch (IOException e\) {) comment(// throw getRuntime(\).newErrnoEBADFError(\);) comment(// }) comment(// //modes = new IOModes(getRuntime(\), mode\);) comment(// ) comment(// registerStream(openFile.getMainStream(\)\);) operator(}) keyword(else) operator({) comment(// We are creating a new IO object that shares the same) comment(// IOHandler (and fileno\).) keyword(return) ident(ChannelStream)operator(.)ident(fdopen)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(existingDescriptor)operator(,) ident(modes)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyIO) ident(io) operator(=) operator(()ident(RubyIO)operator(\))ident(klass)operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(io)operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(try) operator({) ident(io)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(invoke)operator(()ident(context)operator(,) ident(io)operator(,) stringoperator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(CallType)operator(.)ident(FUNCTIONAL)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(re)operator(\)) operator({) ident(RubyException) ident(rubyEx) operator(=) ident(re)operator(.)ident(getException)operator(()operator(\))operator(;) keyword(if) operator(()ident(rubyEx)operator(.)ident(kind_of_p)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getStandardError)operator(()operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) comment(// MRI behavior: swallow StandardErorrs) operator(}) keyword(else) operator({) keyword(throw) ident(re)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(return) ident(io)operator(;) operator(}) comment(// This appears to be some windows-only mode. On a java platform this is a no-op) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(binmode)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** @deprecated will be removed in 1.2 */) directive(protected) type(void) ident(checkInitialized)operator(()operator(\)) operator({) keyword(if) operator(()ident(openFile) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** @deprecated will be removed in 1.2 */) directive(protected) type(void) ident(checkClosed)operator(()operator(\)) operator({) keyword(if) operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(==) pre_constant(null) operator(&&) ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(syswrite)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) ident(RubyString) ident(string) operator(=) ident(obj)operator(.)ident(asString)operator(()operator(\))operator(;) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkWritable)operator(()ident(runtime)operator(\))operator(;) ident(Stream) ident(writeStream) operator(=) ident(myOpenFile)operator(.)ident(getWriteStream)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(isWriteBuffered)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(SYSWRITE_BUFFERED_IO)operator(,) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(writeStream)operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) ident(myOpenFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) operator(}) type(int) ident(read) operator(=) ident(writeStream)operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(write)operator(()ident(string)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(read) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// TODO? I think this ends up propagating from normal Java exceptions) comment(// sys_fail(openFile.getPath(\)\)) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(read)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSystemCallError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(write_nonblock)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) comment(// MRI behavior: always check whether the file is writable) comment(// or not, even if we are to write 0 bytes.) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenFile)operator(.)ident(checkWritable)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) comment(// TODO: Obviously, we're not doing a non-blocking write here) keyword(return) ident(write)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) operator(}) comment(/** io_write * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(write)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(obj)operator(.)ident(asString)operator(()operator(\))operator(;) comment(// TODO: Ruby reuses this logic for other "write" behavior by checking if it's an IO and calling write again) keyword(if) operator(()ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkWritable)operator(()ident(runtime)operator(\))operator(;) type(int) ident(written) operator(=) ident(fwrite)operator(()ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(written) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// TODO: sys fail) operator(}) comment(// if not sync, we switch to write buffered mode) keyword(if) operator(()operator(!)ident(myOpenFile)operator(.)ident(isSync)operator(()operator(\))operator(\)) operator({) ident(myOpenFile)operator(.)ident(setWriteBuffered)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(written)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) operator(}) directive(protected) type(boolean) ident(waitWritable)operator(()ident(ChannelDescriptor) ident(descriptor)operator(\)) directive(throws) exception(IOException) operator({) pre_type(Channel) ident(channel) operator(=) ident(descriptor)operator(.)ident(getChannel)operator(()operator(\))operator(;) keyword(if) operator(()ident(channel) operator(==) pre_constant(null) operator(||) operator(!)operator(()ident(channel) keyword(instanceof) pre_type(SelectableChannel)operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) pre_type(Selector) ident(selector) operator(=) pre_type(Selector)operator(.)ident(open)operator(()operator(\))operator(;) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(configureBlocking)operator(()pre_constant(false)operator(\))operator(;) type(int) ident(real_ops) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(validOps)operator(()operator(\)) operator(&) pre_type(SelectionKey)operator(.)ident(OP_WRITE)operator(;) pre_type(SelectionKey) ident(key) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(keyFor)operator(()ident(selector)operator(\))operator(;) keyword(if) operator(()ident(key) operator(==) pre_constant(null)operator(\)) operator({) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(register)operator(()ident(selector)operator(,) ident(real_ops)operator(,) ident(descriptor)operator(\))operator(;) operator(}) keyword(else) operator({) ident(key)operator(.)ident(interestOps)operator(()ident(key)operator(.)ident(interestOps)operator(()operator(\))operator(|)ident(real_ops)operator(\))operator(;) operator(}) keyword(while)operator(()ident(selector)operator(.)ident(select)operator(()operator(\)) operator(==) integer(0)operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) ident(selector)operator(.)ident(selectedKeys)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) pre_type(SelectionKey) ident(skey) operator(=) operator(()pre_type(SelectionKey)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(skey)operator(.)ident(interestOps)operator(()operator(\)) operator(&) ident(skey)operator(.)ident(readyOps)operator(()operator(\)) operator(&) operator(()pre_type(SelectionKey)operator(.)ident(OP_WRITE)operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(if)operator(()ident(skey)operator(.)ident(attachment)operator(()operator(\)) operator(==) ident(descriptor)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(protected) type(boolean) ident(waitReadable)operator(()ident(ChannelDescriptor) ident(descriptor)operator(\)) directive(throws) exception(IOException) operator({) pre_type(Channel) ident(channel) operator(=) ident(descriptor)operator(.)ident(getChannel)operator(()operator(\))operator(;) keyword(if) operator(()ident(channel) operator(==) pre_constant(null) operator(||) operator(!)operator(()ident(channel) keyword(instanceof) pre_type(SelectableChannel)operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) pre_type(Selector) ident(selector) operator(=) pre_type(Selector)operator(.)ident(open)operator(()operator(\))operator(;) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(configureBlocking)operator(()pre_constant(false)operator(\))operator(;) type(int) ident(real_ops) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(validOps)operator(()operator(\)) operator(&) operator(()pre_type(SelectionKey)operator(.)ident(OP_READ) operator(|) pre_type(SelectionKey)operator(.)ident(OP_ACCEPT)operator(\))operator(;) pre_type(SelectionKey) ident(key) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(keyFor)operator(()ident(selector)operator(\))operator(;) keyword(if) operator(()ident(key) operator(==) pre_constant(null)operator(\)) operator({) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(register)operator(()ident(selector)operator(,) ident(real_ops)operator(,) ident(descriptor)operator(\))operator(;) operator(}) keyword(else) operator({) ident(key)operator(.)ident(interestOps)operator(()ident(key)operator(.)ident(interestOps)operator(()operator(\))operator(|)ident(real_ops)operator(\))operator(;) operator(}) keyword(while)operator(()ident(selector)operator(.)ident(select)operator(()operator(\)) operator(==) integer(0)operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) ident(selector)operator(.)ident(selectedKeys)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) pre_type(SelectionKey) ident(skey) operator(=) operator(()pre_type(SelectionKey)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(skey)operator(.)ident(interestOps)operator(()operator(\)) operator(&) ident(skey)operator(.)ident(readyOps)operator(()operator(\)) operator(&) operator(()pre_type(SelectionKey)operator(.)ident(OP_READ) operator(|) pre_type(SelectionKey)operator(.)ident(OP_ACCEPT)operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) keyword(if)operator(()ident(skey)operator(.)ident(attachment)operator(()operator(\)) operator(==) ident(descriptor)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(protected) type(int) ident(fwrite)operator(()ident(ByteList) ident(buffer)operator(\)) operator({) type(int) ident(n)operator(,) ident(r)operator(,) ident(l)operator(,) ident(offset) operator(=) integer(0)operator(;) type(boolean) ident(eagain) operator(=) pre_constant(false)operator(;) ident(Stream) ident(writeStream) operator(=) ident(openFile)operator(.)ident(getWriteStream)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(buffer)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(n) operator(=) ident(len)operator(\)) operator(<=) integer(0)operator(\)) keyword(return) ident(n)operator(;) keyword(try) operator({) keyword(if) operator(()ident(openFile)operator(.)ident(isSync)operator(()operator(\))operator(\)) operator({) ident(openFile)operator(.)ident(fflush)operator(()ident(writeStream)operator(\))operator(;) comment(// TODO: why is this guarded?) comment(// if (!rb_thread_fd_writable(fileno(f\)\)\) {) comment(// rb_io_check_closed(fptr\);) comment(// }) keyword(while)operator(()ident(offset)operator(<)ident(len)operator(\)) operator({) ident(l) operator(=) ident(n)operator(;) comment(// TODO: Something about pipe buffer length here) ident(r) operator(=) ident(writeStream)operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(write)operator(()ident(buffer)operator(,)ident(offset)operator(,)ident(l)operator(\))operator(;) keyword(if)operator(()ident(r) operator(==) ident(len)operator(\)) operator({) keyword(return) ident(len)operator(;) comment(//Everything written) operator(}) keyword(if) operator(()integer(0) operator(<=) ident(r)operator(\)) operator({) ident(offset) operator(+=) ident(r)operator(;) ident(n) operator(-=) ident(r)operator(;) ident(eagain) operator(=) pre_constant(true)operator(;) operator(}) keyword(if)operator(()ident(eagain) operator(&&) ident(waitWritable)operator(()ident(writeStream)operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if)operator(()ident(offset) operator(>=) ident(buffer)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(return) operator(-)integer(1)operator(;) operator(}) ident(eagain) operator(=) pre_constant(false)operator(;) operator(}) keyword(else) operator({) keyword(return) operator(-)integer(1)operator(;) operator(}) operator(}) comment(// TODO: all this stuff...some pipe logic, some async thread stuff) comment(// retry:) comment(// l = n;) comment(// if (PIPE_BUF < l &&) comment(// !rb_thread_critical &&) comment(// !rb_thread_alone(\) &&) comment(// wsplit_p(fptr\)\) {) comment(// l = PIPE_BUF;) comment(// }) comment(// TRAP_BEG;) comment(// r = write(fileno(f\), RSTRING(str\)->ptr+offset, l\);) comment(// TRAP_END;) comment(// if (r == n\) return len;) comment(// if (0 <= r\) {) comment(// offset += r;) comment(// n -= r;) comment(// errno = EAGAIN;) comment(// }) comment(// if (rb_io_wait_writable(fileno(f\)\)\) {) comment(// rb_io_check_closed(fptr\);) comment(// if (offset < RSTRING(str\)->len\)) comment(// goto retry;) comment(// }) comment(// return -1L;) operator(}) comment(// TODO: handle errors in buffered write by retrying until finished or file is closed) keyword(return) ident(writeStream)operator(.)ident(fwrite)operator(()ident(buffer)operator(\))operator(;) comment(// while (errno = 0, offset += (r = fwrite(RSTRING(str\)->ptr+offset, 1, n, f\)\), (n -= r\) > 0\) {) comment(// if (ferror(f\)) comment(// \) {) comment(// if (rb_io_wait_writable(fileno(f\)\)\) {) comment(// rb_io_check_closed(fptr\);) comment(// clearerr(f\);) comment(// if (offset < RSTRING(str\)->len\)) comment(// continue;) comment(// }) comment(// return -1L;) comment(// }) comment(// }) comment(// return len - n;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_io_addstr * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_append)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(anObject)operator(\)) operator({) comment(// Claims conversion is done via 'to_s' in docs.) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(anObject)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(fileno)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** Returns the current line number. * * @return the current line number. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(lineno)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getLineNumber)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** Sets the current line number. * * @param newLineNumber The new line number. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyFixnum) ident(lineno_set)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(newLineNumber)operator(\)) operator({) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(setLineNumber)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(newLineNumber)operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getLineNumber)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** Returns the current sync mode. * * @return the current sync mode. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(sync)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(isSync)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** *

Return the process id (pid\) of the process this IO object * spawned. If no process exists (popen was not called\), then * nil is returned. This is not how it appears to be defined * but ruby 1.8 works this way.

* * @return the pid or nil */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pid)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getProcess)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(// Of course this isn't particularly useful.) type(int) ident(pid) operator(=) ident(myOpenFile)operator(.)ident(getProcess)operator(()operator(\))operator(.)ident(hashCode)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(pid)operator(\))operator(;) operator(}) comment(/** * @deprecated * @return */) directive(public) type(boolean) ident(writeDataBuffered)operator(()operator(\)) operator({) keyword(return) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(writeDataBuffered)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyFixnum) ident(pos)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(try) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fgetpos)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(bde)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyFixnum) ident(pos_set)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(newPosition)operator(\)) operator({) type(long) ident(offset) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(newPosition)operator(\))operator(;) keyword(if) operator(()ident(offset) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSystemCallError)operator(()stringoperator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(lseek)operator(()ident(offset)operator(,) ident(Stream)operator(.)ident(SEEK_SET)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(offset)operator(\))operator(;) operator(}) comment(/** Print some objects to the stream. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(print)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getLastLine)operator(()operator(\)) operator(})operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(fs) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) ident(IRubyObject) ident(rs) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(i) operator(>) integer(0) operator(&&) operator(!)ident(fs)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(fs)operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator([)ident(i)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(rs)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(rs)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(printf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyKernel)operator(.)ident(sprintf)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(args)operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(backtrace) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(putc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) type(int) ident(c) operator(=) ident(RubyNumeric)operator(.)ident(num2chr)operator(()ident(object)operator(\))operator(;) keyword(try) operator({) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fputc)operator(()ident(c)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(object)operator(;) operator(}) directive(public) ident(RubyFixnum) ident(seek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(long) ident(offset) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) type(int) ident(whence) operator(=) ident(Stream)operator(.)ident(SEEK_SET)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(whence) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(doSeek)operator(()ident(context)operator(,) ident(offset)operator(,) ident(whence)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(seek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) type(long) ident(offset) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) type(int) ident(whence) operator(=) ident(Stream)operator(.)ident(SEEK_SET)operator(;) keyword(return) ident(doSeek)operator(()ident(context)operator(,) ident(offset)operator(,) ident(whence)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(seek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) type(long) ident(offset) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg0)operator(\))operator(;) type(int) ident(whence) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(.)ident(convertToInteger)operator(()operator(\))operator(\))operator(;) keyword(return) ident(doSeek)operator(()ident(context)operator(,) ident(offset)operator(,) ident(whence)operator(\))operator(;) operator(}) directive(private) ident(RubyFixnum) ident(doSeek)operator(()ident(ThreadContext) ident(context)operator(,) type(long) ident(offset)operator(,) type(int) ident(whence)operator(\)) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenFile)operator(.)ident(seek)operator(()ident(offset)operator(,) ident(whence)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(// This was a getOpt with one mandatory arg, but it did not work) comment(// so I am parsing it for now.) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyFixnum) ident(sysseek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(long) ident(offset) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) type(long) ident(pos)operator(;) type(int) ident(whence) operator(=) ident(Stream)operator(.)ident(SEEK_SET)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(whence) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(myOpenFile)operator(.)ident(isReadable)operator(()operator(\)) operator(&&) ident(myOpenFile)operator(.)ident(isReadBuffered)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(myOpenFile)operator(.)ident(isWritable)operator(()operator(\)) operator(&&) ident(myOpenFile)operator(.)ident(isWriteBuffered)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(SYSSEEK_BUFFERED_IO)operator(,) stringoperator(\))operator(;) operator(}) ident(pos) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(lseek)operator(()ident(offset)operator(,) ident(whence)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(pos)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(rewind)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(OpenFile) ident(myOpenfile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenfile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(lseek)operator(()integer(0L)operator(,) ident(Stream)operator(.)ident(SEEK_SET)operator(\))operator(;) ident(myOpenfile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) comment(// TODO: This is some goofy global file value from MRI..what to do?) comment(// if (io == current_file\) {) comment(// gets_lineno -= fptr->lineno;) comment(// }) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoESPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) comment(// Must be back on first line on rewind.) ident(myOpenfile)operator(.)ident(setLineNumber)operator(()integer(0)operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(fsync)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkWritable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(getWriteStream)operator(()operator(\))operator(.)ident(sync)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(/** Sets the current sync mode. * * @param newSync The new sync mode. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(sync_set)operator(()ident(IRubyObject) ident(newSync)operator(\)) operator({) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(setSync)operator(()ident(newSync)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setSync)operator(()ident(newSync)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(eof_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(feof)operator(()operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(readDataBuffered)operator(()operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) ident(readCheck)operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(;) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) type(int) ident(c) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fgetc)operator(()operator(\))operator(;) keyword(if) operator(()ident(c) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(ungetc)operator(()ident(c)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) ident(myOpenFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(clearerr)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(tty_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(isatty)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileDescriptor)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\))operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(original)operator(\)) keyword(return) local_variable(this)operator(;) ident(RubyIO) ident(originalIO) operator(=) operator(()ident(RubyIO)operator(\)) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()ident(original)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_IO)operator(,) stringoperator(\))operator(;) ident(OpenFile) ident(originalFile) operator(=) ident(originalIO)operator(.)ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(OpenFile) ident(newFile) operator(=) ident(openFile)operator(;) keyword(try) operator({) comment(// TODO: I didn't see where MRI has this check, but it seems to be the right place) ident(originalFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(originalFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(lseek)operator(()integer(0)operator(,) ident(Stream)operator(.)ident(SEEK_CUR)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(originalFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(lseek)operator(()integer(0)operator(,) ident(Stream)operator(.)ident(SEEK_CUR)operator(\))operator(;) operator(}) ident(newFile)operator(.)ident(setMode)operator(()ident(originalFile)operator(.)ident(getMode)operator(()operator(\))operator(\))operator(;) ident(newFile)operator(.)ident(setProcess)operator(()ident(originalFile)operator(.)ident(getProcess)operator(()operator(\))operator(\))operator(;) ident(newFile)operator(.)ident(setLineNumber)operator(()ident(originalFile)operator(.)ident(getLineNumber)operator(()operator(\))operator(\))operator(;) ident(newFile)operator(.)ident(setPath)operator(()ident(originalFile)operator(.)ident(getPath)operator(()operator(\))operator(\))operator(;) ident(newFile)operator(.)ident(setFinalizer)operator(()ident(originalFile)operator(.)ident(getFinalizer)operator(()operator(\))operator(\))operator(;) ident(ModeFlags) ident(modes)operator(;) keyword(if) operator(()ident(newFile)operator(.)ident(isReadable)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(newFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(newFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(RDONLY)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(RDWR)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(RDONLY)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(newFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(ModeFlags)operator(.)ident(WRONLY)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modes) operator(=) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getModes)operator(()operator(\))operator(;) operator(}) operator(}) ident(ChannelDescriptor) ident(descriptor) operator(=) ident(originalFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) ident(newFile)operator(.)ident(setMainStream)operator(()ident(ChannelStream)operator(.)ident(fdopen)operator(()ident(runtime)operator(,) ident(descriptor)operator(,) ident(modes)operator(\))operator(\))operator(;) comment(// TODO: the rest of this...seeking to same position is unnecessary since we share a channel) comment(// but some of this may be needed?) comment(// fseeko(fptr->f, ftello(orig->f\), SEEK_SET\);) comment(// if (orig->f2\) {) comment(// if (fileno(orig->f\) != fileno(orig->f2\)\) {) comment(// fd = ruby_dup(fileno(orig->f2\)\);) comment(// }) comment(// fptr->f2 = rb_fdopen(fd, "w"\);) comment(// fseeko(fptr->f2, ftello(orig->f2\), SEEK_SET\);) comment(// }) comment(// if (fptr->mode & FMODE_BINMODE\) {) comment(// rb_io_binmode(dest\);) comment(// }) comment(// Register the new descriptor) ident(registerDescriptor)operator(()ident(newFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()string operator(+) ident(ex)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** Closes the IO. * * @return The IO. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(closed_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(==) pre_constant(null) operator(&&) ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\))operator(;) operator(}) comment(/** *

Closes all open resources for the IO. It also removes * it from our magical all open file descriptor pool.

* * @return The IO. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(openFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) keyword(return) ident(close2)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(close2)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(if) operator(()ident(openFile) operator(==) pre_constant(null)operator(\)) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) comment(// These would be used when we notify threads...if we notify threads) ident(interruptBlockingThreads)operator(()operator(\))operator(;) ident(ChannelDescriptor) ident(main)operator(,) ident(pipe)operator(;) keyword(if) operator(()ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(pipe) operator(=) ident(openFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(pipe) operator(=) pre_constant(null)operator(;) operator(}) ident(main) operator(=) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) comment(// cleanup, raising errors if any) ident(openFile)operator(.)ident(cleanup)operator(()ident(runtime)operator(,) pre_constant(true)operator(\))operator(;) comment(// TODO: notify threads waiting on descriptors/IO? probably not...) keyword(if) operator(()ident(openFile)operator(.)ident(getProcess)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(IRubyObject) ident(processResult) operator(=) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(openFile)operator(.)ident(getProcess)operator(()operator(\))operator(.)ident(waitFor)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(processResult)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(ie)operator(\)) operator({) comment(// TODO: do something here?) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close_write)operator(()ident(ThreadContext) ident(context)operator(\)) directive(throws) ident(BadDescriptorException) operator({) keyword(try) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null) operator(&&) ident(myOpenFile)operator(.)ident(isReadable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(close)operator(()operator(\))operator(;) operator(}) keyword(else)operator({) ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(setPipeStream)operator(()pre_constant(null)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setMode)operator(()ident(myOpenFile)operator(.)ident(getMode)operator(()operator(\)) operator(&) operator(~)ident(OpenFile)operator(.)ident(WRITABLE)operator(\))operator(;) comment(// TODO) comment(// n is result of fclose; but perhaps having a SysError below is enough?) comment(// if (n != 0\) rb_sys_fail(fptr->path\);) operator(}) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) comment(// hmmmm) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close_read)operator(()ident(ThreadContext) ident(context)operator(\)) directive(throws) ident(BadDescriptorException) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null) operator(&&) ident(myOpenFile)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(close)operator(()operator(\))operator(;) operator(}) keyword(else)operator({) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fclose)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(setMode)operator(()ident(myOpenFile)operator(.)ident(getMode)operator(()operator(\)) operator(&) operator(~)ident(OpenFile)operator(.)ident(READABLE)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setMainStream)operator(()ident(myOpenFile)operator(.)ident(getPipeStream)operator(()operator(\))operator(\))operator(;) ident(myOpenFile)operator(.)ident(setPipeStream)operator(()pre_constant(null)operator(\))operator(;) comment(// TODO) comment(// n is result of fclose; but perhaps having a SysError below is enough?) comment(// if (n != 0\) rb_sys_fail(fptr->path\);) operator(}) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) comment(// I believe Ruby bails out with a "bug" if closing fails) keyword(throw) ident(runtime)operator(.)ident(newIOErrorFromException)operator(()ident(ioe)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** Flushes the IO output stream. * * @return The IO. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyIO) ident(flush)operator(()operator(\)) operator({) keyword(try) operator({) ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getWriteStream)operator(()operator(\))operator(.)ident(fflush)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** Read a line. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(gets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ByteList) ident(separator) operator(=) ident(getSeparatorForGets)operator(()ident(runtime)operator(,) ident(args)operator(\))operator(;) ident(IRubyObject) ident(result) operator(=) ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(;) keyword(if) operator(()operator(!)ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(public) type(boolean) ident(getBlocking)operator(()operator(\)) operator({) keyword(return) operator(()operator(()ident(ChannelStream)operator(\)) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(.)ident(isBlocking)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(fcntl)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(cmd)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) comment(// TODO: This version differs from ioctl by checking whether fcntl exists) comment(// and raising notimplemented if it doesn't; perhaps no difference for us?) keyword(return) ident(ctl)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmd)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(ioctl)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(cmd) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(IRubyObject) ident(arg)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2)operator(\)) operator({) ident(arg) operator(=) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(else) operator({) ident(arg) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(ctl)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(cmd)operator(,) ident(arg)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(ctl)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(cmd)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(long) ident(realCmd) operator(=) ident(cmd)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(nArg) operator(=) integer(0)operator(;) comment(// FIXME: Arg may also be true, false, and nil and still be valid. Strangely enough, ) comment(// protocol conversion is not happening in Ruby on this arg?) keyword(if) operator(()ident(arg)operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(arg) operator(==) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(\)) operator({) ident(nArg) operator(=) integer(0)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(nArg) operator(=) ident(RubyFixnum)operator(.)ident(fix2long)operator(()ident(arg)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) operator(==) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(\)) operator({) ident(nArg) operator(=) integer(1)operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) comment(// Fixme: Only F_SETFL is current supported) keyword(if) operator(()ident(realCmd) operator(==) integer(1L)operator(\)) operator({) comment(// cmd is F_SETFL) type(boolean) ident(block) operator(=) pre_constant(true)operator(;) keyword(if) operator(()operator(()ident(nArg) operator(&) ident(ModeFlags)operator(.)ident(NONBLOCK)operator(\)) operator(==) ident(ModeFlags)operator(.)ident(NONBLOCK)operator(\)) operator({) ident(block) operator(=) pre_constant(false)operator(;) operator(}) keyword(try) operator({) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setBlocking)operator(()ident(block)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(ByteList) ident(NIL_BYTELIST) operator(=) ident(ByteList)operator(.)ident(create)operator(()stringoperator(\))operator(;) directive(private) directive(static) directive(final) ident(ByteList) ident(RECURSIVE_BYTELIST) operator(=) ident(ByteList)operator(.)ident(create)operator(()stringoperator(\))operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(puts)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(assert) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(getDefaultSeparator)operator(()operator(\)) keyword(instanceof) ident(RubyString)operator(;) ident(RubyString) ident(separator) operator(=) operator(()ident(RubyString)operator(\)) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(getDefaultSeparator)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(write)operator(()ident(context)operator(,) ident(separator)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(ByteList) ident(line)operator(;) keyword(if) operator(()ident(args)operator([)ident(i)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(line) operator(=) ident(NIL_BYTELIST)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\)) operator({) ident(line) operator(=) ident(RECURSIVE_BYTELIST)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyArray)operator(\)) operator({) ident(inspectPuts)operator(()ident(context)operator(,) operator(()ident(RubyArray)operator(\)) ident(args)operator([)ident(i)operator(])operator(\))operator(;) keyword(continue)operator(;) operator(}) keyword(else) operator({) ident(line) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(asString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) ident(write)operator(()ident(context)operator(,) ident(line)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0) operator(||) operator(!)ident(line)operator(.)ident(endsWith)operator(()ident(separator)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(\)) operator({) ident(write)operator(()ident(context)operator(,) ident(separator)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(write)operator(()ident(ThreadContext) ident(context)operator(,) ident(ByteList) ident(byteList)operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(byteList)operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(inspectPuts)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyArray) ident(array)operator(\)) operator({) keyword(try) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()ident(array)operator(\))operator(;) keyword(return) ident(puts)operator(()ident(context)operator(,) ident(array)operator(.)ident(toJavaArray)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()ident(array)operator(\))operator(;) operator(}) operator(}) comment(/** Read a line. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(readline)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(line)operator(;) operator(}) comment(/** Read a byte. On EOF returns nil. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(getc)operator(()operator(\)) operator({) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) ident(Stream) ident(stream) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(;) ident(readCheck)operator(()ident(stream)operator(\))operator(;) ident(stream)operator(.)ident(clearerr)operator(()operator(\))operator(;) type(int) ident(c) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fgetc)operator(()operator(\))operator(;) keyword(if) operator(()ident(c) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// TODO: check for ferror, clear it, and try once more up above readCheck) comment(// if (ferror(f\)\) {) comment(// clearerr(f\);) comment(// if (!rb_io_wait_readable(fileno(f\)\)\)) comment(// rb_sys_fail(fptr->path\);) comment(// goto retry;) comment(// }) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(c)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(readCheck)operator(()ident(Stream) ident(stream)operator(\)) operator({) keyword(if) operator(()operator(!)ident(stream)operator(.)ident(readDataBuffered)operator(()operator(\))operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** *

Pushes char represented by int back onto IOS.

* * @param number to push back */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(ungetc)operator(()ident(IRubyObject) ident(number)operator(\)) operator({) type(int) ident(ch) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(number)operator(\))operator(;) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(myOpenFile)operator(.)ident(isReadBuffered)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(ungetc)operator(()ident(ch)operator(\)) operator(==) operator(-)integer(1) operator(&&) ident(ch) operator(!=) operator(-)integer(1)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(read_nonblock)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(openFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) keyword(instanceof) ident(ChannelStream)operator(\))operator(\)) operator({) comment(// cryptic for the uninitiated...) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) type(int) ident(maxLength) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(maxLength) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(maxLength) operator(+) stringoperator(\))operator(;) operator(}) ident(ByteList) ident(buf) operator(=) operator(()operator(()ident(ChannelStream)operator(\))ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(.)ident(readnonblock)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(\))operator(;) ident(IRubyObject) ident(strbuf) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buf) operator(==) pre_constant(null) operator(?) keyword(new) ident(ByteList)operator(()ident(ByteList)operator(.)ident(NULL_ARRAY)operator(\)) operator(:) ident(buf)operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(args)operator([)integer(1)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LSHIFT)operator(,) stringoperator(,) ident(strbuf)operator(\))operator(;) keyword(return) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(return) ident(strbuf)operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(readpartial)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(openFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\)) keyword(instanceof) ident(ChannelStream)operator(\))operator(\)) operator({) comment(// cryptic for the uninitiated...) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) type(int) ident(maxLength) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(maxLength) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(maxLength) operator(+) stringoperator(\))operator(;) operator(}) ident(ByteList) ident(buf) operator(=) operator(()operator(()ident(ChannelStream)operator(\))ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(.)ident(readpartial)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(\))operator(;) ident(IRubyObject) ident(strbuf) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buf) operator(==) pre_constant(null) operator(?) keyword(new) ident(ByteList)operator(()ident(ByteList)operator(.)ident(NULL_ARRAY)operator(\)) operator(:) ident(buf)operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(args)operator([)integer(1)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LSHIFT)operator(,) stringoperator(,) ident(strbuf)operator(\))operator(;) keyword(return) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(return) ident(strbuf)operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(sysread)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(int) ident(len) operator(=) operator(()type(int)operator(\))ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(try) operator({) ident(RubyString) ident(str)operator(;) ident(ByteList) ident(buffer)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1) operator(||) ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(\))operator(;) operator(}) ident(buffer) operator(=) keyword(new) ident(ByteList)operator(()ident(len)operator(\))operator(;) ident(str) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(buffer)operator(\))operator(;) operator(}) keyword(else) operator({) ident(str) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(str)operator(.)ident(modify)operator(()ident(len)operator(\))operator(;) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) ident(buffer) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(readDataBuffered)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) comment(// TODO: Ruby locks the string here) ident(context)operator(.)ident(getThread)operator(()operator(\))operator(.)ident(beforeBlockingCall)operator(()operator(\))operator(;) ident(myOpenFile)operator(.)ident(checkClosed)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) comment(// TODO: Ruby re-checks that the buffer string hasn't been modified) type(int) ident(bytesRead) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(read)operator(()ident(len)operator(,) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) comment(// TODO: Ruby unlocks the string here) comment(// TODO: Ruby truncates string to specific size here, but our bytelist should handle this already?) keyword(if) operator(()ident(bytesRead) operator(==) operator(-)integer(1) operator(||) operator(()ident(bytesRead) operator(==) integer(0) operator(&&) ident(len) operator(>) integer(0)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) comment(// All errors to sysread should be SystemCallErrors, but on a closed stream) comment(// Ruby returns an IOError. Java throws same exception for all errors so) comment(// we resort to this hack...) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSystemCallError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(getThread)operator(()operator(\))operator(.)ident(afterBlockingCall)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) ident(IRubyObject) ident(read)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(read)operator(()ident(context)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(read)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(read)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(2)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) keyword(return) ident(readAll)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(if) operator(()ident(arg0)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(read)operator(()ident(context)operator(\))operator(;) operator(}) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) type(int) ident(length) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(length) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(length) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyString) ident(str) operator(=) pre_constant(null)operator(;) keyword(return) ident(readNotAll)operator(()ident(context)operator(,) ident(myOpenFile)operator(,) ident(length)operator(,) ident(str)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(if) operator(()ident(arg0)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) keyword(return) ident(readAll)operator(()ident(arg1)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) operator(}) type(int) ident(length) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(length) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(length) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyString) ident(str) operator(=) pre_constant(null)operator(;) comment(// ByteList buffer = null;) keyword(if) operator(()ident(arg1)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) comment(// buffer = new ByteList(length\);) comment(// str = RubyString.newString(getRuntime(\), buffer\);) operator(}) keyword(else) operator({) ident(str) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(str)operator(.)ident(modify)operator(()ident(length)operator(\))operator(;) keyword(if) operator(()ident(length) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) comment(// buffer = str.getByteList(\);) operator(}) keyword(return) ident(readNotAll)operator(()ident(context)operator(,) ident(myOpenFile)operator(,) ident(length)operator(,) ident(str)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(readNotAll)operator(()ident(ThreadContext) ident(context)operator(,) ident(OpenFile) ident(myOpenFile)operator(,) type(int) ident(length)operator(,) ident(RubyString) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(feof)operator(()operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(// TODO: Ruby locks the string here) comment(// READ_CHECK from MRI io.c) ident(readCheck)operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(\))operator(;) comment(// TODO: check buffer length again?) comment(// if (RSTRING(str\)->len != len\) {) comment(// rb_raise(rb_eRuntimeError, "buffer string modified"\);) comment(// }) comment(// TODO: read into buffer using all the fread logic) comment(// int read = openFile.getMainStream(\).fread(buffer\);) ident(ByteList) ident(newBuffer) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fread)operator(()ident(length)operator(\))operator(;) comment(// TODO: Ruby unlocks the string here) comment(// TODO: change this to check number read into buffer once that's working) comment(// if (read == 0\) {) keyword(if) operator(()ident(newBuffer) operator(==) pre_constant(null) operator(||) ident(newBuffer)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(feof)operator(()operator(\))operator(\)) operator({) comment(// truncate buffer string to zero, if provided) keyword(if) operator(()ident(str) operator(!=) pre_constant(null)operator(\)) operator({) ident(str)operator(.)ident(setValue)operator(()ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(.)ident(dup)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(// Removed while working on JRUBY-2386, since fixes for that) comment(// modified EOF logic such that this check is not really valid.) comment(// We expect that an EOFException will be thrown now in EOF) comment(// cases.) comment(// if (length > 0\) {) comment(// // I think this is only partly correct; sys fail based on errno in Ruby) comment(// throw getRuntime(\).newEOFError(\);) comment(// }) operator(}) comment(// TODO: Ruby truncates string to specific size here, but our bytelist should handle this already?) comment(// FIXME: I don't like the null checks here) keyword(if) operator(()ident(str) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(newBuffer) operator(==) pre_constant(null)operator(\)) operator({) ident(str) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) operator({) ident(str) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(newBuffer)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(newBuffer) operator(==) pre_constant(null)operator(\)) operator({) ident(str)operator(.)ident(empty)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(str)operator(.)ident(setValue)operator(()ident(newBuffer)operator(\))operator(;) operator(}) operator(}) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOErrorFromException)operator(()ident(ex)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) operator(}) directive(protected) ident(IRubyObject) ident(readAll)operator(()ident(IRubyObject) ident(buffer)operator(\)) directive(throws) ident(BadDescriptorException)operator(,) exception(EOFException)operator(,) exception(IOException) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) comment(// TODO: handle writing into original buffer better) ident(RubyString) ident(str) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(buffer) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(str) operator(=) operator(()ident(RubyString)operator(\))ident(buffer)operator(;) operator(}) comment(// TODO: ruby locks the string here) comment(// READ_CHECK from MRI io.c) keyword(if) operator(()ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(readDataBuffered)operator(()operator(\))operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(runtime)operator(\))operator(;) operator(}) ident(ByteList) ident(newBuffer) operator(=) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(readall)operator(()operator(\))operator(;) comment(// TODO same zero-length checks as file above) keyword(if) operator(()ident(str) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(newBuffer) operator(==) pre_constant(null)operator(\)) operator({) ident(str) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) operator({) ident(str) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(newBuffer)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(newBuffer) operator(==) pre_constant(null)operator(\)) operator({) ident(str)operator(.)ident(empty)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(str)operator(.)ident(setValue)operator(()ident(newBuffer)operator(\))operator(;) operator(}) operator(}) ident(str)operator(.)ident(taint)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) keyword(return) ident(str)operator(;) comment(// long bytes = 0;) comment(// long n;) comment(//) comment(// if (siz == 0\) siz = BUFSIZ;) comment(// if (NIL_P(str\)\) {) comment(// str = rb_str_new(0, siz\);) comment(// }) comment(// else {) comment(// rb_str_resize(str, siz\);) comment(// }) comment(// for (;;\) {) comment(// rb_str_locktmp(str\);) comment(// READ_CHECK(fptr->f\);) comment(// n = io_fread(RSTRING(str\)->ptr+bytes, siz-bytes, fptr\);) comment(// rb_str_unlocktmp(str\);) comment(// if (n == 0 && bytes == 0\) {) comment(// if (!fptr->f\) break;) comment(// if (feof(fptr->f\)\) break;) comment(// if (!ferror(fptr->f\)\) break;) comment(// rb_sys_fail(fptr->path\);) comment(// }) comment(// bytes += n;) comment(// if (bytes < siz\) break;) comment(// siz += BUFSIZ;) comment(// rb_str_resize(str, siz\);) comment(// }) comment(// if (bytes != siz\) rb_str_resize(str, bytes\);) comment(// OBJ_TAINT(str\);) comment(//) comment(// return str;) operator(}) comment(// TODO: There's a lot of complexity here due to error handling and) comment(// nonblocking IO; much of this goes away, but for now I'm just) comment(// having read call ChannelStream.fread directly.) comment(// protected int fread(int len, ByteList buffer\) {) comment(// long n = len;) comment(// int c;) comment(// int saved_errno;) comment(//) comment(// while (n > 0\) {) comment(// c = read_buffered_data(ptr, n, fptr->f\);) comment(// if (c < 0\) goto eof;) comment(// if (c > 0\) {) comment(// ptr += c;) comment(// if ((n -= c\) <= 0\) break;) comment(// }) comment(// rb_thread_wait_fd(fileno(fptr->f\)\);) comment(// rb_io_check_closed(fptr\);) comment(// clearerr(fptr->f\);) comment(// TRAP_BEG;) comment(// c = getc(fptr->f\);) comment(// TRAP_END;) comment(// if (c == EOF\) {) comment(// eof:) comment(// if (ferror(fptr->f\)\) {) comment(// switch (errno\) {) comment(// case EINTR:) comment(// #if defined(ERESTART\)) comment(// case ERESTART:) comment(// #endif) comment(// clearerr(fptr->f\);) comment(// continue;) comment(// case EAGAIN:) comment(// #if defined(EWOULDBLOCK\) && EWOULDBLOCK != EAGAIN) comment(// case EWOULDBLOCK:) comment(// #endif) comment(// if (len > n\) {) comment(// clearerr(fptr->f\);) comment(// }) comment(// saved_errno = errno;) comment(// rb_warning("nonblocking IO#read is obsolete; use IO#readpartial or IO#sysread"\);) comment(// errno = saved_errno;) comment(// }) comment(// if (len == n\) return 0;) comment(// }) comment(// break;) comment(// }) comment(// *ptr++ = c;) comment(// n--;) comment(// }) comment(// return len - n;) comment(// ) comment(// }) comment(/** Read a byte. On EOF throw EOFError. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(readchar)operator(()operator(\)) operator({) ident(IRubyObject) ident(c) operator(=) ident(getc)operator(()operator(\))operator(;) keyword(if) operator(()ident(c)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(c)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(stat)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(openFile)operator(.)ident(checkClosed)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(getOpenFileChecked)operator(()operator(\))operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileDescriptor)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** *

Invoke a block for each byte.

*/) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_byte)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(try) operator({) ident(OpenFile) ident(myOpenFile) operator(=) ident(getOpenFileChecked)operator(()operator(\))operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) ident(myOpenFile)operator(.)ident(checkReadable)operator(()ident(runtime)operator(\))operator(;) ident(myOpenFile)operator(.)ident(setReadBuffered)operator(()operator(\))operator(;) comment(// TODO: READ_CHECK from MRI) type(int) ident(c) operator(=) ident(myOpenFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(fgetc)operator(()operator(\))operator(;) keyword(if) operator(()ident(c) operator(==) operator(-)integer(1)operator(\)) operator({) comment(// TODO: check for error, clear it, and wait until readable before trying once more) comment(// if (ferror(f\)\) {) comment(// clearerr(f\);) comment(// if (!rb_io_wait_readable(fileno(f\)\)\)) comment(// rb_sys_fail(fptr->path\);) comment(// continue;) comment(// }) keyword(break)operator(;) operator(}) keyword(assert) ident(c) operator(<) integer(256)operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(c)operator(\))operator(\))operator(;) operator(}) comment(// TODO: one more check for error) comment(// if (ferror(f\)\) rb_sys_fail(fptr->path\);) keyword(return) local_variable(this)operator(;) operator(}) keyword(catch) operator(()ident(PipeException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEPIPEError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(BadDescriptorException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEBADFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** *

Invoke a block for each line.

*/) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyIO) ident(each_line)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ByteList) ident(separator) operator(=) ident(getSeparatorForGets)operator(()ident(runtime)operator(,) ident(args)operator(\))operator(;) keyword(for) operator(()ident(IRubyObject) ident(line) operator(=) ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(;) operator(!)ident(line)operator(.)ident(isNil)operator(()operator(\))operator(;) ident(line) operator(=) ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(line)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(readlines)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject)type([]) ident(separatorArgs) operator(=) ident(args)operator(.)ident(length) operator(>) integer(0) operator(?) keyword(new) ident(IRubyObject)type([]) operator({) ident(args)operator([)integer(0)operator(]) operator(}) operator(:) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(;) ident(ByteList) ident(separator) operator(=) ident(getSeparatorForGets)operator(()ident(runtime)operator(,) ident(separatorArgs)operator(\))operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(line)operator(;) keyword(while) operator(()operator(!) operator(()ident(line) operator(=) ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(line)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyIO) ident(to_io)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) pre_type(String) ident(toString)operator(()operator(\)) operator({) keyword(return) string operator(+) ident(openFile)operator(.)ident(getMode)operator(()operator(\)) operator(+) string operator(+) ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(.)ident(getFileno)operator(()operator(\)) operator(+) stringoperator(;) operator(}) comment(/* class methods for IO */) comment(/** rb_io_s_foreach * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(foreach)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(count) operator(=) ident(args)operator(.)ident(length)operator(;) ident(IRubyObject) ident(filename) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(filename)operator(\))operator(;) ident(ByteList) ident(separator) operator(=) ident(getSeparatorFromArgs)operator(()ident(runtime)operator(,) ident(args)operator(,) integer(1)operator(\))operator(;) ident(RubyIO) ident(io) operator(=) operator(()ident(RubyIO)operator(\))ident(RubyFile)operator(.)ident(open)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(filename) operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(if) operator(()operator(!)ident(io)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(IRubyObject) ident(str) operator(=) ident(io)operator(.)ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(;) keyword(while) operator(()operator(!)ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(str)operator(\))operator(;) ident(str) operator(=) ident(io)operator(.)ident(getline)operator(()ident(runtime)operator(,) ident(separator)operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(io)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) ident(RubyIO) ident(convertToIO)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) operator(()ident(RubyIO)operator(\))ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(obj)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getIO)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_IO)operator(,) stringoperator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(registerSelect)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(Selector) ident(selector)operator(,) ident(IRubyObject) ident(obj)operator(,) ident(RubyIO) ident(ioObj)operator(,) type(int) ident(ops)operator(\)) directive(throws) exception(IOException) operator({) pre_type(Channel) ident(channel) operator(=) ident(ioObj)operator(.)ident(getChannel)operator(()operator(\))operator(;) keyword(if) operator(()ident(channel) operator(==) pre_constant(null) operator(||) operator(!)operator(()ident(channel) keyword(instanceof) pre_type(SelectableChannel)operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(configureBlocking)operator(()pre_constant(false)operator(\))operator(;) type(int) ident(real_ops) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(validOps)operator(()operator(\)) operator(&) ident(ops)operator(;) pre_type(SelectionKey) ident(key) operator(=) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(keyFor)operator(()ident(selector)operator(\))operator(;) keyword(if) operator(()ident(key) operator(==) pre_constant(null)operator(\)) operator({) operator(()operator(()pre_type(SelectableChannel)operator(\)) ident(channel)operator(\))operator(.)ident(register)operator(()ident(selector)operator(,) ident(real_ops)operator(,) ident(obj)operator(\))operator(;) operator(}) keyword(else) operator({) ident(key)operator(.)ident(interestOps)operator(()ident(key)operator(.)ident(interestOps)operator(()operator(\))operator(|)ident(real_ops)operator(\))operator(;) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(3)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(select_static)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(checkArrayType)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(obj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(IRubyObject) ident(select_static)operator(()ident(ThreadContext) ident(context)operator(,) ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(try) operator({) pre_type(Set) ident(pending) operator(=) keyword(new) pre_type(HashSet)operator(()operator(\))operator(;) pre_type(Set) ident(unselectable_reads) operator(=) keyword(new) pre_type(HashSet)operator(()operator(\))operator(;) pre_type(Set) ident(unselectable_writes) operator(=) keyword(new) pre_type(HashSet)operator(()operator(\))operator(;) pre_type(Selector) ident(selector) operator(=) pre_type(Selector)operator(.)ident(open)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) comment(// read) ident(checkArrayType)operator(()ident(runtime)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) operator(()ident(IRubyObject)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) ident(RubyIO) ident(ioObj) operator(=) ident(convertToIO)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) keyword(if) operator(()ident(registerSelect)operator(()ident(context)operator(,) ident(selector)operator(,) ident(obj)operator(,) ident(ioObj)operator(,) pre_type(SelectionKey)operator(.)ident(OP_READ) operator(|) pre_type(SelectionKey)operator(.)ident(OP_ACCEPT)operator(\))operator(\)) operator({) keyword(if) operator(()ident(ioObj)operator(.)ident(writeDataBuffered)operator(()operator(\))operator(\)) operator({) ident(pending)operator(.)ident(add)operator(()ident(obj)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()operator(() ident(ioObj)operator(.)ident(openFile)operator(.)ident(getMode)operator(()operator(\)) operator(&) ident(OpenFile)operator(.)ident(READABLE) operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(unselectable_reads)operator(.)ident(add)operator(()ident(obj)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1) operator(&&) operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) comment(// write) ident(checkArrayType)operator(()ident(runtime)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) operator(()operator(()ident(RubyArray)operator(\)) ident(args)operator([)integer(1)operator(])operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) operator(()ident(IRubyObject)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) ident(RubyIO) ident(ioObj) operator(=) ident(convertToIO)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) keyword(if) operator(()operator(!)ident(registerSelect)operator(()ident(context)operator(,) ident(selector)operator(,) ident(obj)operator(,) ident(ioObj)operator(,) pre_type(SelectionKey)operator(.)ident(OP_WRITE)operator(\))operator(\)) operator({) keyword(if) operator(()operator(() ident(ioObj)operator(.)ident(openFile)operator(.)ident(getMode)operator(()operator(\)) operator(&) ident(OpenFile)operator(.)ident(WRITABLE) operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(unselectable_writes)operator(.)ident(add)operator(()ident(obj)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2) operator(&&) operator(!)ident(args)operator([)integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(checkArrayType)operator(()ident(runtime)operator(,) ident(args)operator([)integer(2)operator(])operator(\))operator(;) comment(// Java's select doesn't do anything about this, so we leave it be.) operator(}) directive(final) type(boolean) ident(has_timeout) operator(=) operator(() ident(args)operator(.)ident(length) operator(>) integer(3) operator(&&) operator(!)ident(args)operator([)integer(3)operator(])operator(.)ident(isNil)operator(()operator(\)) operator(\))operator(;) type(long) ident(timeout) operator(=) integer(0)operator(;) keyword(if)operator(()ident(has_timeout)operator(\)) operator({) ident(IRubyObject) ident(timeArg) operator(=) ident(args)operator([)integer(3)operator(])operator(;) keyword(if) operator(()ident(timeArg) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(timeout) operator(=) pre_type(Math)operator(.)ident(round)operator(()operator(()operator(()ident(RubyFloat)operator(\)) ident(timeArg)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(timeArg) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(timeout) operator(=) pre_type(Math)operator(.)ident(round)operator(()operator(()operator(()ident(RubyFixnum)operator(\)) ident(timeArg)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) operator(}) keyword(else) operator({) comment(// TODO: MRI also can hadle Bignum here) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(timeArg)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(timeout) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(pending)operator(.)ident(isEmpty)operator(()operator(\)) operator(&&) ident(unselectable_reads)operator(.)ident(isEmpty)operator(()operator(\)) operator(&&) ident(unselectable_writes)operator(.)ident(isEmpty)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(has_timeout)operator(\)) operator({) keyword(if) operator(()ident(timeout)operator(==)integer(0)operator(\)) operator({) ident(selector)operator(.)ident(selectNow)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(selector)operator(.)ident(select)operator(()ident(timeout)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(selector)operator(.)ident(select)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(selector)operator(.)ident(selectNow)operator(()operator(\))operator(;) operator(}) pre_type(List) ident(r) operator(=) keyword(new) pre_type(ArrayList)operator(()operator(\))operator(;) pre_type(List) ident(w) operator(=) keyword(new) pre_type(ArrayList)operator(()operator(\))operator(;) pre_type(List) ident(e) operator(=) keyword(new) pre_type(ArrayList)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) ident(selector)operator(.)ident(selectedKeys)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) pre_type(SelectionKey) ident(key) operator(=) operator(()pre_type(SelectionKey)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(key)operator(.)ident(interestOps)operator(()operator(\)) operator(&) ident(key)operator(.)ident(readyOps)operator(()operator(\)) operator(&) operator(()pre_type(SelectionKey)operator(.)ident(OP_READ)operator(|)pre_type(SelectionKey)operator(.)ident(OP_ACCEPT)operator(|)pre_type(SelectionKey)operator(.)ident(OP_CONNECT)operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(r)operator(.)ident(add)operator(()ident(key)operator(.)ident(attachment)operator(()operator(\))operator(\))operator(;) ident(pending)operator(.)ident(remove)operator(()ident(key)operator(.)ident(attachment)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(()ident(key)operator(.)ident(interestOps)operator(()operator(\)) operator(&) ident(key)operator(.)ident(readyOps)operator(()operator(\)) operator(&) operator(()pre_type(SelectionKey)operator(.)ident(OP_WRITE)operator(\))operator(\)) operator(!=) integer(0)operator(\)) operator({) ident(w)operator(.)ident(add)operator(()ident(key)operator(.)ident(attachment)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) ident(r)operator(.)ident(addAll)operator(()ident(pending)operator(\))operator(;) ident(r)operator(.)ident(addAll)operator(()ident(unselectable_reads)operator(\))operator(;) ident(w)operator(.)ident(addAll)operator(()ident(unselectable_writes)operator(\))operator(;) comment(// make all sockets blocking as configured again) keyword(for) operator(()pre_type(Iterator) ident(i) operator(=) ident(selector)operator(.)ident(keys)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) pre_type(SelectionKey) ident(key) operator(=) operator(()pre_type(SelectionKey)operator(\)) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) pre_type(SelectableChannel) ident(channel) operator(=) ident(key)operator(.)ident(channel)operator(()operator(\))operator(;) directive(synchronized)operator(()ident(channel)operator(.)ident(blockingLock)operator(()operator(\))operator(\)) operator({) ident(RubyIO) ident(originalIO) operator(=) operator(()ident(RubyIO)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(() operator(()ident(IRubyObject)operator(\)) ident(key)operator(.)ident(attachment)operator(()operator(\))operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_IO)operator(,) stringoperator(\))operator(;) type(boolean) ident(blocking) operator(=) ident(originalIO)operator(.)ident(getBlocking)operator(()operator(\))operator(;) ident(key)operator(.)ident(cancel)operator(()operator(\))operator(;) ident(channel)operator(.)ident(configureBlocking)operator(()ident(blocking)operator(\))operator(;) operator(}) operator(}) ident(selector)operator(.)ident(close)operator(()operator(\))operator(;) keyword(if) operator(()ident(r)operator(.)ident(size)operator(()operator(\)) operator(==) integer(0) operator(&&) ident(w)operator(.)ident(size)operator(()operator(\)) operator(==) integer(0) operator(&&) ident(e)operator(.)ident(size)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) pre_type(List) ident(ret) operator(=) keyword(new) pre_type(ArrayList)operator(()operator(\))operator(;) ident(ret)operator(.)ident(add)operator(()ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(r)operator(\))operator(\))operator(;) ident(ret)operator(.)ident(add)operator(()ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(w)operator(\))operator(\))operator(;) ident(ret)operator(.)ident(add)operator(()ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(e)operator(\))operator(\))operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(runtime)operator(,) ident(ret)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOError)operator(()ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(read)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(read)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(3)operator(:) keyword(return) ident(read)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(3)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject)type([]) ident(fileArguments) operator(=) keyword(new) ident(IRubyObject)type([]) operator({)ident(arg0)operator(})operator(;) ident(RubyIO) ident(file) operator(=) operator(()ident(RubyIO)operator(\)) ident(RubyKernel)operator(.)ident(open)operator(()ident(context)operator(,) ident(recv)operator(,) ident(fileArguments)operator(,) ident(block)operator(\))operator(;) keyword(try) operator({) keyword(return) ident(file)operator(.)ident(read)operator(()ident(context)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(file)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject)type([]) ident(fileArguments) operator(=) keyword(new) ident(IRubyObject)type([]) operator({)ident(arg0)operator(})operator(;) ident(RubyIO) ident(file) operator(=) operator(()ident(RubyIO)operator(\)) ident(RubyKernel)operator(.)ident(open)operator(()ident(context)operator(,) ident(recv)operator(,) ident(fileArguments)operator(,) ident(block)operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()operator(!)ident(arg1)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(file)operator(.)ident(read)operator(()ident(context)operator(,) ident(arg1)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(file)operator(.)ident(read)operator(()ident(context)operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(file)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(read)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject)type([]) ident(fileArguments) operator(=) keyword(new) ident(IRubyObject)type([])operator({)ident(arg0)operator(})operator(;) ident(RubyIO) ident(file) operator(=) operator(()ident(RubyIO)operator(\)) ident(RubyKernel)operator(.)ident(open)operator(()ident(context)operator(,) ident(recv)operator(,) ident(fileArguments)operator(,) ident(block)operator(\))operator(;) keyword(if) operator(()operator(!)ident(arg2)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(file)operator(.)ident(seek)operator(()ident(context)operator(,) ident(arg2)operator(\))operator(;) operator(}) keyword(try) operator({) keyword(if) operator(()operator(!)ident(arg1)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(file)operator(.)ident(read)operator(()ident(context)operator(,) ident(arg1)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(file)operator(.)ident(read)operator(()ident(context)operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(file)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(readlines)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(count) operator(=) ident(args)operator(.)ident(length)operator(;) ident(IRubyObject)type([]) ident(fileArguments) operator(=) keyword(new) ident(IRubyObject)type([])operator({) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\)) operator(})operator(;) ident(IRubyObject)type([]) ident(separatorArguments) operator(=) ident(count) operator(>=) integer(2) operator(?) keyword(new) ident(IRubyObject)type([])operator({)ident(args)operator([)integer(1)operator(])operator(}) operator(:) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(;) ident(RubyIO) ident(file) operator(=) operator(()ident(RubyIO)operator(\)) ident(RubyKernel)operator(.)ident(open)operator(()ident(context)operator(,) ident(recv)operator(,) ident(fileArguments)operator(,) ident(block)operator(\))operator(;) keyword(try) operator({) keyword(return) ident(file)operator(.)ident(readlines)operator(()ident(context)operator(,) ident(separatorArguments)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(file)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(popen)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(mode)operator(;) ident(IRubyObject) ident(cmdObj) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(cmdObj)operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(cmdObj)operator(.)ident(toString)operator(()operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(mode) operator(=) ident(ModeFlags)operator(.)ident(RDONLY)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(mode) operator(=) ident(RubyFixnum)operator(.)ident(num2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(mode) operator(=) ident(getIOModesIntFromString)operator(()ident(runtime)operator(,) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) ident(ModeFlags) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(mode)operator(\))operator(;) ident(ShellLauncher)operator(.)ident(POpenProcess) ident(process) operator(=) ident(ShellLauncher)operator(.)ident(popen)operator(()ident(runtime)operator(,) ident(cmdObj)operator(,) ident(modes)operator(\))operator(;) ident(RubyIO) ident(io) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(process)operator(,) ident(modes)operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(io)operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(if) operator(()ident(io)operator(.)ident(openFile)operator(.)ident(isOpen)operator(()operator(\))operator(\)) operator({) ident(io)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) operator(()ident(process)operator(.)ident(waitFor)operator(()operator(\)) operator(*) integer(256)operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(io)operator(;) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(ex)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newIOErrorFromException)operator(()ident(e)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(// NIO based pipe) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(pipe)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) directive(throws) exception(Exception) operator({) comment(// TODO: This isn't an exact port of MRI's pipe behavior, so revisit) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Pipe) ident(pipe) operator(=) pre_type(Pipe)operator(.)ident(open)operator(()operator(\))operator(;) ident(RubyIO) ident(source) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(pipe)operator(.)ident(source)operator(()operator(\))operator(\))operator(;) ident(RubyIO) ident(sink) operator(=) keyword(new) ident(RubyIO)operator(()ident(runtime)operator(,) ident(pipe)operator(.)ident(sink)operator(()operator(\))operator(\))operator(;) ident(sink)operator(.)ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(setSync)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArrayNoCopy)operator(()keyword(new) ident(IRubyObject)type([]) operator({) ident(source)operator(,) ident(sink) operator(})operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(compat) operator(=) ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(copy_stream)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(stream1)operator(,) ident(IRubyObject) ident(stream2)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyIO) ident(io1) operator(=) operator(()ident(RubyIO)operator(\))ident(stream1)operator(;) ident(RubyIO) ident(io2) operator(=) operator(()ident(RubyIO)operator(\))ident(stream2)operator(;) ident(ChannelDescriptor) ident(d1) operator(=) ident(io1)operator(.)ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(d1)operator(.)ident(isSeekable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(ChannelDescriptor) ident(d2) operator(=) ident(io2)operator(.)ident(openFile)operator(.)ident(getMainStream)operator(()operator(\))operator(.)ident(getDescriptor)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(d2)operator(.)ident(isSeekable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) pre_type(FileChannel) ident(f1) operator(=) operator(()pre_type(FileChannel)operator(\))ident(d1)operator(.)ident(getChannel)operator(()operator(\))operator(;) pre_type(FileChannel) ident(f2) operator(=) operator(()pre_type(FileChannel)operator(\))ident(d2)operator(.)ident(getChannel)operator(()operator(\))operator(;) type(long) ident(size) operator(=) ident(f1)operator(.)ident(size)operator(()operator(\))operator(;) ident(f1)operator(.)ident(transferTo)operator(()ident(f2)operator(.)ident(position)operator(()operator(\))operator(,) ident(size)operator(,) ident(f2)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(size)operator(\))operator(;) operator(}) comment(/** * Add a thread to the list of blocking threads for this IO. * * @param thread A thread blocking on this IO */) directive(public) directive(synchronized) type(void) ident(addBlockingThread)operator(()ident(RubyThread) ident(thread)operator(\)) operator({) keyword(if) operator(()ident(blockingThreads) operator(==) pre_constant(null)operator(\)) operator({) ident(blockingThreads) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(RubyThread)operator(>)operator(()integer(1)operator(\))operator(;) operator(}) ident(blockingThreads)operator(.)ident(add)operator(()ident(thread)operator(\))operator(;) operator(}) comment(/** * Remove a thread from the list of blocking threads for this IO. * * @param thread A thread blocking on this IO */) directive(public) directive(synchronized) type(void) ident(removeBlockingThread)operator(()ident(RubyThread) ident(thread)operator(\)) operator({) keyword(if) operator(()ident(blockingThreads) operator(==) pre_constant(null)operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(blockingThreads)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(blockingThreads)operator(.)ident(get)operator(()ident(i)operator(\)) operator(==) ident(thread)operator(\)) operator({) comment(// not using remove(Object\) here to avoid the equals(\) call) ident(blockingThreads)operator(.)ident(remove)operator(()ident(i)operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** * Fire an IOError in all threads blocking on this IO object */) directive(protected) directive(synchronized) type(void) ident(interruptBlockingThreads)operator(()operator(\)) operator({) keyword(if) operator(()ident(blockingThreads) operator(==) pre_constant(null)operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(blockingThreads)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyThread) ident(thread) operator(=) ident(blockingThreads)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) comment(// raise will also wake the thread from selection) ident(thread)operator(.)ident(raise)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(.)ident(getException)operator(()operator(\))operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2005 Thomas E Enebo * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.PrintWriter)operator(;) keyword(import) include(java.io.StringWriter)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.ast.ArgsNode)operator(;) keyword(import) include(org.jruby.ast.ArgumentNode)operator(;) keyword(import) include(org.jruby.ast.ListNode)operator(;) keyword(import) include(org.jruby.ast.LocalAsgnNode)operator(;) keyword(import) include(org.jruby.javasupport.Java)operator(;) keyword(import) include(org.jruby.javasupport.JavaObject)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.load.Library)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.ast.Node)operator(;) keyword(import) include(org.jruby.compiler.ASTInspector)operator(;) keyword(import) include(org.jruby.compiler.ASTCompiler)operator(;) keyword(import) include(org.jruby.compiler.impl.StandardASMCompiler)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.MethodArgs)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.runtime.InterpretedBlock)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) keyword(import) include(org.objectweb.asm.ClassReader)operator(;) keyword(import) include(org.objectweb.asm.util.TraceClassVisitor)operator(;) comment(/** * Module which defines JRuby-specific methods for use. */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyJRuby) operator({) directive(public) directive(static) ident(RubyModule) ident(createJRuby)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyModule) ident(jrubyModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(jrubyModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyJRuby)operator(.)ident(class)operator(\))operator(;) ident(RubyClass) ident(compiledScriptClass) operator(=) ident(jrubyModule)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(compiledScriptClass)operator(.)ident(attr_accessor)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(})operator(\))operator(;) ident(compiledScriptClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(JRubyCompiledScript)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(jrubyModule)operator(;) operator(}) directive(public) directive(static) ident(RubyModule) ident(createJRubyExt)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyModule) ident(mJRubyExt) operator(=) ident(runtime)operator(.)ident(getOrCreateModule)operator(()stringoperator(\))operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) ident(mJRubyExt)operator(.)ident(defineAnnotatedMethods)operator(()ident(JRubyExtensions)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(includeModule)operator(()ident(mJRubyExt)operator(\))operator(;) keyword(return) ident(mJRubyExt)operator(;) operator(}) directive(public) directive(static) type(class) class(ExtLibrary) directive(implements) ident(Library) operator({) directive(public) type(void) ident(load)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(wrap)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyJRuby)operator(.)ident(createJRubyExt)operator(()ident(runtime)operator(\))operator(;) ident(runtime)operator(.)ident(getMethod)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(MethodExtensions)operator(.)ident(class)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(TypeLibrary) directive(implements) ident(Library) operator({) directive(public) type(void) ident(load)operator(()ident(Ruby) ident(runtime)operator(,) type(boolean) ident(wrap)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyModule) ident(jrubyType) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(jrubyType)operator(.)ident(defineAnnotatedMethods)operator(()ident(TypeLibrary)operator(.)ident(class)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(coerce_to)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(object)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(method)operator(\)) operator({) ident(Ruby) ident(ruby) operator(=) ident(object)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(clazz) keyword(instanceof) ident(RubyClass)operator(\))operator(\)) operator({) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()ident(clazz)operator(,) ident(ruby)operator(.)ident(getClassClass)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(method) keyword(instanceof) ident(RubySymbol)operator(\))operator(\)) operator({) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()ident(method)operator(,) ident(ruby)operator(.)ident(getSymbol)operator(()operator(\))operator(\))operator(;) operator(}) ident(RubyClass) ident(rubyClass) operator(=) operator(()ident(RubyClass)operator(\))ident(clazz)operator(;) ident(RubySymbol) ident(methodSym) operator(=) operator(()ident(RubySymbol)operator(\))ident(method)operator(;) keyword(return) ident(TypeConverter)operator(.)ident(convertToTypeOrRaise)operator(()ident(object)operator(,) ident(rubyClass)operator(,) ident(methodSym)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(runtime)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(Java)operator(.)ident(java_to_ruby)operator(()ident(recv)operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getObjectSpaceEnabled)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(b)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(return) ident(RubyBoolean)operator(.)ident(newBoolean)operator(() ident(runtime)operator(,) ident(runtime)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setObjectSpaceEnabled)operator(() ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(b)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(setObjectSpaceEnabled)operator(()ident(arg)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(parse)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if)operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(if)operator(()ident(block)operator(.)ident(getBody)operator(()operator(\)) keyword(instanceof) ident(org)operator(.)ident(jruby)operator(.)ident(runtime)operator(.)ident(CompiledBlock)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(\))operator(;) operator(}) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(0)operator(,)integer(0)operator(\))operator(;) keyword(return) ident(Java)operator(.)ident(java_to_ruby)operator(()ident(recv)operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(InterpretedBlock)operator(\))ident(block)operator(.)ident(getBody)operator(()operator(\))operator(\))operator(.)ident(getIterNode)operator(()operator(\))operator(.)ident(getBodyNode)operator(()operator(\))operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(else) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(1)operator(,)integer(3)operator(\))operator(;) pre_type(String) ident(filename) operator(=) stringoperator(;) type(boolean) ident(extraPositionInformation) operator(=) pre_constant(false)operator(;) ident(RubyString) ident(content) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length)operator(>)integer(1)operator(\)) operator({) ident(filename) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length)operator(>)integer(2)operator(\)) operator({) ident(extraPositionInformation) operator(=) ident(args)operator([)integer(2)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(Java)operator(.)ident(java_to_ruby)operator(()ident(recv)operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(parse)operator(()ident(content)operator(.)ident(getByteList)operator(()operator(\))operator(,) ident(filename)operator(,) pre_constant(null)operator(,) integer(0)operator(,) ident(extraPositionInformation)operator(\))operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(compile)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Node) ident(node)operator(;) pre_type(String) ident(filename)operator(;) ident(RubyString) ident(content)operator(;) keyword(if)operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(0)operator(,)integer(0)operator(\))operator(;) keyword(if)operator(()ident(block)operator(.)ident(getBody)operator(()operator(\)) keyword(instanceof) ident(org)operator(.)ident(jruby)operator(.)ident(runtime)operator(.)ident(CompiledBlock)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(\))operator(;) operator(}) ident(content) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(Node) ident(bnode) operator(=) operator(()operator(()ident(InterpretedBlock)operator(\))ident(block)operator(.)ident(getBody)operator(()operator(\))operator(\))operator(.)ident(getIterNode)operator(()operator(\))operator(.)ident(getBodyNode)operator(()operator(\))operator(;) ident(node) operator(=) keyword(new) ident(org)operator(.)ident(jruby)operator(.)ident(ast)operator(.)ident(RootNode)operator(()ident(bnode)operator(.)ident(getPosition)operator(()operator(\))operator(,) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getDynamicScope)operator(()operator(\))operator(,) ident(bnode)operator(\))operator(;) ident(filename) operator(=) string operator(+) ident(node)operator(.)ident(getPosition)operator(()operator(\))operator(.)ident(getFile)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(1)operator(,)integer(3)operator(\))operator(;) ident(filename) operator(=) stringoperator(;) type(boolean) ident(extraPositionInformation) operator(=) pre_constant(false)operator(;) ident(content) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length)operator(>)integer(1)operator(\)) operator({) ident(filename) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length)operator(>)integer(2)operator(\)) operator({) ident(extraPositionInformation) operator(=) ident(args)operator([)integer(2)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) operator(}) ident(node) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(parse)operator(()ident(content)operator(.)ident(getByteList)operator(()operator(\))operator(,) ident(filename)operator(,) pre_constant(null)operator(,) integer(0)operator(,) ident(extraPositionInformation)operator(\))operator(;) operator(}) pre_type(String) ident(classname)operator(;) keyword(if) operator(()ident(filename)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(classname) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(classname) operator(=) ident(filename)operator(.)ident(replace)operator(()stringoperator(,) stringoperator(\))operator(.)ident(replaceAll)operator(()stringoperator(,) stringoperator(\))operator(.)ident(replaceAll)operator(()stringoperator(,)stringoperator(\))operator(;) operator(}) ident(ASTInspector) ident(inspector) operator(=) keyword(new) ident(ASTInspector)operator(()operator(\))operator(;) ident(inspector)operator(.)ident(inspect)operator(()ident(node)operator(\))operator(;) ident(StandardASMCompiler) ident(asmCompiler) operator(=) keyword(new) ident(StandardASMCompiler)operator(()ident(classname)operator(,) ident(filename)operator(\))operator(;) ident(ASTCompiler) ident(compiler) operator(=) keyword(new) ident(ASTCompiler)operator(()operator(\))operator(;) ident(compiler)operator(.)ident(compileRoot)operator(()ident(node)operator(,) ident(asmCompiler)operator(,) ident(inspector)operator(\))operator(;) type(byte)type([]) ident(bts) operator(=) ident(asmCompiler)operator(.)ident(getClassByteArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(compiledScript) operator(=) operator(()operator(()ident(RubyModule)operator(\))ident(recv)operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(\))operator(;) ident(compiledScript)operator(.)ident(callMethod)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(filename)operator(\))operator(\))operator(;) ident(compiledScript)operator(.)ident(callMethod)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(classname)operator(\))operator(\))operator(;) ident(compiledScript)operator(.)ident(callMethod)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(content)operator(\))operator(;) ident(compiledScript)operator(.)ident(callMethod)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(Java)operator(.)ident(java_to_ruby)operator(()ident(recv)operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(bts)operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(\))operator(;) keyword(return) ident(compiledScript)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(reference)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(Java)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getJavaSupport)operator(()operator(\))operator(.)ident(getJavaUtilitiesModule)operator(()operator(\))operator(,) ident(JavaObject)operator(.)ident(wrap)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(obj)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dereference)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(obj)operator(.)ident(dataGetStruct)operator(()operator(\)) keyword(instanceof) ident(JavaObject)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(obj) operator(+) stringoperator(\))operator(;) operator(}) pre_type(Object) ident(unwrapped) operator(=) ident(JavaUtil)operator(.)ident(unwrapJavaObject)operator(()ident(obj)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(unwrapped) keyword(instanceof) ident(IRubyObject)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(obj) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) operator(()ident(IRubyObject)operator(\))ident(unwrapped)operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(JRubyCompiledScript) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(compiled_script_to_s)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastGetInstanceVariable)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(compiled_script_inspect)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(recv)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastGetInstanceVariable)operator(()stringoperator(\)) operator(+) string)delimiter(")>operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(compiled_script_inspect_bytecode)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) pre_type(StringWriter) ident(sw) operator(=) keyword(new) pre_type(StringWriter)operator(()operator(\))operator(;) ident(ClassReader) ident(cr) operator(=) keyword(new) ident(ClassReader)operator(()operator(()type(byte)type([])operator(\))ident(org)operator(.)ident(jruby)operator(.)ident(javasupport)operator(.)ident(JavaUtil)operator(.)ident(convertRubyToJava)operator(()ident(recv)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastGetInstanceVariable)operator(()stringoperator(\))operator(,)type(byte)type([])operator(.)ident(class)operator(\))operator(\))operator(;) ident(TraceClassVisitor) ident(cv) operator(=) keyword(new) ident(TraceClassVisitor)operator(()keyword(new) pre_type(PrintWriter)operator(()ident(sw)operator(\))operator(\))operator(;) ident(cr)operator(.)ident(accept)operator(()ident(cv)operator(,) ident(ClassReader)operator(.)ident(SKIP_DEBUG)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(sw)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(JRubyExtensions) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(steal_method)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(type)operator(,) ident(IRubyObject) ident(methodName)operator(\)) operator({) ident(RubyModule) ident(to_add) operator(=) pre_constant(null)operator(;) keyword(if)operator(()ident(recv) keyword(instanceof) ident(RubyModule)operator(\)) operator({) ident(to_add) operator(=) operator(()ident(RubyModule)operator(\))ident(recv)operator(;) operator(}) keyword(else) operator({) ident(to_add) operator(=) ident(recv)operator(.)ident(getSingletonClass)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(name) operator(=) ident(methodName)operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(type) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(DynamicMethod) ident(method) operator(=) operator(()operator(()ident(RubyModule)operator(\))ident(type)operator(\))operator(.)ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if)operator(()ident(method) operator(==) pre_constant(null) operator(||) ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(type)operator(\))operator(;) operator(}) ident(to_add)operator(.)ident(addMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(steal_methods)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(type) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(1)operator(;)ident(i)operator(<)ident(args)operator(.)ident(length)operator(;)ident(i)operator(++)operator(\)) operator({) ident(steal_method)operator(()ident(recv)operator(,) ident(type)operator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(MethodExtensions) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(methodArgs)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(ruby) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyMethod) ident(rubyMethod) operator(=) operator(()ident(RubyMethod)operator(\))ident(recv)operator(;) ident(DynamicMethod) ident(method) operator(=) ident(rubyMethod)operator(.)ident(method)operator(;) keyword(if) operator(()ident(method) keyword(instanceof) ident(MethodArgs)operator(\)) operator({) ident(MethodArgs) ident(interpMethod) operator(=) operator(()ident(MethodArgs)operator(\))ident(method)operator(;) ident(ArgsNode) ident(args) operator(=) ident(interpMethod)operator(.)ident(getArgsNode)operator(()operator(\))operator(;) ident(RubyArray) ident(argsArray) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(ruby)operator(\))operator(;) ident(RubyArray) ident(reqArray) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(ruby)operator(\))operator(;) ident(ListNode) ident(requiredArgs) operator(=) ident(args)operator(.)ident(getArgs)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(requiredArgs) operator(!=) pre_constant(null) operator(&&) ident(i) operator(<) ident(requiredArgs)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(ArgumentNode) ident(arg) operator(=) operator(()ident(ArgumentNode)operator(\))ident(requiredArgs)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) ident(reqArray)operator(.)ident(append)operator(()ident(RubySymbol)operator(.)ident(newSymbol)operator(()ident(ruby)operator(,) ident(arg)operator(.)ident(getName)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(argsArray)operator(.)ident(append)operator(()ident(reqArray)operator(\))operator(;) ident(RubyArray) ident(optArray) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(ruby)operator(\))operator(;) ident(ListNode) ident(optArgs) operator(=) ident(args)operator(.)ident(getOptArgs)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(optArgs) operator(!=) pre_constant(null) operator(&&) ident(i) operator(<) ident(optArgs)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(LocalAsgnNode) ident(arg) operator(=) operator(()ident(LocalAsgnNode)operator(\))ident(optArgs)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) ident(optArray)operator(.)ident(append)operator(()ident(RubySymbol)operator(.)ident(newSymbol)operator(()ident(ruby)operator(,) ident(arg)operator(.)ident(getName)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(argsArray)operator(.)ident(append)operator(()ident(optArray)operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(getRestArgNode)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(argsArray)operator(.)ident(append)operator(()ident(RubySymbol)operator(.)ident(newSymbol)operator(()ident(ruby)operator(,) ident(args)operator(.)ident(getRestArgNode)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(argsArray)operator(.)ident(append)operator(()ident(ruby)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(getBlockArgNode)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(argsArray)operator(.)ident(append)operator(()ident(RubySymbol)operator(.)ident(newSymbol)operator(()ident(ruby)operator(,) ident(args)operator(.)ident(getBlockArgNode)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(argsArray)operator(.)ident(append)operator(()ident(ruby)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(argsArray)operator(;) operator(}) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Kiel Hodges * Copyright (C\) 2006 Evan Buswell * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Michael Studman * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2007 Nick Sieger * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.ByteArrayOutputStream)operator(;) keyword(import) include(java.math.BigInteger)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(static) include(org.jruby.anno.FrameField)operator(.)operator(*)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.ast.util.ArgsUtil)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.evaluator.ASTInterpreter)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.exceptions.MainExitException)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.internal.runtime.JumpTarget)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(static) include(org.jruby.runtime.Visibility)operator(.)operator(*)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.load.IAutoloadMethod)operator(;) keyword(import) include(org.jruby.runtime.load.LoadService)operator(;) keyword(import) include(org.jruby.util.IdUtil)operator(;) keyword(import) include(org.jruby.util.ShellLauncher)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) comment(/** * Note: For CVS history, see KernelModule.java. */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyKernel) operator({) directive(public) directive(final) directive(static) pre_type(Class)operator(<)operator(?)operator(>) ident(IRUBY_OBJECT) operator(=) ident(IRubyObject)operator(.)ident(class)operator(;) directive(public) directive(static) ident(RubyModule) ident(createKernelModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setKernel)operator(()ident(module)operator(\))operator(;) ident(module)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyKernel)operator(.)ident(class)operator(\))operator(;) ident(module)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyObject)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(setRespondToMethod)operator(()ident(module)operator(.)ident(searchMethod)operator(()stringoperator(\))operator(\))operator(;) ident(module)operator(.)ident(setFlag)operator(()ident(RubyObject)operator(.)ident(USER7_F)operator(,) pre_constant(false)operator(\))operator(;) comment(//Kernel is the only Module that doesn't need an implementor) keyword(return) ident(module)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(at_exit)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(pushExitBlock)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(,) ident(block)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(autoload_p)operator(()ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyModule) ident(module) operator(=) ident(recv) keyword(instanceof) ident(RubyModule) operator(?) operator(()ident(RubyModule)operator(\)) ident(recv) operator(:) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) ident(module)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(;) ident(IAutoloadMethod) ident(autoloadMethod) operator(=) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoloadFor)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(autoloadMethod) operator(==) pre_constant(null)operator(\)) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(autoloadMethod)operator(.)ident(file)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(autoload)operator(()directive(final) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(symbol)operator(,) directive(final) ident(IRubyObject) ident(file)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(LoadService) ident(loadService) operator(=) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(;) pre_type(String) ident(nonInternedName) operator(=) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(IdUtil)operator(.)ident(isValidConstantName)operator(()ident(nonInternedName)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()stringoperator(,) ident(nonInternedName)operator(\))operator(;) operator(}) ident(RubyString) ident(fileString) operator(=) ident(file)operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(fileString)operator(.)ident(isEmpty)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) directive(final) pre_type(String) ident(baseName) operator(=) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(;) comment(// interned, OK for "fast" methods) directive(final) ident(RubyModule) ident(module) operator(=) ident(recv) keyword(instanceof) ident(RubyModule) operator(?) operator(()ident(RubyModule)operator(\)) ident(recv) operator(:) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) pre_type(String) ident(nm) operator(=) ident(module)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(baseName)operator(;) ident(IRubyObject) ident(existingValue) operator(=) ident(module)operator(.)ident(fastFetchConstant)operator(()ident(baseName)operator(\))operator(;) keyword(if) operator(()ident(existingValue) operator(!=) pre_constant(null) operator(&&) ident(existingValue) operator(!=) ident(RubyObject)operator(.)ident(UNDEF)operator(\)) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(module)operator(.)ident(fastStoreConstant)operator(()ident(baseName)operator(,) ident(RubyObject)operator(.)ident(UNDEF)operator(\))operator(;) ident(loadService)operator(.)ident(addAutoload)operator(()ident(nm)operator(,) keyword(new) ident(IAutoloadMethod)operator(()operator(\)) operator({) directive(public) pre_type(String) ident(file)operator(()operator(\)) operator({) keyword(return) ident(file)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.load.IAutoloadMethod#load(Ruby, String\) */) directive(public) ident(IRubyObject) ident(load)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) type(boolean) ident(required) operator(=) ident(loadService)operator(.)ident(require)operator(()ident(file)operator(()operator(\))operator(\))operator(;) comment(// File to be loaded by autoload has already been or is being loaded.) keyword(if) operator(()operator(!)ident(required)operator(\)) keyword(return) pre_constant(null)operator(;) keyword(return) ident(module)operator(.)ident(fastGetConstant)operator(()ident(baseName)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(method_missing)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0) operator(||) operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubySymbol)operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) pre_type(Visibility) ident(lastVis) operator(=) ident(context)operator(.)ident(getLastVisibility)operator(()operator(\))operator(;) ident(CallType) ident(lastCallType) operator(=) ident(context)operator(.)ident(getLastCallType)operator(()operator(\))operator(;) comment(// create a lightweight thunk) ident(IRubyObject) ident(msg) operator(=) keyword(new) ident(RubyNameError)operator(.)ident(RubyNameErrorMessage)operator(()ident(runtime)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(lastVis)operator(,) ident(lastCallType)operator(\))operator(;) directive(final) ident(IRubyObject)type([])ident(exArgs)operator(;) directive(final) ident(RubyClass) ident(exc)operator(;) keyword(if) operator(()ident(lastCallType) operator(!=) ident(CallType)operator(.)ident(VARIABLE)operator(\)) operator({) ident(exc) operator(=) ident(runtime)operator(.)ident(getNoMethodError)operator(()operator(\))operator(;) ident(exArgs) operator(=) keyword(new) ident(IRubyObject)type([])operator({)ident(msg)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(RubyArray)operator(.)ident(newArrayNoCopy)operator(()ident(runtime)operator(,) ident(args)operator(,) integer(1)operator(\))operator(})operator(;) operator(}) keyword(else) operator({) ident(exc) operator(=) ident(runtime)operator(.)ident(getNameError)operator(()operator(\))operator(;) ident(exArgs) operator(=) keyword(new) ident(IRubyObject)type([])operator({)ident(msg)operator(,) ident(args)operator([)integer(0)operator(])operator(})operator(;) operator(}) keyword(throw) keyword(new) ident(RaiseException)operator(()operator(()ident(RubyException)operator(\))ident(exc)operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(exArgs)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(arg) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(arg)operator(.)ident(startsWith)operator(()stringoperator(\))operator(\)) operator({) pre_type(String) ident(command) operator(=) ident(arg)operator(.)ident(substring)operator(()integer(1)operator(\))operator(;) comment(// exec process, create IO with process) keyword(return) ident(RubyIO)operator(.)ident(popen)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getIO)operator(()operator(\))operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(runtime)operator(.)ident(newString)operator(()ident(command)operator(\))operator(})operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(RubyFile)operator(.)ident(open)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) ident(IRubyObject) ident(defin) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(return) ident(defin)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyArgsFile)operator(.)ident(gets)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(abort)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,)ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(throw) keyword(new) ident(MainExitException)operator(()integer(1)operator(,)pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_array)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) ident(IRubyObject) ident(value) operator(=) ident(object)operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()ident(value)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(object)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(searchMethod)operator(()stringoperator(\))operator(.)ident(getImplementationClass)operator(()operator(\)) operator(!=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getKernel)operator(()operator(\))operator(\)) operator({) ident(value) operator(=) ident(object)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_A)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(value) keyword(instanceof) ident(RubyArray)operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) keyword(else) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(object)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(value)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_complex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_complex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) stringoperator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_complex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getComplex)operator(()operator(\))operator(,) stringoperator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_rational)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRational)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_rational)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRational)operator(()operator(\))operator(,) stringoperator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_rational)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRational)operator(()operator(\))operator(,) stringoperator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_float)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) keyword(if)operator(()ident(object) keyword(instanceof) ident(RubyFixnum)operator(\))operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(object)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(object)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(})keyword(else) keyword(if)operator(()ident(object) keyword(instanceof) ident(RubyFloat)operator(\))operator({) keyword(return) ident(object)operator(;) operator(})keyword(else) keyword(if)operator(()ident(object) keyword(instanceof) ident(RubyBignum)operator(\))operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(object)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(RubyBignum)operator(.)ident(big2dbl)operator(()operator(()ident(RubyBignum)operator(\))ident(object)operator(\))operator(\))operator(;) operator(})keyword(else) keyword(if)operator(()ident(object) keyword(instanceof) ident(RubyString)operator(\))operator({) keyword(if)operator(()operator(()operator(()ident(RubyString)operator(\))ident(object)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(==) integer(0)operator(\))operator({) comment(// rb_cstr_to_dbl case) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(object)operator(.)ident(inspect)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyNumeric)operator(.)ident(str2fnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)operator(()ident(RubyString)operator(\))ident(object)operator(,)pre_constant(true)operator(\))operator(;) operator(})keyword(else) keyword(if)operator(()ident(object)operator(.)ident(isNil)operator(()operator(\))operator(\))operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyFloat) ident(rFloat) operator(=) operator(()ident(RubyFloat)operator(\))ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(object)operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFloat)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_F)operator(,) stringoperator(\))operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(rFloat)operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(\)) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(return) ident(rFloat)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_integer)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(val) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(object)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(val) operator(>) operator(()type(double)operator(\)) ident(RubyFixnum)operator(.)ident(MAX) operator(&&) ident(val) operator(<) operator(()type(double)operator(\)) ident(RubyFixnum)operator(.)ident(MIN)operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(dbl2num)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,)operator(()operator(()ident(RubyFloat)operator(\))ident(object)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyFixnum) operator(||) ident(object) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(object)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,)operator(()ident(RubyString)operator(\))ident(object)operator(,)integer(0)operator(,)pre_constant(true)operator(\))operator(;) operator(}) ident(IRubyObject) ident(tmp) operator(=) ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(object)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getInteger)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_INT)operator(,) stringoperator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(object)operator(.)ident(convertToInteger)operator(()ident(MethodIndex)operator(.)ident(TO_I)operator(,) stringoperator(\))operator(;) keyword(return) ident(tmp)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(new_string)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) keyword(return) ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(object)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(defout) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) operator(!=) pre_constant(null)operator(\)) operator({) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyObject)operator(.)ident(inspect)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(;) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(defout) keyword(instanceof) ident(RubyFile)operator(\)) operator({) operator(()operator(()ident(RubyFile)operator(\))ident(defout)operator(\))operator(.)ident(flush)operator(()operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_f_putc */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(putc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(ch)operator(\)) operator({) ident(IRubyObject) ident(defout) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(ch)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(puts)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(defout) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\))operator(;) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(print)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(defout) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\))operator(;) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(printf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(0)operator(\)) operator({) ident(IRubyObject) ident(defout) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) ident(defout) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(args) operator(=) ident(ArgsUtil)operator(.)ident(popArray)operator(()ident(args)operator(\))operator(;) operator(}) ident(defout)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyKernel)operator(.)ident(sprintf)operator(()ident(recv)operator(,) ident(args)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(readline)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(line)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyArray) ident(readlines)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyArgsFile)operator(.)ident(readlines)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** Returns value of $_. * * @throws TypeError if $_ is not a String or nil. * @return value of $_ as String. */) directive(private) directive(static) ident(RubyString) ident(getLastlineString)operator(()ident(ThreadContext) ident(context)operator(,) ident(Ruby) ident(runtime)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(getLastLine)operator(()operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)operator(()ident(line) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(line)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) operator(()ident(RubyString)operator(\)) ident(line)operator(;) operator(}) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the one or two-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the one or two-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the one or two-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the one or two-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(str)operator(.)ident(gsub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chop_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(chop_bang)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chop)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(>) integer(0)operator(\)) operator({) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(str)operator(.)ident(dup)operator(()operator(\))operator(;) ident(str)operator(.)ident(chop_bang)operator(()operator(\))operator(;) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(str)operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the zero or one-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(chomp_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(chomp_bang)operator(()ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chomp_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(chomp_bang)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chomp_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(chomp_bang)operator(()ident(arg0)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the zero or one-arg versions. */) directive(public) directive(static) ident(IRubyObject) ident(chomp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(dup) operator(=) operator(()ident(RubyString)operator(\)) ident(str)operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()ident(dup)operator(.)ident(chomp_bang)operator(()ident(args)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(dup)operator(\))operator(;) keyword(return) ident(dup)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chomp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(dup) operator(=) operator(()ident(RubyString)operator(\)) ident(str)operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()ident(dup)operator(.)ident(chomp_bang)operator(()operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(dup)operator(\))operator(;) keyword(return) ident(dup)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) ident(LASTLINE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(chomp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(dup) operator(=) operator(()ident(RubyString)operator(\)) ident(str)operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if) operator(()ident(dup)operator(.)ident(chomp_bang)operator(()ident(arg0)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(dup)operator(\))operator(;) keyword(return) ident(dup)operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * * @param context The thread context for the current thread * @param recv The receiver of the method (usually a class that has included Kernel\) * @return * @deprecated Use the versions with zero, one, or two args. */) directive(public) directive(static) ident(IRubyObject) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(split)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(split)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(split)operator(()ident(context)operator(,) ident(arg0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(LASTLINE)operator(,) ident(writes) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(split)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(,) ident(writes) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(\)) directive(public) directive(static) ident(IRubyObject) ident(scan)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(pattern)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getLastlineString)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(scan)operator(()ident(context)operator(,) ident(pattern)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(3)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyIO)operator(.)ident(select_static)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sleep)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(long) ident(milliseconds)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) comment(// Zero sleeps forever) ident(milliseconds) operator(=) integer(0)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyNumeric)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(args)operator([)integer(0)operator(])operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(milliseconds) operator(=) operator(()type(long)operator(\)) operator(()ident(args)operator([)integer(0)operator(])operator(.)ident(convertToFloat)operator(()operator(\))operator(.)ident(getDoubleValue)operator(()operator(\)) operator(*) integer(1000)operator(\))operator(;) keyword(if) operator(()ident(milliseconds) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(milliseconds) operator(==) integer(0)operator(\)) operator({) comment(// Explicit zero in MRI returns immediately) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) operator(}) operator(}) type(long) ident(startTime) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) ident(RubyThread) ident(rubyThread) operator(=) ident(context)operator(.)ident(getThread)operator(()operator(\))operator(;) keyword(do) operator({) type(long) ident(loopStartTime) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) keyword(try) operator({) ident(rubyThread)operator(.)ident(sleep)operator(()ident(milliseconds)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(iExcptn)operator(\)) operator({) operator(}) ident(milliseconds) operator(-=) operator(()pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(-) ident(loopStartTime)operator(\))operator(;) operator(}) keyword(while) operator(()ident(milliseconds) operator(>) integer(0)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()pre_type(Math)operator(.)ident(round)operator(()operator(()pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(-) ident(startTime)operator(\)) operator(/) float(1000.0)operator(\))operator(\))operator(;) operator(}) comment(// FIXME: Add at_exit and finalizers to exit, then make exit_bang not call those.) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exit)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(exit)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) comment(// not reached) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exit_bang)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(exit)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) comment(// not reached) operator(}) directive(private) directive(static) type(void) ident(exit)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) type(boolean) ident(hard)operator(\)) operator({) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) type(int) ident(status) operator(=) integer(1)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(RubyObject) ident(argument) operator(=) operator(()ident(RubyObject)operator(\))ident(args)operator([)integer(0)operator(])operator(;) keyword(if) operator(()ident(argument) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(status) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(argument)operator(\))operator(;) operator(}) keyword(else) operator({) ident(status) operator(=) ident(argument)operator(.)ident(isFalse)operator(()operator(\)) operator(?) integer(1) operator(:) integer(0)operator(;) operator(}) operator(}) keyword(if) operator(()ident(hard)operator(\)) operator({) keyword(throw) keyword(new) ident(MainExitException)operator(()ident(status)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newSystemExit)operator(()ident(status)operator(\))operator(;) operator(}) operator(}) comment(/** Returns an Array with the names of all global variables. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyArray) ident(global_variables)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(globalVariables) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(globalVariableName) operator(:) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(getNames)operator(()operator(\))operator(\)) operator({) ident(globalVariables)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(globalVariableName)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(globalVariables)operator(;) operator(}) comment(/** Returns an Array with the names of all local variables. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyArray) ident(local_variables)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(localVariables) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(name)operator(:) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(.)ident(getAllNamesInScope)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isLocal)operator(()ident(name)operator(\))operator(\)) ident(localVariables)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(localVariables)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyBinding) ident(binding)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RubyBinding)operator(.)ident(newBinding)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(block_given_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(getBlock)operator(()operator(\))operator(.)ident(isGiven)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(sprintf)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(sprintf)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sprintf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyString) ident(str) operator(=) ident(RubyString)operator(.)ident(stringValue)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) ident(RubyArray) ident(newArgs) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()ident(args)operator(\))operator(;) ident(newArgs)operator(.)ident(shift)operator(()operator(\))operator(;) keyword(return) ident(str)operator(.)ident(op_format)operator(()ident(context)operator(,) ident(newArgs)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(raise)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) comment(// FIXME: Pass block down?) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(IRubyObject) ident(lastException) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(lastException)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) keyword(new) ident(RaiseException)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRuntimeError)operator(()operator(\))operator(,) stringoperator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(throw) keyword(new) ident(RaiseException)operator(()operator(()ident(RubyException)operator(\)) ident(lastException)operator(\))operator(;) operator(}) ident(IRubyObject) ident(exception)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(throw) keyword(new) ident(RaiseException)operator(()operator(()ident(RubyException)operator(\))ident(runtime)operator(.)ident(getRuntimeError)operator(()operator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(exception) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(exception) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(isInstance)operator(()ident(exception)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(3)operator(\)) operator({) operator(()operator(()ident(RubyException)operator(\)) ident(exception)operator(\))operator(.)ident(set_backtrace)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(runtime)operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(printExceptionSummary)operator(()ident(context)operator(,) ident(runtime)operator(,) operator(()ident(RubyException)operator(\)) ident(exception)operator(\))operator(;) operator(}) keyword(throw) keyword(new) ident(RaiseException)operator(()operator(()ident(RubyException)operator(\)) ident(exception)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(printExceptionSummary)operator(()ident(ThreadContext) ident(context)operator(,) ident(Ruby) ident(runtime)operator(,) ident(RubyException) ident(rEx)operator(\)) operator({) pre_type(Frame) ident(currentFrame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) pre_type(String) ident(msg) operator(=) pre_type(String)operator(.)ident(format)operator(()stringoperator(,) ident(rEx)operator(.)ident(getMetaClass)operator(()operator(\))operator(,) ident(currentFrame)operator(.)ident(getFile)operator(()operator(\))operator(,) ident(currentFrame)operator(.)ident(getLine)operator(()operator(\)) operator(+) integer(1)operator(,) ident(rEx)operator(.)ident(to_s)operator(()operator(\))operator(\))operator(;) ident(IRubyObject) ident(errorStream) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) ident(errorStream)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()ident(msg)operator(\))operator(\))operator(;) operator(}) comment(/** * Require. * MRI allows to require ever .rb files or ruby extension dll (.so or .dll depending on system\). * we allow requiring either .rb files or jars. * @param recv ruby object used to call require (any object will do and it won't be used anyway\). * @param name the name of the file to require **/) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(require)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(name)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()ident(name)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyString) ident(file) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) type(boolean) ident(wrap) operator(=) ident(args)operator(.)ident(length) operator(==) integer(2) operator(?) ident(args)operator([)integer(1)operator(])operator(.)ident(isTrue)operator(()operator(\)) operator(:) pre_constant(false)operator(;) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(load)operator(()ident(file)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) ident(wrap)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) comment(// string to eval) ident(RubyString) ident(src) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(checkSafeString)operator(()ident(src)operator(\))operator(;) ident(IRubyObject) ident(scope) operator(=) ident(args)operator(.)ident(length) operator(>) integer(1) operator(&&) operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) pre_constant(null)operator(;) pre_type(String) ident(file)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) operator({) ident(file) operator(=) ident(args)operator([)integer(2)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(scope) operator(==) pre_constant(null)operator(\)) operator({) ident(file) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(file) operator(=) pre_constant(null)operator(;) operator(}) type(int) ident(line)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(3)operator(\)) operator({) ident(line) operator(=) operator(()type(int)operator(\)) ident(args)operator([)integer(3)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(scope) operator(==) pre_constant(null)operator(\)) operator({) ident(line) operator(=) integer(0)operator(;) operator(}) keyword(else) operator({) ident(line) operator(=) operator(-)integer(1)operator(;) operator(}) keyword(if) operator(()ident(scope) operator(==) pre_constant(null)operator(\)) ident(scope) operator(=) ident(RubyBinding)operator(.)ident(newBindingForEval)operator(()ident(context)operator(\))operator(;) keyword(return) ident(ASTInterpreter)operator(.)ident(evalWithBinding)operator(()ident(context)operator(,) ident(src)operator(,) ident(scope)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(callcc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(EMPTY_IMPLEMENTATION)operator(,) stringoperator(,) stringoperator(\))operator(;) ident(IRubyObject) ident(cc) operator(=) ident(runtime)operator(.)ident(getContinuation)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(cc)operator(.)ident(dataWrapStruct)operator(()ident(block)operator(\))operator(;) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(cc)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(caller)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int) ident(level) operator(=) ident(args)operator(.)ident(length) operator(>) integer(0) operator(?) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\)) operator(:) integer(1)operator(;) keyword(if) operator(()ident(level) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(level) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(createCallerBacktrace)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(level)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rbCatch)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(tag)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(CatchTarget) ident(target) operator(=) keyword(new) ident(CatchTarget)operator(()ident(tag)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(try) operator({) ident(context)operator(.)ident(pushCatch)operator(()ident(target)operator(\))operator(;) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(tag)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ThrowJump) ident(tj)operator(\)) operator({) keyword(if) operator(()ident(tj)operator(.)ident(getTarget)operator(()operator(\)) operator(==) ident(target)operator(\)) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(tj)operator(.)ident(getValue)operator(()operator(\))operator(;) keyword(throw) ident(tj)operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(popCatch)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(CatchTarget) directive(implements) ident(JumpTarget) operator({) directive(private) directive(final) pre_type(String) ident(tag)operator(;) directive(public) ident(CatchTarget)operator(()pre_type(String) ident(tag)operator(\)) operator({) local_variable(this)operator(.)ident(tag) operator(=) ident(tag)operator(;) operator(}) directive(public) pre_type(String) ident(getTag)operator(()operator(\)) operator({) keyword(return) ident(tag)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rbThrow)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(tag) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(;) ident(CatchTarget)type([]) ident(catches) operator(=) ident(context)operator(.)ident(getActiveCatches)operator(()operator(\))operator(;) pre_type(String) ident(message) operator(=) string operator(+) ident(tag) operator(+) stringoperator(;) comment(// Ordering of array traversal not important, just intuitive) keyword(for) operator(()type(int) ident(i) operator(=) ident(catches)operator(.)ident(length) operator(-) integer(1) operator(;) ident(i) operator(>=) integer(0) operator(;) ident(i)operator(--)operator(\)) operator({) keyword(if) operator(()ident(tag)operator(.)ident(equals)operator(()ident(catches)operator([)ident(i)operator(])operator(.)ident(getTag)operator(()operator(\))operator(\))operator(\)) operator({) comment(//Catch active, throw for catch to handle) keyword(throw) keyword(new) ident(JumpException)operator(.)ident(ThrowJump)operator(()ident(catches)operator([)ident(i)operator(])operator(,) ident(args)operator(.)ident(length) operator(>) integer(1) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(// No catch active for this throw) ident(RubyThread) ident(currentThread) operator(=) ident(context)operator(.)ident(getThread)operator(()operator(\))operator(;) keyword(if) operator(()ident(currentThread) operator(==) ident(runtime)operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getMainThread)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()ident(message)operator(,) ident(tag)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()ident(message) operator(+) string operator(+) pre_type(Integer)operator(.)ident(toHexString)operator(()ident(RubyInteger)operator(.)ident(fix2int)operator(()ident(currentThread)operator(.)ident(id)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(trap)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(recv)operator(,) stringoperator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(warn)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(message)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(runtime)operator(.)ident(getVerbose)operator(()operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(out) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(out)operator(,) stringoperator(,) ident(message)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(set_trace_func)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(trace_func)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(trace_func)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setTraceFunction)operator(()pre_constant(null)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)operator(()ident(trace_func) keyword(instanceof) ident(RubyProc)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setTraceFunction)operator(()operator(()ident(RubyProc)operator(\)) ident(trace_func)operator(\))operator(;) operator(}) keyword(return) ident(trace_func)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(trace_var)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) ident(RubyProc) ident(proc) operator(=) pre_constant(null)operator(;) pre_type(String) ident(var) operator(=) ident(args)operator(.)ident(length) operator(>) integer(1) operator(?) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\)) operator(:) pre_constant(null)operator(;) comment(// ignore if it's not a global var) keyword(if) operator(()ident(var)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(!=) stringoperator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) ident(proc) operator(=) ident(RubyProc)operator(.)ident(newProc)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(block)operator(,) ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2)operator(\)) operator({) ident(proc) operator(=) operator(()ident(RubyProc)operator(\))ident(TypeConverter)operator(.)ident(convertToType)operator(()ident(args)operator([)integer(1)operator(])operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getProc)operator(()operator(\))operator(,) integer(0)operator(,) stringoperator(,) pre_constant(true)operator(\))operator(;) operator(}) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(setTraceVar)operator(()ident(var)operator(,) ident(proc)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(untrace_var)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) pre_type(String) ident(var) operator(=) ident(args)operator(.)ident(length) operator(>=) integer(1) operator(?) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\)) operator(:) pre_constant(null)operator(;) comment(// ignore if it's not a global var) keyword(if) operator(()ident(var)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(!=) stringoperator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>) ident(success) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(untraceVar)operator(()ident(var)operator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(\)) operator({) ident(success)operator(.)ident(add)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(success)operator(\))operator(;) operator(}) keyword(else) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(untraceVar)operator(()ident(var)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(singleton_method_added)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(symbolId)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(singleton_method_removed)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(symbolId)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(singleton_method_undefined)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(symbolId)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(\)) directive(public) directive(static) ident(RubyProc) ident(proc)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(RubyProc) ident(proc)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(RubyProc) ident(lambda)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(RubyProc) ident(proc_1_9)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(loop)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(while) operator(()pre_constant(true)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) ident(context)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(test)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) type(int) ident(cmd)operator(;) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(cmd) operator(=) operator(()type(int)operator(\))operator(()operator(()ident(RubyFixnum)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString) operator(&&) operator(()operator(()ident(RubyString)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) comment(// MRI behavior: use first byte of string value if len > 0) ident(cmd) operator(=) operator(()operator(()ident(RubyString)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(charAt)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) operator({) ident(cmd) operator(=) operator(()type(int)operator(\)) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) comment(// MRI behavior: raise ArgumentError for 'unknown command' before) comment(// checking number of args.) keyword(switch)operator(()ident(cmd)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) string)delimiter(')>operator(:) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(default)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) operator(()type(char)operator(\)) ident(cmd)operator(\))operator(;) operator(}) comment(// MRI behavior: now check arg count) keyword(switch)operator(()ident(cmd)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) string)delimiter(')>operator(:) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(3)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(3)operator(\))operator(;) keyword(break)operator(;) keyword(default)operator(:) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(2)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(2)operator(\))operator(;) keyword(break)operator(;) operator(}) keyword(switch) operator(()ident(cmd)operator(\)) operator({) keyword(case) stringoperator(:) comment(// ?A | Time | Last access time for file1) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(atime)operator(()operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?b | boolean | True if file1 is a block device) keyword(return) ident(RubyFileTest)operator(.)ident(blockdev_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?c | boolean | True if file1 is a character device) keyword(return) ident(RubyFileTest)operator(.)ident(chardev_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?C | Time | Last change time for file1) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(ctime)operator(()operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?d | boolean | True if file1 exists and is a directory) keyword(return) ident(RubyFileTest)operator(.)ident(directory_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?e | boolean | True if file1 exists) keyword(return) ident(RubyFileTest)operator(.)ident(exist_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?f | boolean | True if file1 exists and is a regular file) keyword(return) ident(RubyFileTest)operator(.)ident(file_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?g | boolean | True if file1 has the \\CF{setgid} bit) keyword(return) ident(RubyFileTest)operator(.)ident(setgid_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?G | boolean | True if file1 exists and has a group ownership equal to the caller's group) keyword(return) ident(RubyFileTest)operator(.)ident(grpowned_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?k | boolean | True if file1 exists and has the sticky bit set) keyword(return) ident(RubyFileTest)operator(.)ident(sticky_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?M | Time | Last modification time for file1) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(mtime)operator(()operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?l | boolean | True if file1 exists and is a symbolic link) keyword(return) ident(RubyFileTest)operator(.)ident(symlink_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?o | boolean | True if file1 exists and is owned by the caller's effective uid) keyword(return) ident(RubyFileTest)operator(.)ident(owned_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?O | boolean | True if file1 exists and is owned by the caller's real uid ) keyword(return) ident(RubyFileTest)operator(.)ident(rowned_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?p | boolean | True if file1 exists and is a fifo) keyword(return) ident(RubyFileTest)operator(.)ident(pipe_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?r | boolean | True if file1 is readable by the effective uid/gid of the caller) keyword(return) ident(RubyFileTest)operator(.)ident(readable_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?R | boolean | True if file is readable by the real uid/gid of the caller) comment(// FIXME: Need to implement an readable_real_p in FileTest) keyword(return) ident(RubyFileTest)operator(.)ident(readable_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?s | int/nil | If file1 has nonzero size, return the size, otherwise nil) keyword(return) ident(RubyFileTest)operator(.)ident(size_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?S | boolean | True if file1 exists and is a socket) keyword(return) ident(RubyFileTest)operator(.)ident(socket_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?u | boolean | True if file1 has the setuid bit set) keyword(return) ident(RubyFileTest)operator(.)ident(setuid_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?w | boolean | True if file1 exists and is writable by effective uid/gid) keyword(return) ident(RubyFileTest)operator(.)ident(writable_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?W | boolean | True if file1 exists and is writable by the real uid/gid) comment(// FIXME: Need to implement an writable_real_p in FileTest) keyword(return) ident(RubyFileTest)operator(.)ident(writable_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?x | boolean | True if file1 exists and is executable by the effective uid/gid) keyword(return) ident(RubyFileTest)operator(.)ident(executable_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?X | boolean | True if file1 exists and is executable by the real uid/gid) keyword(return) ident(RubyFileTest)operator(.)ident(executable_real_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?z | boolean | True if file1 exists and has a zero length) keyword(return) ident(RubyFileTest)operator(.)ident(zero_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?= | boolean | True if the modification times of file1 and file2 are equal) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(mtimeEquals)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?< | boolean | True if the modification time of file1 is prior to that of file2) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(mtimeLessThan)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(case) string)delimiter(')>operator(:) comment(// ?> | boolean | True if the modification time of file1 is after that of file2) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFileStat)operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(.)ident(mtimeGreaterThan)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(case) stringoperator(:) comment(// ?- | boolean | True if file1 and file2 are identical) keyword(return) ident(RubyFileTest)operator(.)ident(identical_p)operator(()ident(recv)operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(default)operator(:) keyword(throw) keyword(new) exception(InternalError)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(backquote)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(aString)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(ByteArrayOutputStream) ident(output) operator(=) keyword(new) pre_type(ByteArrayOutputStream)operator(()operator(\))operator(;) ident(RubyString) ident(string) operator(=) ident(aString)operator(.)ident(convertToString)operator(()operator(\))operator(;) type(int) ident(resultCode) operator(=) ident(ShellLauncher)operator(.)ident(runAndWait)operator(()ident(runtime)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(string)operator(})operator(,) ident(output)operator(\))operator(;) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(resultCode)operator(\))operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(output)operator(.)ident(toByteArray)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyInteger) ident(srand)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(long) ident(oldRandomSeed) operator(=) ident(runtime)operator(.)ident(getRandomSeed)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(RubyInteger) ident(integerSeed) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()ident(MethodIndex)operator(.)ident(TO_INT)operator(,) stringoperator(\))operator(;) ident(runtime)operator(.)ident(setRandomSeed)operator(()ident(integerSeed)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) comment(// Not sure how well this works, but it works much better than) comment(// just currentTimeMillis by itself.) ident(runtime)operator(.)ident(setRandomSeed)operator(()pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(^) ident(recv)operator(.)ident(hashCode)operator(()operator(\)) operator(^) ident(runtime)operator(.)ident(incrementRandomSeedSequence)operator(()operator(\)) operator(^) ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(nextInt)operator(()pre_type(Math)operator(.)ident(max)operator(()integer(1)operator(,) pre_type(Math)operator(.)ident(abs)operator(()operator(()type(int)operator(\))ident(runtime)operator(.)ident(getRandomSeed)operator(()operator(\))operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(setSeed)operator(()ident(runtime)operator(.)ident(getRandomSeed)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(oldRandomSeed)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyNumeric) ident(rand)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(long) ident(ceil)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(ceil) operator(=) integer(0)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) type(byte)type([]) ident(bigCeilBytes) operator(=) operator(()operator(()ident(RubyBignum)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getValue)operator(()operator(\))operator(.)ident(toByteArray)operator(()operator(\))operator(;) pre_type(BigInteger) ident(bigCeil) operator(=) keyword(new) pre_type(BigInteger)operator(()ident(bigCeilBytes)operator(\))operator(.)ident(abs)operator(()operator(\))operator(;) type(byte)type([]) ident(randBytes) operator(=) keyword(new) type(byte)operator([)ident(bigCeilBytes)operator(.)ident(length)operator(])operator(;) ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(nextBytes)operator(()ident(randBytes)operator(\))operator(;) pre_type(BigInteger) ident(result) operator(=) keyword(new) pre_type(BigInteger)operator(()ident(randBytes)operator(\))operator(.)ident(abs)operator(()operator(\))operator(.)ident(mod)operator(()ident(bigCeil)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBignum)operator(()ident(runtime)operator(,) ident(result)operator(\))operator(;) operator(}) ident(RubyInteger) ident(integerCeil) operator(=) operator(()ident(RubyInteger)operator(\))ident(RubyKernel)operator(.)ident(new_integer)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) ident(ceil) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(integerCeil)operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(ceil) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(nextDouble)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(ceil) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()pre_type(Math)operator(.)ident(abs)operator(()ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(nextLong)operator(()operator(\))operator(\)) operator(%) ident(ceil)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(runtime)operator(.)ident(getRandom)operator(()operator(\))operator(.)ident(nextInt)operator(()operator(()type(int)operator(\)) ident(ceil)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(9)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(syscall)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(system)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(resultCode)operator(;) keyword(try) operator({) ident(resultCode) operator(=) ident(ShellLauncher)operator(.)ident(runAndWait)operator(()ident(runtime)operator(,) ident(args)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) ident(resultCode) operator(=) integer(127)operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(()stringoperator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(resultCode)operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newBoolean)operator(()ident(resultCode) operator(==) integer(0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exec)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(resultCode)operator(;) keyword(try) operator({) comment(// TODO: exec should replace the current process.) comment(// This could be possible with JNA. ) ident(resultCode) operator(=) ident(ShellLauncher)operator(.)ident(execAndWait)operator(()ident(runtime)operator(,) ident(args)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoENOENTError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(exit)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(runtime)operator(.)ident(newFixnum)operator(()ident(resultCode)operator(\))operator(})operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(fork)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(RubyInstanceConfig)operator(.)ident(FORK_ENABLED)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) type(int) ident(pid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(fork)operator(()operator(\))operator(;) keyword(if) operator(()ident(pid) operator(==) integer(0)operator(\)) operator({) keyword(try) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(re)operator(\)) operator({) keyword(if) operator(()ident(re)operator(.)ident(getException)operator(()operator(\)) keyword(instanceof) ident(RubySystemExit)operator(\)) operator({) keyword(throw) ident(re)operator(;) operator(}) keyword(return) ident(exit_bang)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(})operator(\))operator(;) operator(}) keyword(catch) operator(()pre_type(Throwable) ident(t)operator(\)) operator({) keyword(return) ident(exit_bang)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(})operator(\))operator(;) operator(}) keyword(return) ident(exit_bang)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({)ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(})operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(pid)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) type(int) ident(result) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(fork)operator(()operator(\))operator(;) keyword(if) operator(()ident(result) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(result)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(tap)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) keyword(return) ident(recv)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Charles O Nutter * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,)ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyLocalJumpError) directive(extends) ident(RubyException) operator({) directive(private) directive(static) ident(ObjectAllocator) ident(LOCALJUMPERROR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyLocalJumpError)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createLocalJumpErrorClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(standardErrorClass)operator(\)) operator({) ident(RubyClass) ident(nameErrorClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(standardErrorClass)operator(,) ident(LOCALJUMPERROR_ALLOCATOR)operator(\))operator(;) ident(nameErrorClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyLocalJumpError)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(nameErrorClass)operator(;) operator(}) directive(private) ident(RubyLocalJumpError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(\))operator(;) operator(}) directive(public) ident(RubyLocalJumpError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(,) pre_type(String) ident(message)operator(,) pre_type(String) ident(reason)operator(,) ident(IRubyObject) ident(exitValue)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(message)operator(\))operator(;) ident(fastSetInternalVariable)operator(()stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()ident(reason)operator(\))operator(\))operator(;) ident(fastSetInternalVariable)operator(()stringoperator(,) ident(exitValue)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(reason)operator(()operator(\)) operator({) keyword(return) ident(fastGetInternalVariable)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(exit_value)operator(()operator(\)) operator({) keyword(return) ident(fastGetInternalVariable)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002 Jan Arne Petersen * Copyright (C\) 2002-2007 Anders Bengtsson * Copyright (C\) 2003 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.ByteArrayInputStream)operator(;) keyword(import) include(java.io.ByteArrayOutputStream)operator(;) keyword(import) include(java.io.EOFException)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.OutputStream)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.Constants)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.IOInputStream)operator(;) keyword(import) include(org.jruby.util.IOOutputStream)operator(;) comment(/** * Marshal module * * @author Anders */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyMarshal) operator({) directive(public) directive(static) ident(RubyModule) ident(createMarshalModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setMarshal)operator(()ident(module)operator(\))operator(;) ident(module)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyMarshal)operator(.)ident(class)operator(\))operator(;) ident(module)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Constants)operator(.)ident(MARSHAL_MAJOR)operator(\))operator(\))operator(;) ident(module)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Constants)operator(.)ident(MARSHAL_MINOR)operator(\))operator(\))operator(;) keyword(return) ident(module)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dump)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(1)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(objectToDump) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(IRubyObject) ident(io) operator(=) pre_constant(null)operator(;) type(int) ident(depthLimit) operator(=) operator(-)integer(1)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>=) integer(2)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) ident(io) operator(=) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(depthLimit) operator(=) operator(()type(int)operator(\)) operator(()operator(()ident(RubyFixnum)operator(\)) ident(args)operator([)integer(1)operator(])operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(3)operator(\)) operator({) ident(depthLimit) operator(=) operator(()type(int)operator(\)) operator(()operator(()ident(RubyFixnum)operator(\)) ident(args)operator([)integer(2)operator(])operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(try) operator({) keyword(if) operator(()ident(io) operator(!=) pre_constant(null)operator(\)) operator({) ident(dumpToStream)operator(()ident(objectToDump)operator(,) ident(outputStream)operator(()ident(io)operator(\))operator(,) ident(depthLimit)operator(\))operator(;) keyword(return) ident(io)operator(;) operator(}) pre_type(ByteArrayOutputStream) ident(stringOutput) operator(=) keyword(new) pre_type(ByteArrayOutputStream)operator(()operator(\))operator(;) ident(dumpToStream)operator(()ident(objectToDump)operator(,) ident(stringOutput)operator(,) ident(depthLimit)operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(stringOutput)operator(.)ident(toByteArray)operator(()operator(\))operator(,)pre_constant(false)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ioe)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) pre_type(OutputStream) ident(outputStream)operator(()ident(IRubyObject) ident(out)operator(\)) operator({) ident(setBinmodeIfPossible)operator(()ident(out)operator(\))operator(;) keyword(if) operator(()ident(out) keyword(instanceof) ident(RubyIO)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyIO)operator(\)) ident(out)operator(\))operator(.)ident(getOutStream)operator(()operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(IOOutputStream)operator(()ident(out)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(setBinmodeIfPossible)operator(()ident(IRubyObject) ident(io)operator(\)) operator({) keyword(if) operator(()ident(io)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) ident(io)operator(.)ident(callMethod)operator(()ident(io)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(try) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(1)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(in) operator(=) pre_constant(null)operator(;) ident(IRubyObject) ident(proc) operator(=) pre_constant(null)operator(;) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(2)operator(:) ident(proc) operator(=) ident(args)operator([)integer(1)operator(])operator(;) keyword(case) integer(1)operator(:) ident(in) operator(=) ident(args)operator([)integer(0)operator(])operator(;) operator(}) pre_type(InputStream) ident(rawInput)operator(;) keyword(if) operator(()ident(in) operator(!=) pre_constant(null) operator(&&) ident(in)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) ident(rawInput) operator(=) ident(inputStream)operator(()ident(in)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(in) operator(!=) pre_constant(null) operator(&&) ident(in)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) ident(RubyString) ident(inString) operator(=) operator(()ident(RubyString)operator(\)) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(in)operator(,) stringoperator(\))operator(;) ident(ByteList) ident(bytes) operator(=) ident(inString)operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(rawInput) operator(=) keyword(new) pre_type(ByteArrayInputStream)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(UnmarshalStream) ident(input) operator(=) keyword(new) ident(UnmarshalStream)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(rawInput)operator(,) ident(proc)operator(\))operator(;) keyword(return) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(EOFException) ident(ee)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(ioe)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) pre_type(InputStream) ident(inputStream)operator(()ident(IRubyObject) ident(in)operator(\)) operator({) ident(setBinmodeIfPossible)operator(()ident(in)operator(\))operator(;) keyword(if) operator(()ident(in) keyword(instanceof) ident(RubyIO)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyIO)operator(\)) ident(in)operator(\))operator(.)ident(getInStream)operator(()operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(IOInputStream)operator(()ident(in)operator(\))operator(;) operator(}) directive(private) directive(static) type(void) ident(dumpToStream)operator(()ident(IRubyObject) ident(object)operator(,) pre_type(OutputStream) ident(rawOutput)operator(,) type(int) ident(depthLimit)operator(\)) directive(throws) exception(IOException) operator({) ident(MarshalStream) ident(output) operator(=) keyword(new) ident(MarshalStream)operator(()ident(object)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(rawOutput)operator(,) ident(depthLimit)operator(\))operator(;) ident(output)operator(.)ident(dumpObject)operator(()ident(object)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(org.joni.NameEntry)operator(;) keyword(import) include(org.joni.Regex)operator(;) keyword(import) include(org.joni.Region)operator(;) keyword(import) include(org.joni.exception.JOniException)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** * @author olabini */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyMatchData) directive(extends) ident(RubyObject) operator({) pre_type(Region) ident(regs)operator(;) comment(// captures) type(int) ident(begin)operator(;) comment(// begin and end are used when not groups defined) type(int) ident(end)operator(;) ident(RubyString) ident(str)operator(;) ident(Regex) ident(pattern)operator(;) directive(public) directive(static) ident(RubyClass) ident(createMatchDataClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// TODO: Is NOT_ALLOCATABLE_ALLOCATOR ok here, since you can't actually instantiate MatchData directly?) ident(RubyClass) ident(matchDataClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setMatchData)operator(()ident(matchDataClass)operator(\))operator(;) ident(runtime)operator(.)ident(defineGlobalConstant)operator(()stringoperator(,) ident(matchDataClass)operator(\))operator(;) ident(matchDataClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyMatchData)operator(;) operator(}) operator(})operator(;) ident(matchDataClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(matchDataClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyMatchData)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(matchDataClass)operator(;) operator(}) directive(public) ident(RubyMatchData)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getMatchData)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(final) directive(static) type(int) ident(MATCH_BUSY) operator(=) ident(USER2_F)operator(;) comment(// rb_match_busy) directive(public) directive(final) type(void) ident(use)operator(()operator(\)) operator({) ident(flags) operator(|=) ident(MATCH_BUSY)operator(;) operator(}) directive(public) directive(final) type(boolean) ident(used)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(MATCH_BUSY)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(private) ident(RubyArray) ident(match_array)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(start)operator(\)) operator({) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(start) operator(!=) integer(0)operator(\)) keyword(return) ident(runtime)operator(.)ident(newEmptyArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(begin) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyString) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(runtime)operator(,) ident(begin)operator(,) ident(end) operator(-) ident(begin)operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(ss)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(ss)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(RubyArray) ident(arr) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(regs)operator(.)ident(numRegs) operator(-) ident(start)operator(\))operator(;) keyword(for) operator(()type(int) ident(i)operator(=)ident(start)operator(;) ident(i)operator(<)ident(regs)operator(.)ident(numRegs)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(regs)operator(.)ident(beg)operator([)ident(i)operator(]) operator(==) operator(-)integer(1)operator(\)) operator({) ident(arr)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(RubyString) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(runtime)operator(,) ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(,) ident(regs)operator(.)ident(end)operator([)ident(i)operator(]) operator(-) ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(ss)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) ident(arr)operator(.)ident(append)operator(()ident(ss)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(arr)operator(;) operator(}) operator(}) directive(public) ident(IRubyObject) ident(group)operator(()type(long) ident(n)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()operator(()type(int)operator(\))ident(n)operator(,) local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(group)operator(()type(int) ident(n)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(n)operator(,) local_variable(this)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) keyword(if) operator(()ident(pattern) operator(==) pre_constant(null)operator(\)) keyword(return) ident(anyToString)operator(()operator(\))operator(;) ident(RubyString) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()operator(\))operator(;) ident(result)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(result)operator(.)ident(append)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(to_s)operator(()operator(\))operator(\))operator(;) ident(NameEntry)type([])ident(names) operator(=) keyword(new) ident(NameEntry)operator([)ident(regs) operator(==) pre_constant(null) operator(?) integer(1) operator(:) ident(regs)operator(.)ident(numRegs)operator(])operator(;) keyword(if) operator(()ident(pattern)operator(.)ident(numberOfNames)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) keyword(for) operator(()pre_type(Iterator)operator(<)ident(NameEntry)operator(>) ident(i) operator(=) ident(pattern)operator(.)ident(namedBackrefIterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(NameEntry) ident(e) operator(=) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(num) operator(:) ident(e)operator(.)ident(getBackRefs)operator(()operator(\))operator(\)) ident(names)operator([)ident(num)operator(]) operator(=) ident(e)operator(;) operator(}) operator(}) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(names)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()ident(i) operator(>) integer(0)operator(\)) operator({) ident(NameEntry) ident(e) operator(=) ident(names)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(e) operator(!=) pre_constant(null)operator(\)) operator({) ident(result)operator(.)ident(cat)operator(()ident(e)operator(.)ident(name)operator(,) ident(e)operator(.)ident(nameP)operator(,) ident(e)operator(.)ident(nameEnd) operator(-) ident(e)operator(.)ident(nameP)operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))operator(()string operator(+) ident(i)operator(\))operator(\))operator(;) operator(}) ident(result)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(v) operator(=) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(i)operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(v)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(result)operator(.)ident(cat)operator(()stringoperator(.)ident(getBytes)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(v)operator(.)ident(inspect)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))string)delimiter(')>operator(\))operator(;) operator(}) comment(/** match_to_a * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) keyword(return) ident(match_array)operator(()ident(getRuntime)operator(()operator(\))operator(,) integer(0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(values_at)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(to_a)operator(()operator(\))operator(.)ident(values_at)operator(()ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(to_a)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** match_captures * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(captures)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(match_array)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(1)operator(\))operator(;) operator(}) directive(private) type(int) ident(nameToBackrefNumber)operator(()ident(RubyString) ident(str)operator(\)) operator({) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(try) operator({) keyword(return) ident(pattern)operator(.)ident(nameToBackrefNumber)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) ident(regs)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JOniException) ident(je)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()ident(je)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(final) type(int) ident(backrefNumber)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) keyword(return) ident(nameToBackrefNumber)operator(()operator(()ident(RubyString)operator(\))operator(()operator(()ident(RubySymbol)operator(\))ident(obj)operator(\))operator(.)ident(id2name)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(nameToBackrefNumber)operator(()operator(()ident(RubyString)operator(\))ident(obj)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(obj)operator(\))operator(;) operator(}) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(op_aref)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(op_aref)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** match_aref * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(IRubyObject) ident(idx)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(op_arefCommon)operator(()ident(idx)operator(\))operator(;) keyword(return) ident(result) operator(==) pre_constant(null) operator(?) operator(()operator(()ident(RubyArray)operator(\))ident(to_a)operator(()operator(\))operator(\))operator(.)ident(aref)operator(()ident(idx)operator(\)) operator(:) ident(result)operator(;) operator(}) comment(/** match_aref * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(IRubyObject) ident(idx)operator(,) ident(IRubyObject) ident(rest)operator(\)) operator({) ident(IRubyObject) ident(result)operator(;) keyword(return) operator(!)ident(rest)operator(.)ident(isNil)operator(()operator(\)) operator(||) operator(()ident(result) operator(=) ident(op_arefCommon)operator(()ident(idx)operator(\))operator(\)) operator(==) pre_constant(null) operator(?) operator(()operator(()ident(RubyArray)operator(\))ident(to_a)operator(()operator(\))operator(\))operator(.)ident(aref)operator(()ident(idx)operator(,) ident(rest)operator(\)) operator(:) ident(result)operator(;) operator(}) directive(private) ident(IRubyObject) ident(op_arefCommon)operator(()ident(IRubyObject) ident(idx)operator(\)) operator({) keyword(if) operator(()ident(idx) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(int) ident(num) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(idx)operator(\))operator(;) keyword(if) operator(()ident(num) operator(>=) integer(0)operator(\)) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(num)operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(idx) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(nameToBackrefNumber)operator(()operator(()ident(RubyString)operator(\))operator(()operator(()ident(RubySymbol)operator(\))ident(idx)operator(\))operator(.)ident(id2name)operator(()operator(\))operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(idx) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(nameToBackrefNumber)operator(()operator(()ident(RubyString)operator(\))ident(idx)operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** match_size * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(size)operator(()operator(\)) operator({) keyword(return) ident(regs) operator(==) pre_constant(null) operator(?) ident(RubyFixnum)operator(.)ident(one)operator(()ident(getRuntime)operator(()operator(\))operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(regs)operator(.)ident(numRegs)operator(\))operator(;) operator(}) comment(/** match_begin * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(begin)operator(()ident(IRubyObject) ident(index)operator(\)) operator({) type(int) ident(i) operator(=) ident(backrefNumber)operator(()ident(index)operator(\))operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(i) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(begin) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(begin)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(i) operator(<) integer(0) operator(||) ident(regs)operator(.)ident(numRegs) operator(<=) ident(i)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(regs)operator(.)ident(beg)operator([)ident(i)operator(]) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) comment(/** match_end * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(end)operator(()ident(IRubyObject) ident(index)operator(\)) operator({) type(int) ident(i) operator(=) ident(backrefNumber)operator(()ident(index)operator(\))operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(i) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(end) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(end)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(i) operator(<) integer(0) operator(||) ident(regs)operator(.)ident(numRegs) operator(<=) ident(i)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(regs)operator(.)ident(end)operator([)ident(i)operator(]) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(regs)operator(.)ident(end)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) comment(/** match_offset * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(offset)operator(()ident(IRubyObject) ident(index)operator(\)) operator({) type(int) ident(i) operator(=) ident(backrefNumber)operator(()ident(index)operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(i) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(begin) operator(<) integer(0)operator(\)) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(begin)operator(\))operator(,)ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(end)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(i) operator(<) integer(0) operator(||) ident(regs)operator(.)ident(numRegs) operator(<=) ident(i)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newIndexError)operator(()string operator(+) ident(i) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(regs)operator(.)ident(beg)operator([)ident(i)operator(]) operator(<) integer(0)operator(\)) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(\))operator(,)ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(regs)operator(.)ident(end)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** match_pre_match * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pre_match)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(ss)operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if)operator(()ident(begin) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(0)operator(,) ident(begin)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if)operator(()ident(regs)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(0)operator(,) ident(regs)operator(.)ident(beg)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(ss)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(ss)operator(;) operator(}) comment(/** match_post_match * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(post_match)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(ss)operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(begin) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(end)operator(,) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(-) ident(end)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(regs)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ss) operator(=) ident(str)operator(.)ident(makeShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(regs)operator(.)ident(end)operator([)integer(0)operator(])operator(,) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(-) ident(regs)operator(.)ident(end)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(if)operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(ss)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(ss)operator(;) operator(}) comment(/** match_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) ident(IRubyObject) ident(ss) operator(=) ident(RubyRegexp)operator(.)ident(last_match)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(ss)operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(ss) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(ss)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(ss)operator(;) operator(}) comment(/** match_string * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(string)operator(()operator(\)) operator({) keyword(return) ident(str)operator(;) comment(//str is frozen) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(original)operator(\)) keyword(return) local_variable(this)operator(;) keyword(if) operator(()operator(!)operator(()ident(getMetaClass)operator(()operator(\)) operator(==) ident(original)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator({) comment(// MRI also does a pointer comparison here) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyMatchData) ident(origMatchData) operator(=) operator(()ident(RubyMatchData)operator(\))ident(original)operator(;) ident(str) operator(=) ident(origMatchData)operator(.)ident(str)operator(;) ident(regs) operator(=) ident(origMatchData)operator(.)ident(regs)operator(;) keyword(return) local_variable(this)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001-2002 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyMath) operator({) comment(/** Create the Math module and add it to the Ruby runtime. * */) directive(public) directive(static) ident(RubyModule) ident(createMathModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(result) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setMath)operator(()ident(result)operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) pre_type(Math)operator(.)ident(E)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(runtime)operator(,) pre_type(Math)operator(.)ident(PI)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyMath)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(static) type(void) ident(domainCheck)operator(()ident(IRubyObject) ident(recv)operator(,) type(double) ident(value)operator(,) pre_type(String) ident(msg)operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEDOMError)operator(()ident(msg)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) type(double) ident(chebylevSerie)operator(()type(double) ident(x)operator(,) type(double) ident(coef)type([])operator(\)) operator({) type(double) ident(b0)operator(,) ident(b1)operator(,) ident(b2)operator(,) ident(twox)operator(;) type(int) ident(i)operator(;) ident(b1) operator(=) float(0.0)operator(;) ident(b0) operator(=) float(0.0)operator(;) ident(b2) operator(=) float(0.0)operator(;) ident(twox) operator(=) float(2.0) operator(*) ident(x)operator(;) keyword(for) operator(()ident(i) operator(=) ident(coef)operator(.)ident(length)operator(-)integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) ident(b2) operator(=) ident(b1)operator(;) ident(b1) operator(=) ident(b0)operator(;) ident(b0) operator(=) ident(twox) operator(*) ident(b1) operator(-) ident(b2) operator(+) ident(coef)operator([)ident(i)operator(])operator(;) operator(}) keyword(return) float(0.5)operator(*)operator(()ident(b0) operator(-) ident(b2)operator(\))operator(;) operator(}) directive(private) directive(static) type(double) ident(sign)operator(()type(double) ident(x)operator(,) type(double) ident(y)operator(\)) operator({) type(double) ident(abs) operator(=) operator(()operator(()ident(x) operator(<) integer(0)operator(\)) operator(?) operator(-)ident(x) operator(:) ident(x)operator(\))operator(;) keyword(return) operator(()ident(y) operator(<) float(0.0)operator(\)) operator(?) operator(-)ident(abs) operator(:) ident(abs)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(atan2)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) type(double) ident(valuea) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(valueb) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(y)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(atan2)operator(()ident(valuea)operator(,) ident(valueb)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(cos)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)pre_type(Math)operator(.)ident(cos)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(sin)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)pre_type(Math)operator(.)ident(sin)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(tan)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)pre_type(Math)operator(.)ident(tan)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(asin)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result) operator(=) pre_type(Math)operator(.)ident(asin)operator(()ident(value)operator(\))operator(;) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(acos)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result) operator(=) pre_type(Math)operator(.)ident(acos)operator(()ident(value)operator(\))operator(;) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(atan)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)pre_type(Math)operator(.)ident(atan)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(cosh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)operator(()pre_type(Math)operator(.)ident(exp)operator(()ident(value)operator(\)) operator(+) pre_type(Math)operator(.)ident(exp)operator(()operator(-)ident(value)operator(\))operator(\)) operator(/) float(2.0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(sinh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)operator(()pre_type(Math)operator(.)ident(exp)operator(()ident(value)operator(\)) operator(-) pre_type(Math)operator(.)ident(exp)operator(()operator(-)ident(value)operator(\))operator(\)) operator(/) float(2.0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(tanh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Math)operator(.)ident(tanh)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(acosh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result)operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\)) operator(||) ident(value) operator(<) integer(1)operator(\)) operator({) ident(result) operator(=) pre_type(Double)operator(.)ident(NaN)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(value) operator(<) float(94906265.62)operator(\)) operator({) ident(result) operator(=) pre_type(Math)operator(.)ident(log)operator(()ident(value) operator(+) pre_type(Math)operator(.)ident(sqrt)operator(()ident(value) operator(*) ident(value) operator(-) float(1.0)operator(\))operator(\))operator(;) operator(}) keyword(else)operator({) ident(result) operator(=) float(0.69314718055994530941723212145818) operator(+) pre_type(Math)operator(.)ident(log)operator(()ident(value)operator(\))operator(;) operator(}) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(double) ident(ASINH_COEF)type([]) operator(=) operator({) operator(-)float(.12820039911738186343372127359268e+0)operator(,) operator(-)float(.58811761189951767565211757138362e-1)operator(,) float(.47274654322124815640725249756029e-2)operator(,) operator(-)float(.49383631626536172101360174790273e-3)operator(,) float(.58506207058557412287494835259321e-4)operator(,) operator(-)float(.74669983289313681354755069217188e-5)operator(,) float(.10011693583558199265966192015812e-5)operator(,) operator(-)float(.13903543858708333608616472258886e-6)operator(,) float(.19823169483172793547317360237148e-7)operator(,) operator(-)float(.28847468417848843612747272800317e-8)operator(,) float(.42672965467159937953457514995907e-9)operator(,) operator(-)float(.63976084654366357868752632309681e-10)operator(,) float(.96991686089064704147878293131179e-11)operator(,) operator(-)float(.14844276972043770830246658365696e-11)operator(,) float(.22903737939027447988040184378983e-12)operator(,) operator(-)float(.35588395132732645159978942651310e-13)operator(,) float(.55639694080056789953374539088554e-14)operator(,) operator(-)float(.87462509599624678045666593520162e-15)operator(,) float(.13815248844526692155868802298129e-15)operator(,) operator(-)float(.21916688282900363984955142264149e-16)operator(,) float(.34904658524827565638313923706880e-17) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(asinh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(y) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(value)operator(\))operator(;) type(double) ident(result)operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) ident(result) operator(=) pre_type(Double)operator(.)ident(NaN)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<=) float(1.05367e-08)operator(\)) operator({) ident(result) operator(=) ident(value)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<=) float(1.0)operator(\)) operator({) ident(result) operator(=) ident(value) operator(*) operator(()float(1.0) operator(+) ident(chebylevSerie)operator(()float(2.0) operator(*) ident(value) operator(*) ident(value) operator(-) float(1.0)operator(,) ident(ASINH_COEF)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<) float(94906265.62)operator(\)) operator({) ident(result) operator(=) pre_type(Math)operator(.)ident(log)operator(()ident(value) operator(+) pre_type(Math)operator(.)ident(sqrt)operator(()ident(value) operator(*) ident(value) operator(+) float(1.0)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) float(0.69314718055994530941723212145818) operator(+) pre_type(Math)operator(.)ident(log)operator(()ident(y)operator(\))operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) ident(result) operator(*=) operator(-)integer(1)operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(double) ident(ATANH_COEF)type([]) operator(=) operator({) float(.9439510239319549230842892218633e-1)operator(,) float(.4919843705578615947200034576668e-1)operator(,) float(.2102593522455432763479327331752e-2)operator(,) float(.1073554449776116584640731045276e-3)operator(,) float(.5978267249293031478642787517872e-5)operator(,) float(.3505062030889134845966834886200e-6)operator(,) float(.2126374343765340350896219314431e-7)operator(,) float(.1321694535715527192129801723055e-8)operator(,) float(.8365875501178070364623604052959e-10)operator(,) float(.5370503749311002163881434587772e-11)operator(,) float(.3486659470157107922971245784290e-12)operator(,) float(.2284549509603433015524024119722e-13)operator(,) float(.1508407105944793044874229067558e-14)operator(,) float(.1002418816804109126136995722837e-15)operator(,) float(.6698674738165069539715526882986e-17)operator(,) float(.4497954546494931083083327624533e-18) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(atanh)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(y) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(value)operator(\))operator(;) type(double) ident(result)operator(;) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(value)operator(\))operator(\)) operator({) ident(result) operator(=) pre_type(Double)operator(.)ident(NaN)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<) float(1.82501e-08)operator(\)) operator({) ident(result) operator(=) ident(value)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<=) float(0.5)operator(\)) operator({) ident(result) operator(=) ident(value) operator(*) operator(()float(1.0) operator(+) ident(chebylevSerie)operator(()float(8.0) operator(*) ident(value) operator(*) ident(value) operator(-) float(1.0)operator(,) ident(ATANH_COEF)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<) float(1.0)operator(\)) operator({) ident(result) operator(=) float(0.5) operator(*) pre_type(Math)operator(.)ident(log)operator(()operator(()float(1.0) operator(+) ident(value)operator(\)) operator(/) operator(()float(1.0) operator(-) ident(value)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(==) float(1.0)operator(\)) operator({) ident(result) operator(=) ident(value) operator(*) pre_type(Double)operator(.)ident(POSITIVE_INFINITY)operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) pre_type(Double)operator(.)ident(NaN)operator(;) operator(}) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(exp)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(exponent)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(exponent)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)pre_type(Math)operator(.)ident(exp)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) comment(/** Returns the natural logarithm of x. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(log)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result) operator(=) pre_type(Math)operator(.)ident(log)operator(()ident(value)operator(\))operator(;) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) comment(/** Returns the base 10 logarithm of x. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(log10)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result) operator(=) pre_type(Math)operator(.)ident(log)operator(()ident(value)operator(\)) operator(/) pre_type(Math)operator(.)ident(log)operator(()integer(10)operator(\))operator(;) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(sqrt)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result)operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) operator({) ident(result) operator(=) pre_type(Double)operator(.)ident(NaN)operator(;) operator(}) keyword(else)operator({) ident(result) operator(=) pre_type(Math)operator(.)ident(sqrt)operator(()ident(value)operator(\))operator(;) operator(}) ident(domainCheck)operator(()ident(recv)operator(,) ident(result)operator(,) stringoperator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(hypot)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) type(double) ident(valuea) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(valueb) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(y)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result)operator(;) keyword(if) operator(()pre_type(Math)operator(.)ident(abs)operator(()ident(valuea)operator(\)) operator(>) pre_type(Math)operator(.)ident(abs)operator(()ident(valueb)operator(\))operator(\)) operator({) ident(result) operator(=) ident(valueb) operator(/) ident(valuea)operator(;) ident(result) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(valuea)operator(\)) operator(*) pre_type(Math)operator(.)ident(sqrt)operator(()integer(1) operator(+) ident(result) operator(*) ident(result)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(valueb) operator(!=) integer(0)operator(\)) operator({) ident(result) operator(=) ident(valuea) operator(/) ident(valueb)operator(;) ident(result) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(valueb)operator(\)) operator(*) pre_type(Math)operator(.)ident(sqrt)operator(()integer(1) operator(+) ident(result) operator(*) ident(result)operator(\))operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) integer(0)operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) comment(/* * x = mantissa * 2 ** exponent * * Where mantissa is in the range of [.5, 1\) * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyArray) ident(frexp)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) type(double) ident(mantissa) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(other)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(short) ident(sign) operator(=) integer(1)operator(;) type(long) ident(exponent) operator(=) integer(0)operator(;) keyword(if) operator(()ident(mantissa) operator(!=) float(0.0)operator(\)) operator({) comment(// Make mantissa same sign so we only have one code path.) keyword(if) operator(()ident(mantissa) operator(<) integer(0)operator(\)) operator({) ident(mantissa) operator(=) operator(-)ident(mantissa)operator(;) ident(sign) operator(=) operator(-)integer(1)operator(;) operator(}) comment(// Increase value to hit lower range.) keyword(for) operator(()operator(;) ident(mantissa) operator(<) float(0.5)operator(;) ident(mantissa) operator(*=) float(2.0)operator(,) ident(exponent) operator(-=)integer(1)operator(\)) operator({) operator(}) comment(// Decrease value to hit upper range. ) keyword(for) operator(()operator(;) ident(mantissa) operator(>=) float(1.0)operator(;) ident(mantissa) operator(*=) float(0.5)operator(,) ident(exponent) operator(+=)integer(1)operator(\)) operator({) operator(}) operator(}) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(sign) operator(*) ident(mantissa)operator(\))operator(,) ident(RubyNumeric)operator(.)ident(int2fix)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(exponent)operator(\))operator(\))operator(;) operator(}) comment(/* * r = x * 2 ** y */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(ldexp)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(mantissa)operator(,) ident(IRubyObject) ident(exponent)operator(\)) operator({) type(double) ident(mantissaValue) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,) ident(mantissa)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(mantissaValue) operator(*) pre_type(Math)operator(.)ident(pow)operator(()float(2.0)operator(,) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(exponent)operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(double) ident(ERFC_COEF)type([]) operator(=) operator({) operator(-)float(.490461212346918080399845440334e-1)operator(,) operator(-)float(.142261205103713642378247418996e0)operator(,) float(.100355821875997955757546767129e-1)operator(,) operator(-)float(.576876469976748476508270255092e-3)operator(,) float(.274199312521960610344221607915e-4)operator(,) operator(-)float(.110431755073445076041353812959e-5)operator(,) float(.384887554203450369499613114982e-7)operator(,) operator(-)float(.118085825338754669696317518016e-8)operator(,) float(.323342158260509096464029309534e-10)operator(,) operator(-)float(.799101594700454875816073747086e-12)operator(,) float(.179907251139614556119672454866e-13)operator(,) operator(-)float(.371863548781869263823168282095e-15)operator(,) float(.710359900371425297116899083947e-17)operator(,) operator(-)float(.126124551191552258324954248533e-18) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(erf)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result)operator(;) type(double) ident(y) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(value)operator(\))operator(;) keyword(if) operator(()ident(y) operator(<=) float(1.49012e-08)operator(\)) operator({) ident(result) operator(=) integer(2) operator(*) ident(value) operator(/) float(1.77245385090551602729816748334)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<=) integer(1)operator(\)) operator({) ident(result) operator(=) ident(value) operator(*) operator(()integer(1) operator(+) ident(chebylevSerie)operator(()integer(2) operator(*) ident(value) operator(*) ident(value) operator(-) integer(1)operator(,) ident(ERFC_COEF)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<) float(6.013687357)operator(\)) operator({) ident(result) operator(=) ident(sign)operator(()integer(1) operator(-) ident(erfc)operator(()ident(recv)operator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(y)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) ident(sign)operator(()integer(1)operator(,) ident(value)operator(\))operator(;) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(double) ident(ERFC2_COEF)type([]) operator(=) operator({) operator(-)float(.69601346602309501127391508262e-1)operator(,) operator(-)float(.411013393626208934898221208467e-1)operator(,) float(.391449586668962688156114370524e-2)operator(,) operator(-)float(.490639565054897916128093545077e-3)operator(,) float(.715747900137703638076089414183e-4)operator(,) operator(-)float(.115307163413123283380823284791e-4)operator(,) float(.199467059020199763505231486771e-5)operator(,) operator(-)float(.364266647159922287393611843071e-6)operator(,) float(.694437261000501258993127721463e-7)operator(,) operator(-)float(.137122090210436601953460514121e-7)operator(,) float(.278838966100713713196386034809e-8)operator(,) operator(-)float(.581416472433116155186479105032e-9)operator(,) float(.123892049175275318118016881795e-9)operator(,) operator(-)float(.269063914530674343239042493789e-10)operator(,) float(.594261435084791098244470968384e-11)operator(,) operator(-)float(.133238673575811957928775442057e-11)operator(,) float(.30280468061771320171736972433e-12)operator(,) operator(-)float(.696664881494103258879586758895e-13)operator(,) float(.162085454105392296981289322763e-13)operator(,) operator(-)float(.380993446525049199987691305773e-14)operator(,) float(.904048781597883114936897101298e-15)operator(,) operator(-)float(.2164006195089607347809812047e-15)operator(,) float(.522210223399585498460798024417e-16)operator(,) operator(-)float(.126972960236455533637241552778e-16)operator(,) float(.310914550427619758383622741295e-17)operator(,) operator(-)float(.766376292032038552400956671481e-18)operator(,) float(.190081925136274520253692973329e-18) operator(})operator(;) directive(private) directive(static) directive(final) type(double) ident(ERFCC_COEF)type([]) operator(=) operator({) float(.715179310202924774503697709496e-1)operator(,) operator(-)float(.265324343376067157558893386681e-1)operator(,) float(.171115397792085588332699194606e-2)operator(,) operator(-)float(.163751663458517884163746404749e-3)operator(,) float(.198712935005520364995974806758e-4)operator(,) operator(-)float(.284371241276655508750175183152e-5)operator(,) float(.460616130896313036969379968464e-6)operator(,) operator(-)float(.822775302587920842057766536366e-7)operator(,) float(.159214187277090112989358340826e-7)operator(,) operator(-)float(.329507136225284321486631665072e-8)operator(,) float(.72234397604005554658126115389e-9)operator(,) operator(-)float(.166485581339872959344695966886e-9)operator(,) float(.401039258823766482077671768814e-10)operator(,) operator(-)float(.100481621442573113272170176283e-10)operator(,) float(.260827591330033380859341009439e-11)operator(,) operator(-)float(.699111056040402486557697812476e-12)operator(,) float(.192949233326170708624205749803e-12)operator(,) operator(-)float(.547013118875433106490125085271e-13)operator(,) float(.158966330976269744839084032762e-13)operator(,) operator(-)float(.47268939801975548392036958429e-14)operator(,) float(.14358733767849847867287399784e-14)operator(,) operator(-)float(.444951056181735839417250062829e-15)operator(,) float(.140481088476823343737305537466e-15)operator(,) operator(-)float(.451381838776421089625963281623e-16)operator(,) float(.147452154104513307787018713262e-16)operator(,) operator(-)float(.489262140694577615436841552532e-17)operator(,) float(.164761214141064673895301522827e-17)operator(,) operator(-)float(.562681717632940809299928521323e-18)operator(,) float(.194744338223207851429197867821e-18) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(RubyFloat) ident(erfc)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) type(double) ident(value) operator(=) operator(()operator(()ident(RubyFloat)operator(\))ident(RubyKernel)operator(.)ident(new_float)operator(()ident(recv)operator(,)ident(x)operator(\))operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(double) ident(result)operator(;) type(double) ident(y) operator(=) pre_type(Math)operator(.)ident(abs)operator(()ident(value)operator(\))operator(;) keyword(if) operator(()ident(value) operator(<=) operator(-)float(6.013687357)operator(\)) operator({) ident(result) operator(=) integer(2)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<) float(1.49012e-08)operator(\)) operator({) ident(result) operator(=) integer(1) operator(-) integer(2) operator(*) ident(value) operator(/) float(1.77245385090551602729816748334)operator(;) operator(}) keyword(else) operator({) type(double) ident(ysq) operator(=) ident(y)operator(*)ident(y)operator(;) keyword(if) operator(()ident(y) operator(<) integer(1)operator(\)) operator({) ident(result) operator(=) integer(1) operator(-) ident(value) operator(*) operator(()integer(1) operator(+) ident(chebylevSerie)operator(()integer(2) operator(*) ident(ysq) operator(-) integer(1)operator(,) ident(ERFC_COEF)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(y) operator(<=) float(4.0)operator(\)) operator({) ident(result) operator(=) pre_type(Math)operator(.)ident(exp)operator(()operator(-)ident(ysq)operator(\))operator(/)ident(y)operator(*)operator(()float(0.5)operator(+)ident(chebylevSerie)operator(()operator(()float(8.0) operator(/) ident(ysq) operator(-) float(5.0)operator(\)) operator(/) float(3.0)operator(,) ident(ERFC2_COEF)operator(\))operator(\))operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) ident(result) operator(=) float(2.0) operator(-) ident(result)operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) ident(result) operator(=) float(2.0) operator(-) ident(result)operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) ident(result) operator(=) float(2.0) operator(-) ident(result)operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) pre_type(Math)operator(.)ident(exp)operator(()operator(-)ident(ysq)operator(\)) operator(/) ident(y) operator(*) operator(()float(0.5) operator(+) ident(chebylevSerie)operator(()float(8.0) operator(/) ident(ysq) operator(-) integer(1)operator(,) ident(ERFCC_COEF)operator(\))operator(\))operator(;) keyword(if) operator(()ident(value) operator(<) integer(0)operator(\)) ident(result) operator(=) float(2.0) operator(-) ident(result)operator(;) operator(}) operator(}) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Jan Arne Petersen * Copyright (C\) 2002 Anders Bengtsson * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallbackFactory)operator(;) keyword(import) include(org.jruby.runtime.MethodBlock)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * The RubyMethod class represents a RubyMethod object. * * You can get such a method by calling the "method" method of an object. * * Note: This was renamed from Method.java * * @author jpetersen * @since 0.2.3 */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyMethod) directive(extends) ident(RubyObject) operator({) directive(protected) ident(RubyModule) ident(implementationModule)operator(;) directive(protected) pre_type(String) ident(methodName)operator(;) directive(protected) ident(RubyModule) ident(originModule)operator(;) directive(protected) pre_type(String) ident(originName)operator(;) directive(protected) ident(DynamicMethod) ident(method)operator(;) directive(protected) ident(IRubyObject) ident(receiver)operator(;) directive(protected) ident(RubyMethod)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) operator(}) comment(/** Create the RubyMethod class and add it to the Ruby runtime. * */) directive(public) directive(static) ident(RubyClass) ident(createMethodClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// TODO: NOT_ALLOCATABLE_ALLOCATOR is probably ok here. Confirm. JRUBY-415) ident(RubyClass) ident(methodClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setMethod)operator(()ident(methodClass)operator(\))operator(;) ident(methodClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyMethod)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(methodClass)operator(;) operator(}) directive(public) directive(static) ident(RubyMethod) ident(newMethod)operator(() ident(RubyModule) ident(implementationModule)operator(,) pre_type(String) ident(methodName)operator(,) ident(RubyModule) ident(originModule)operator(,) pre_type(String) ident(originName)operator(,) ident(DynamicMethod) ident(method)operator(,) ident(IRubyObject) ident(receiver)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(implementationModule)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyMethod) ident(newMethod) operator(=) keyword(new) ident(RubyMethod)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getMethod)operator(()operator(\))operator(\))operator(;) ident(newMethod)operator(.)ident(implementationModule) operator(=) ident(implementationModule)operator(;) ident(newMethod)operator(.)ident(methodName) operator(=) ident(methodName)operator(;) ident(newMethod)operator(.)ident(originModule) operator(=) ident(originModule)operator(;) ident(newMethod)operator(.)ident(originName) operator(=) ident(originName)operator(;) ident(newMethod)operator(.)ident(method) operator(=) ident(method)operator(.)ident(getRealMethod)operator(()operator(\))operator(;) ident(newMethod)operator(.)ident(receiver) operator(=) ident(receiver)operator(;) keyword(return) ident(newMethod)operator(;) operator(}) comment(/** Call the method. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(receiver)operator(,) ident(implementationModule)operator(,) ident(methodName)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(receiver)operator(,) ident(implementationModule)operator(,) ident(methodName)operator(,) ident(arg)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(receiver)operator(,) ident(implementationModule)operator(,) ident(methodName)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(receiver)operator(,) ident(implementationModule)operator(,) ident(methodName)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(method)operator(.)ident(call)operator(()ident(context)operator(,) ident(receiver)operator(,) ident(implementationModule)operator(,) ident(methodName)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** Returns the number of arguments a method accepted. * * @return the number of arguments of a method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(arity)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(method)operator(.)ident(getArity)operator(()operator(\))operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(RubyBoolean) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyMethod)operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyMethod) ident(otherMethod) operator(=) operator(()ident(RubyMethod)operator(\))ident(other)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(implementationModule) operator(==) ident(otherMethod)operator(.)ident(implementationModule) operator(&&) ident(originModule) operator(==) ident(otherMethod)operator(.)ident(originModule) operator(&&) ident(receiver) operator(==) ident(otherMethod)operator(.)ident(receiver) operator(&&) ident(method)operator(.)ident(getRealMethod)operator(()operator(\)) operator(==) ident(otherMethod)operator(.)ident(method)operator(.)ident(getRealMethod)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyMethod) ident(rbClone)operator(()operator(\)) operator({) keyword(return) ident(newMethod)operator(()ident(implementationModule)operator(,) ident(methodName)operator(,) ident(originModule)operator(,) ident(originName)operator(,) ident(method)operator(,) ident(receiver)operator(\))operator(;) operator(}) comment(/** Create a Proc object. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(to_proc)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(CallbackFactory) ident(f) operator(=) ident(runtime)operator(.)ident(callbackFactory)operator(()ident(RubyMethod)operator(.)ident(class)operator(\))operator(;) ident(Block) ident(block) operator(=) ident(MethodBlock)operator(.)ident(createMethodBlock)operator(()ident(context)operator(,) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(,) ident(f)operator(.)ident(getBlockMethod)operator(()stringoperator(\))operator(,) local_variable(this)operator(,) ident(runtime)operator(.)ident(getTopSelf)operator(()operator(\))operator(\))operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(try) operator({) comment(// FIXME: We should not be regenerating this over and over) keyword(return) ident(mproc)operator(()ident(context)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(RetryJump) ident(rj)operator(\)) operator({) comment(// Execute iterateMethod again.) operator(}) operator(}) operator(}) comment(/** Create a Proc object which is called like a ruby method. * * Used by the RubyMethod#to_proc method. * */) directive(private) ident(IRubyObject) ident(mproc)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(try) operator({) ident(context)operator(.)ident(preMproc)operator(()operator(\))operator(;) keyword(return) ident(RubyKernel)operator(.)ident(proc)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(,) ident(block)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postMproc)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** Delegate a block call to a bound method call. * * Used by the RubyMethod#to_proc method. * */) directive(public) directive(static) ident(IRubyObject) ident(bmcall)operator(()ident(IRubyObject) ident(blockArg)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(self)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(blockArg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(if) operator(()ident(blockArg) keyword(instanceof) ident(RubyArray)operator(\)) operator({) comment(// ENEBO: Very wrong) keyword(return) operator(()operator(()ident(RubyMethod)operator(\)) ident(arg1)operator(\))operator(.)ident(call)operator(()ident(context)operator(,) operator(()operator(()ident(RubyArray)operator(\)) ident(blockArg)operator(\))operator(.)ident(toJavaArray)operator(()operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) comment(// ENEBO: Very wrong) keyword(return) operator(()operator(()ident(RubyMethod)operator(\)) ident(arg1)operator(\))operator(.)ident(call)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(blockArg) operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyUnboundMethod) ident(unbind)operator(()ident(Block) ident(unusedBlock)operator(\)) operator({) ident(RubyUnboundMethod) ident(unboundMethod) operator(=) ident(RubyUnboundMethod)operator(.)ident(newUnboundMethod)operator(()ident(implementationModule)operator(,) ident(methodName)operator(,) ident(originModule)operator(,) ident(originName)operator(,) ident(method)operator(\))operator(;) ident(unboundMethod)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(unboundMethod)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) pre_type(StringBuilder) ident(buf) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) type(char) ident(delimeter) operator(=) stringoperator(;) ident(buf)operator(.)ident(append)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(implementationModule)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(attached) operator(=) operator(()operator(()ident(MetaClass)operator(\)) ident(implementationModule)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(;) keyword(if) operator(()ident(receiver) operator(==) pre_constant(null)operator(\)) operator({) ident(buf)operator(.)ident(append)operator(()ident(implementationModule)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(receiver) operator(==) ident(attached)operator(\)) operator({) ident(buf)operator(.)ident(append)operator(()ident(attached)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(delimeter) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(buf)operator(.)ident(append)operator(()ident(receiver)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(attached)operator(.)ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(delimeter) operator(=) stringoperator(;) operator(}) operator(}) keyword(else) operator({) ident(buf)operator(.)ident(append)operator(()ident(originModule)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(implementationModule) operator(!=) ident(originModule)operator(\)) operator({) ident(buf)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(implementationModule)operator(.)ident(getName)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) operator(}) ident(buf)operator(.)ident(append)operator(()ident(delimeter)operator(\))operator(.)ident(append)operator(()ident(methodName)operator(\))operator(.)ident(append)operator(()string)delimiter(')>operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buf)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006-2007 Miguel Covarrubias * Copyright (C\) 2007 William N Dortch * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.reflect.Field)operator(;) keyword(import) include(java.lang.reflect.Method)operator(;) keyword(import) include(java.lang.reflect.Modifier)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.Collections)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.HashSet)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(java.util.concurrent.ConcurrentHashMap)operator(;) keyword(import) include(java.util.concurrent.locks.ReentrantLock)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyConstant)operator(;) keyword(import) include(org.jruby.anno.JavaMethodDescriptor)operator(;) keyword(import) include(org.jruby.anno.TypePopulator)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.compiler.ASTInspector)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.AliasMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.FullFunctionCallbackMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.SimpleCallbackMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.MethodMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.ProcMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.UndefinedMethod)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.WrapperMethod)operator(;) keyword(import) include(org.jruby.parser.StaticScope)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CacheMap)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(static) include(org.jruby.runtime.Visibility)operator(.)operator(*)operator(;) keyword(import) include(static) include(org.jruby.anno.FrameField)operator(.)operator(*)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) keyword(import) include(org.jruby.runtime.callback.Callback)operator(;) keyword(import) include(org.jruby.runtime.component.VariableEntry)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ClassProvider)operator(;) keyword(import) include(org.jruby.util.IdUtil)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.JavaMethod)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodFactory)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyModule) directive(extends) ident(RubyObject) operator({) directive(private) directive(static) directive(final) type(boolean) ident(DEBUG) operator(=) pre_constant(false)operator(;) directive(public) directive(static) ident(RubyClass) ident(createModuleClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(moduleClass)operator(\)) operator({) ident(moduleClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(MODULE)operator(;) ident(moduleClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyModule)operator(;) operator(}) operator(})operator(;) ident(moduleClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyModule)operator(.)ident(class)operator(\))operator(;) ident(moduleClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(ModuleKernelMethods)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(moduleClass)operator(;) operator(}) directive(public) directive(static) type(class) class(ModuleKernelMethods) operator({) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(autoload)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(autoload)operator(()ident(recv)operator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(autoload_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(autoload_p)operator(()ident(context)operator(,) ident(recv)operator(,) ident(arg0)operator(\))operator(;) operator(}) operator(}) directive(static) ident(ObjectAllocator) ident(MODULE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyModule)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(MODULE)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isModule)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isClass)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(isSingleton)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) comment(// superClass may be null.) directive(protected) ident(RubyClass) ident(superClass)operator(;) directive(public) type(int) ident(index)operator(;) directive(public) directive(static) type(class) class(KindOf) operator({) directive(public) directive(static) directive(final) ident(KindOf) ident(DEFAULT_KIND_OF) operator(=) keyword(new) ident(KindOf)operator(()operator(\))operator(;) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(hasModuleInHierarchy)operator(()ident(type)operator(\))operator(;) operator(}) operator(}) directive(public) type(boolean) ident(isInstance)operator(()ident(IRubyObject) ident(object)operator(\)) operator({) keyword(return) ident(kindOf)operator(.)ident(isKindOf)operator(()ident(object)operator(,) local_variable(this)operator(\))operator(;) operator(}) directive(public) ident(KindOf) ident(kindOf) operator(=) ident(KindOf)operator(.)ident(DEFAULT_KIND_OF)operator(;) directive(public) directive(final) type(int) ident(id)operator(;) comment(// Containing class...The parent of Object is null. Object should always be last in chain.) directive(public) ident(RubyModule) ident(parent)operator(;) comment(// ClassId is the name of the class/module sans where it is located.) comment(// If it is null, then it an anonymous class.) directive(protected) pre_type(String) ident(classId)operator(;) comment(// CONSTANT TABLE) comment(// Lock used for variableTable/constantTable writes. The RubyObject variableTable) comment(// write methods are overridden here to use this lock rather than Java) comment(// synchronization for faster concurrent writes for modules/classes.) directive(protected) directive(final) pre_type(ReentrantLock) ident(variableWriteLock) operator(=) keyword(new) pre_type(ReentrantLock)operator(()operator(\))operator(;) directive(protected) directive(transient) directive(volatile) ident(ConstantTableEntry)type([]) ident(constantTable) operator(=) keyword(new) ident(ConstantTableEntry)operator([)ident(CONSTANT_TABLE_DEFAULT_CAPACITY)operator(])operator(;) directive(protected) directive(transient) type(int) ident(constantTableSize)operator(;) directive(protected) directive(transient) type(int) ident(constantTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(CONSTANT_TABLE_DEFAULT_CAPACITY) operator(*) ident(CONSTANT_TABLE_LOAD_FACTOR)operator(\))operator(;) directive(private) directive(final) pre_type(Map)operator(<)pre_type(String)operator(,) ident(DynamicMethod)operator(>) ident(methods) operator(=) keyword(new) pre_type(ConcurrentHashMap)operator(<)pre_type(String)operator(,) ident(DynamicMethod)operator(>)operator(()integer(12)operator(,) float(0.75f)operator(,) integer(1)operator(\))operator(;) comment(// ClassProviders return Java class/module (in #defineOrGetClassUnder and) comment(// #defineOrGetModuleUnder\) when class/module is opened using colon syntax. ) directive(private) directive(transient) pre_type(List)operator(<)ident(ClassProvider)operator(>) ident(classProviders)operator(;) comment(/** separate path for MetaClass construction * */) directive(protected) ident(RubyModule)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(metaClass)operator(,) ident(objectSpace)operator(\))operator(;) ident(id) operator(=) ident(runtime)operator(.)ident(allocModuleId)operator(()operator(\))operator(;) comment(// if (parent == null\) parent = runtime.getObject(\);) ident(setFlag)operator(()ident(USER7_F)operator(,) operator(!)ident(isClass)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** used by MODULE_ALLOCATOR and RubyClass constructors * */) directive(protected) ident(RubyModule)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(metaClass)operator(,) ident(runtime)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** standard path for Module construction * */) directive(protected) ident(RubyModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getModule)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(boolean) ident(needsImplementer)operator(()operator(\)) operator({) keyword(return) ident(getFlag)operator(()ident(USER7_F)operator(\))operator(;) operator(}) comment(/** rb_module_new * */) directive(public) directive(static) ident(RubyModule) ident(newModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(RubyModule)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(/** rb_module_new/rb_define_module_id/rb_name_class/rb_set_class_path * */) directive(public) directive(static) ident(RubyModule) ident(newModule)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(,) ident(RubyModule) ident(parent)operator(,) type(boolean) ident(setParent)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) ident(newModule)operator(()ident(runtime)operator(\))operator(;) ident(module)operator(.)ident(setBaseName)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(setParent)operator(\)) ident(module)operator(.)ident(setParent)operator(()ident(parent)operator(\))operator(;) ident(parent)operator(.)ident(setConstant)operator(()ident(name)operator(,) ident(module)operator(\))operator(;) keyword(return) ident(module)operator(;) operator(}) comment(// synchronized method per JRUBY-1173 (unsafe Double-Checked Locking\)) comment(// FIXME: synchronization is still wrong in CP code) directive(public) directive(synchronized) type(void) ident(addClassProvider)operator(()ident(ClassProvider) ident(provider)operator(\)) operator({) keyword(if) operator(()ident(classProviders) operator(==) pre_constant(null)operator(\)) operator({) pre_type(List)operator(<)ident(ClassProvider)operator(>) ident(cp) operator(=) pre_type(Collections)operator(.)ident(synchronizedList)operator(()keyword(new) pre_type(ArrayList)operator(<)ident(ClassProvider)operator(>)operator(()operator(\))operator(\))operator(;) ident(cp)operator(.)ident(add)operator(()ident(provider)operator(\))operator(;) ident(classProviders) operator(=) ident(cp)operator(;) operator(}) keyword(else) operator({) directive(synchronized)operator(()ident(classProviders)operator(\)) operator({) keyword(if) operator(()operator(!)ident(classProviders)operator(.)ident(contains)operator(()ident(provider)operator(\))operator(\)) operator({) ident(classProviders)operator(.)ident(add)operator(()ident(provider)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) directive(public) type(void) ident(removeClassProvider)operator(()ident(ClassProvider) ident(provider)operator(\)) operator({) keyword(if) operator(()ident(classProviders) operator(!=) pre_constant(null)operator(\)) operator({) ident(classProviders)operator(.)ident(remove)operator(()ident(provider)operator(\))operator(;) operator(}) operator(}) directive(private) ident(RubyClass) ident(searchProvidersForClass)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClazz)operator(\)) operator({) keyword(if) operator(()ident(classProviders) operator(!=) pre_constant(null)operator(\)) operator({) directive(synchronized)operator(()ident(classProviders)operator(\)) operator({) ident(RubyClass) ident(clazz)operator(;) keyword(for) operator(()ident(ClassProvider) ident(classProvider)operator(:) ident(classProviders)operator(\)) operator({) keyword(if) operator(()operator(()ident(clazz) operator(=) ident(classProvider)operator(.)ident(defineClassUnder)operator(()local_variable(this)operator(,) ident(name)operator(,) ident(superClazz)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(clazz)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(private) ident(RubyModule) ident(searchProvidersForModule)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if) operator(()ident(classProviders) operator(!=) pre_constant(null)operator(\)) operator({) directive(synchronized)operator(()ident(classProviders)operator(\)) operator({) ident(RubyModule) ident(module)operator(;) keyword(for) operator(()ident(ClassProvider) ident(classProvider)operator(:) ident(classProviders)operator(\)) operator({) keyword(if) operator(()operator(()ident(module) operator(=) ident(classProvider)operator(.)ident(defineModuleUnder)operator(()local_variable(this)operator(,) ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(module)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** Getter for property superClass. * @return Value of property superClass. */) directive(public) ident(RubyClass) ident(getSuperClass)operator(()operator(\)) operator({) keyword(return) ident(superClass)operator(;) operator(}) directive(protected) type(void) ident(setSuperClass)operator(()ident(RubyClass) ident(superClass)operator(\)) operator({) local_variable(this)operator(.)ident(superClass) operator(=) ident(superClass)operator(;) operator(}) directive(public) ident(RubyModule) ident(getParent)operator(()operator(\)) operator({) keyword(return) ident(parent)operator(;) operator(}) directive(public) type(void) ident(setParent)operator(()ident(RubyModule) ident(parent)operator(\)) operator({) local_variable(this)operator(.)ident(parent) operator(=) ident(parent)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) ident(DynamicMethod)operator(>) ident(getMethods)operator(()operator(\)) operator({) keyword(return) ident(methods)operator(;) operator(}) comment(// note that addMethod now does its own put, so any change made to) comment(// functionality here should be made there as well ) directive(private) type(void) ident(putMethod)operator(()pre_type(String) ident(name)operator(,) ident(DynamicMethod) ident(method)operator(\)) operator({) ident(getMethods)operator(()operator(\))operator(.)ident(put)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** * Is this module one that in an included one (e.g. an IncludedModuleWrapper\). */) directive(public) type(boolean) ident(isIncluded)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) ident(RubyModule) ident(getNonIncludedClass)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) pre_type(String) ident(getBaseName)operator(()operator(\)) operator({) keyword(return) ident(classId)operator(;) operator(}) directive(public) type(void) ident(setBaseName)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(classId) operator(=) ident(name)operator(;) operator(}) directive(private) directive(volatile) pre_type(String) ident(bareName)operator(;) directive(private) directive(volatile) pre_type(String) ident(fullName)operator(;) comment(/** * Generate a fully-qualified class name or a #-style name for anonymous and singleton classes. * * Ruby C equivalent = "classname" * * @return The generated class name */) directive(public) pre_type(String) ident(getName)operator(()operator(\)) operator({) keyword(if) operator(()ident(fullName) operator(==) pre_constant(null)operator(\)) operator({) ident(fullName) operator(=) ident(calculateFullName)operator(()operator(\))operator(;) operator(}) keyword(return) ident(fullName)operator(;) operator(}) directive(private) pre_type(String) ident(calculateFullName)operator(()operator(\)) operator({) keyword(if) operator(()ident(getBaseName)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(bareName) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(isClass)operator(()operator(\))operator(\)) operator({) ident(bareName) operator(=) string operator(+) string operator(+) string operator(+) pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\)) operator(+) string)delimiter(")>operator(;) operator(}) keyword(else) operator({) ident(bareName) operator(=) string operator(+) string operator(+) string operator(+) pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\)) operator(+) string)delimiter(")>operator(;) operator(}) operator(}) keyword(return) ident(bareName)operator(;) operator(}) pre_type(String) ident(result) operator(=) ident(getBaseName)operator(()operator(\))operator(;) ident(RubyClass) ident(objectClass) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(.)ident(getParent)operator(()operator(\))operator(;) ident(p) operator(!=) pre_constant(null) operator(&&) ident(p) operator(!=) ident(objectClass)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getParent)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(pName) operator(=) ident(p)operator(.)ident(getBaseName)operator(()operator(\))operator(;) comment(// This is needed when the enclosing class or module is a singleton.) comment(// In that case, we generated a name such as null::Foo, which broke ) comment(// Marshalling, among others. The correct thing to do in this situation ) comment(// is to insert the generate the name of form # if ) comment(// it's a singleton module/class, which this code accomplishes.) keyword(if)operator(()ident(pName) operator(==) pre_constant(null)operator(\)) operator({) ident(pName) operator(=) ident(p)operator(.)ident(getName)operator(()operator(\))operator(;) operator(}) ident(result) operator(=) ident(pName) operator(+) string operator(+) ident(result)operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** * Create a wrapper to use for including the specified module into this one. * * Ruby C equivalent = "include_class_new" * * @return The module wrapper */) directive(public) ident(IncludedModuleWrapper) ident(newIncludeClass)operator(()ident(RubyClass) ident(superClazz)operator(\)) operator({) ident(IncludedModuleWrapper) ident(includedModule) operator(=) keyword(new) ident(IncludedModuleWrapper)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(superClazz)operator(,) local_variable(this)operator(\))operator(;) comment(// include its parent (and in turn that module's parents\)) keyword(if) operator(()ident(getSuperClass)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(includedModule)operator(.)ident(includeModule)operator(()ident(getSuperClass)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(includedModule)operator(;) operator(}) comment(/** * Finds a class that is within the current module (or class\). * * @param name to be found in this module (or class\) * @return the class or null if no such class */) directive(public) ident(RubyClass) ident(getClass)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(IRubyObject) ident(module)operator(;) keyword(if) operator(()operator(()ident(module) operator(=) ident(getConstantAt)operator(()ident(name)operator(\))operator(\)) keyword(instanceof) ident(RubyClass)operator(\)) operator({) keyword(return) operator(()ident(RubyClass)operator(\))ident(module)operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(public) ident(RubyClass) ident(fastGetClass)operator(()pre_type(String) ident(internedName)operator(\)) operator({) ident(IRubyObject) ident(module)operator(;) keyword(if) operator(()operator(()ident(module) operator(=) ident(fastGetConstantAt)operator(()ident(internedName)operator(\))operator(\)) keyword(instanceof) ident(RubyClass)operator(\)) operator({) keyword(return) operator(()ident(RubyClass)operator(\))ident(module)operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** * Include a new module in this module or class. * * @param arg The module to include */) directive(public) directive(synchronized) type(void) ident(includeModule)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(assert) ident(arg) operator(!=) pre_constant(null)operator(;) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(arg) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(arg)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyModule) ident(module) operator(=) operator(()ident(RubyModule)operator(\)) ident(arg)operator(;) comment(// Make sure the module we include does not already exist) keyword(if) operator(()ident(isSame)operator(()ident(module)operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) ident(infectBy)operator(()ident(module)operator(\))operator(;) ident(doIncludeModule)operator(()ident(module)operator(\))operator(;) operator(}) directive(public) type(void) ident(defineMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) pre_type(Visibility) ident(visibility) operator(=) ident(name)operator(.)ident(equals)operator(()stringoperator(\)) operator(?) ident(PRIVATE) operator(:) ident(PUBLIC)operator(;) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(FullFunctionCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(visibility)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(defineAnnotatedMethod)operator(()pre_type(Class) ident(clazz)operator(,) pre_type(String) ident(name)operator(\)) operator({) comment(// FIXME: This is probably not very efficient, since it loads all methods for each call) type(boolean) ident(foundMethod) operator(=) pre_constant(false)operator(;) keyword(for) operator(()pre_type(Method) ident(method) operator(:) ident(clazz)operator(.)ident(getDeclaredMethods)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(method)operator(.)ident(getName)operator(()operator(\))operator(.)ident(equals)operator(()ident(name)operator(\)) operator(&&) ident(defineAnnotatedMethod)operator(()ident(method)operator(,) ident(MethodFactory)operator(.)ident(createFactory)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(\))operator(\))operator(\)) operator({) ident(foundMethod) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(foundMethod)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(clazz)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(defineAnnotatedConstants)operator(()pre_type(Class) ident(clazz)operator(\)) operator({) pre_type(Field)type([]) ident(declaredFields) operator(=) ident(clazz)operator(.)ident(getDeclaredFields)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Field) ident(field) operator(:) ident(declaredFields)operator(\)) operator({) keyword(if)operator(()pre_type(Modifier)operator(.)ident(isStatic)operator(()ident(field)operator(.)ident(getModifiers)operator(()operator(\))operator(\))operator(\)) operator({) ident(defineAnnotatedConstant)operator(()ident(field)operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(boolean) ident(defineAnnotatedConstant)operator(()pre_type(Field) ident(field)operator(\)) operator({) ident(JRubyConstant) ident(jrubyConstant) operator(=) ident(field)operator(.)ident(getAnnotation)operator(()ident(JRubyConstant)operator(.)ident(class)operator(\))operator(;) keyword(if) operator(()ident(jrubyConstant) operator(==) pre_constant(null)operator(\)) keyword(return) pre_constant(false)operator(;) pre_type(String)type([]) ident(names) operator(=) ident(jrubyConstant)operator(.)ident(value)operator(()operator(\))operator(;) keyword(if)operator(()ident(names)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(names) operator(=) keyword(new) pre_type(String)type([])operator({)ident(field)operator(.)ident(getName)operator(()operator(\))operator(})operator(;) operator(}) pre_type(Class) ident(tp) operator(=) ident(field)operator(.)ident(getType)operator(()operator(\))operator(;) ident(IRubyObject) ident(realVal)operator(;) keyword(try) operator({) keyword(if)operator(()ident(tp) operator(==) pre_type(Integer)operator(.)ident(class) operator(||) ident(tp) operator(==) pre_type(Integer)operator(.)ident(TYPE) operator(||) ident(tp) operator(==) pre_type(Short)operator(.)ident(class) operator(||) ident(tp) operator(==) pre_type(Short)operator(.)ident(TYPE) operator(||) ident(tp) operator(==) pre_type(Byte)operator(.)ident(class) operator(||) ident(tp) operator(==) pre_type(Byte)operator(.)ident(TYPE)operator(\)) operator({) ident(realVal) operator(=) ident(RubyNumeric)operator(.)ident(int2fix)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(field)operator(.)ident(getInt)operator(()pre_constant(null)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(tp) operator(==) pre_type(Boolean)operator(.)ident(class) operator(||) ident(tp) operator(==) pre_type(Boolean)operator(.)ident(TYPE)operator(\)) operator({) ident(realVal) operator(=) ident(field)operator(.)ident(getBoolean)operator(()pre_constant(null)operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(realVal) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) ident(realVal) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(for)operator(()pre_type(String) ident(name) operator(:) ident(names)operator(\)) operator({) local_variable(this)operator(.)ident(fastSetConstant)operator(()ident(name)operator(,) ident(realVal)operator(\))operator(;) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) type(void) ident(defineAnnotatedMethods)operator(()pre_type(Class) ident(clazz)operator(\)) operator({) ident(defineAnnotatedMethodsIndividually)operator(()ident(clazz)operator(\))operator(;) operator(}) directive(public) directive(static) type(class) class(MethodClumper) operator({) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(annotatedMethods) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(staticAnnotatedMethods) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(annotatedMethods1_8) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(staticAnnotatedMethods1_8) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(annotatedMethods1_9) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(staticAnnotatedMethods1_9) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>)operator(()operator(\))operator(;) directive(public) type(void) ident(clump)operator(()pre_type(Class) ident(cls)operator(\)) operator({) pre_type(Method)type([]) ident(declaredMethods) operator(=) ident(cls)operator(.)ident(getDeclaredMethods)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Method) ident(method)operator(:) ident(declaredMethods)operator(\)) operator({) ident(JRubyMethod) ident(anno) operator(=) ident(method)operator(.)ident(getAnnotation)operator(()ident(JRubyMethod)operator(.)ident(class)operator(\))operator(;) keyword(if) operator(()ident(anno) operator(==) pre_constant(null)operator(\)) keyword(continue)operator(;) ident(JavaMethodDescriptor) ident(desc) operator(=) keyword(new) ident(JavaMethodDescriptor)operator(()ident(method)operator(\))operator(;) pre_type(String) ident(name) operator(=) ident(anno)operator(.)ident(name)operator(()operator(\))operator(.)ident(length) operator(==) integer(0) operator(?) ident(method)operator(.)ident(getName)operator(()operator(\)) operator(:) ident(anno)operator(.)ident(name)operator(()operator(\))operator([)integer(0)operator(])operator(;) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>) ident(methodDescs)operator(;) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(methodsHash) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(desc)operator(.)ident(isStatic)operator(\)) operator({) keyword(if) operator(()ident(anno)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(\)) operator({) ident(methodsHash) operator(=) ident(staticAnnotatedMethods1_8)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(anno)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) operator({) ident(methodsHash) operator(=) ident(staticAnnotatedMethods1_9)operator(;) operator(}) keyword(else) operator({) ident(methodsHash) operator(=) ident(staticAnnotatedMethods)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(anno)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_8)operator(\)) operator({) ident(methodsHash) operator(=) ident(annotatedMethods1_8)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(anno)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) operator({) ident(methodsHash) operator(=) ident(annotatedMethods1_9)operator(;) operator(}) keyword(else) operator({) ident(methodsHash) operator(=) ident(annotatedMethods)operator(;) operator(}) operator(}) ident(methodDescs) operator(=) ident(methodsHash)operator(.)ident(get)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(methodDescs) operator(==) pre_constant(null)operator(\)) operator({) ident(methodDescs) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(JavaMethodDescriptor)operator(>)operator(()operator(\))operator(;) ident(methodsHash)operator(.)ident(put)operator(()ident(name)operator(,) ident(methodDescs)operator(\))operator(;) operator(}) ident(methodDescs)operator(.)ident(add)operator(()ident(desc)operator(\))operator(;) operator(}) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getAnnotatedMethods)operator(()operator(\)) operator({) keyword(return) ident(annotatedMethods)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getAnnotatedMethods1_8)operator(()operator(\)) operator({) keyword(return) ident(annotatedMethods1_8)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getAnnotatedMethods1_9)operator(()operator(\)) operator({) keyword(return) ident(annotatedMethods1_9)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getStaticAnnotatedMethods)operator(()operator(\)) operator({) keyword(return) ident(staticAnnotatedMethods)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getStaticAnnotatedMethods1_8)operator(()operator(\)) operator({) keyword(return) ident(staticAnnotatedMethods1_8)operator(;) operator(}) directive(public) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>)operator(>) ident(getStaticAnnotatedMethods1_9)operator(()operator(\)) operator({) keyword(return) ident(staticAnnotatedMethods1_9)operator(;) operator(}) operator(}) directive(public) type(void) ident(defineAnnotatedMethodsIndividually)operator(()pre_type(Class) ident(clazz)operator(\)) operator({) pre_type(String) ident(x) operator(=) ident(clazz)operator(.)ident(getSimpleName)operator(()operator(\))operator(;) ident(TypePopulator) ident(populator) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(RubyInstanceConfig)operator(.)ident(FULL_TRACE_ENABLED)operator(\)) operator({) comment(// we need full traces, use default (slow\) populator) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(populator) operator(=) ident(TypePopulator)operator(.)ident(DEFAULT)operator(;) operator(}) keyword(else) operator({) keyword(try) operator({) pre_type(String) ident(qualifiedName) operator(=) string operator(+) ident(clazz)operator(.)ident(getCanonicalName)operator(()operator(\))operator(.)ident(replace)operator(()stringoperator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) ident(qualifiedName) operator(+) stringoperator(\))operator(;) pre_type(Class) ident(populatorClass) operator(=) pre_type(Class)operator(.)ident(forName)operator(()ident(qualifiedName) operator(+) stringoperator(\))operator(;) ident(populator) operator(=) operator(()ident(TypePopulator)operator(\))ident(populatorClass)operator(.)ident(newInstance)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()pre_type(Throwable) ident(t)operator(\)) operator({) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()stringoperator(\))operator(;) ident(populator) operator(=) ident(TypePopulator)operator(.)ident(DEFAULT)operator(;) operator(}) operator(}) ident(populator)operator(.)ident(populate)operator(()local_variable(this)operator(,) ident(clazz)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(private) type(void) ident(defineAnnotatedMethodsIndexed)operator(()pre_type(Class) ident(clazz)operator(\)) operator({) ident(MethodFactory) ident(methodFactory) operator(=) ident(MethodFactory)operator(.)ident(createFactory)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getJRubyClassLoader)operator(()operator(\))operator(\))operator(;) ident(methodFactory)operator(.)ident(defineIndexedAnnotatedMethods)operator(()local_variable(this)operator(,) ident(clazz)operator(,) ident(methodDefiningCallback)operator(\))operator(;) operator(}) directive(private) directive(static) ident(MethodFactory)operator(.)ident(MethodDefiningCallback) ident(methodDefiningCallback) operator(=) keyword(new) ident(MethodFactory)operator(.)ident(MethodDefiningCallback)operator(()operator(\)) operator({) directive(public) type(void) ident(define)operator(()ident(RubyModule) ident(module)operator(,) ident(JavaMethodDescriptor) ident(desc)operator(,) ident(DynamicMethod) ident(dynamicMethod)operator(\)) operator({) ident(JRubyMethod) ident(jrubyMethod) operator(=) ident(desc)operator(.)ident(anno)operator(;) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(frame)operator(()operator(\))operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(\)) operator({) ident(ASTInspector)operator(.)ident(FRAME_AWARE_METHODS)operator(.)ident(add)operator(()ident(name)operator(\))operator(;) operator(}) operator(}) keyword(if)operator(()ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(BOTH) operator(||) ident(module)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompatVersion)operator(()operator(\)) operator(==) ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\))operator(\)) operator({) ident(RubyModule) ident(singletonClass)operator(;) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(meta)operator(()operator(\))operator(\)) operator({) ident(singletonClass) operator(=) ident(module)operator(.)ident(getSingletonClass)operator(()operator(\))operator(;) ident(dynamicMethod)operator(.)ident(setImplementationClass)operator(()ident(singletonClass)operator(\))operator(;) pre_type(String) ident(baseName)operator(;) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(baseName) operator(=) ident(desc)operator(.)ident(name)operator(;) ident(singletonClass)operator(.)ident(addMethod)operator(()ident(baseName)operator(,) ident(dynamicMethod)operator(\))operator(;) operator(}) keyword(else) operator({) ident(baseName) operator(=) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator([)integer(0)operator(])operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(\)) operator({) ident(singletonClass)operator(.)ident(addMethod)operator(()ident(name)operator(,) ident(dynamicMethod)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(alias) operator(:) ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(\)) operator({) ident(singletonClass)operator(.)ident(defineAlias)operator(()ident(alias)operator(,) ident(baseName)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) pre_type(String) ident(baseName)operator(;) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(baseName) operator(=) ident(desc)operator(.)ident(name)operator(;) ident(module)operator(.)ident(addMethod)operator(()ident(baseName)operator(,) ident(dynamicMethod)operator(\))operator(;) operator(}) keyword(else) operator({) ident(baseName) operator(=) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator([)integer(0)operator(])operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(\)) operator({) ident(module)operator(.)ident(addMethod)operator(()ident(name)operator(,) ident(dynamicMethod)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(alias) operator(:) ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(\)) operator({) ident(module)operator(.)ident(defineAlias)operator(()ident(alias)operator(,) ident(baseName)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(module)operator(()operator(\))operator(\)) operator({) ident(singletonClass) operator(=) ident(module)operator(.)ident(getSingletonClass)operator(()operator(\))operator(;) comment(// module/singleton methods are all defined public) ident(DynamicMethod) ident(moduleMethod) operator(=) ident(dynamicMethod)operator(.)ident(dup)operator(()operator(\))operator(;) ident(moduleMethod)operator(.)ident(setVisibility)operator(()ident(PUBLIC)operator(\))operator(;) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(baseName) operator(=) ident(desc)operator(.)ident(name)operator(;) ident(singletonClass)operator(.)ident(addMethod)operator(()ident(desc)operator(.)ident(name)operator(,) ident(moduleMethod)operator(\))operator(;) operator(}) keyword(else) operator({) ident(baseName) operator(=) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator([)integer(0)operator(])operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(jrubyMethod)operator(.)ident(name)operator(()operator(\))operator(\)) operator({) ident(singletonClass)operator(.)ident(addMethod)operator(()ident(name)operator(,) ident(moduleMethod)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(alias) operator(:) ident(jrubyMethod)operator(.)ident(alias)operator(()operator(\))operator(\)) operator({) ident(singletonClass)operator(.)ident(defineAlias)operator(()ident(alias)operator(,) ident(baseName)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) operator(}) operator(}) operator(})operator(;) directive(public) type(boolean) ident(defineAnnotatedMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(List)operator(<)ident(JavaMethodDescriptor)operator(>) ident(methods)operator(,) ident(MethodFactory) ident(methodFactory)operator(\)) operator({) ident(JavaMethodDescriptor) ident(desc) operator(=) ident(methods)operator(.)ident(get)operator(()integer(0)operator(\))operator(;) keyword(if) operator(()ident(methods)operator(.)ident(size)operator(()operator(\)) operator(==) integer(1)operator(\)) operator({) keyword(return) ident(defineAnnotatedMethod)operator(()ident(desc)operator(,) ident(methodFactory)operator(\))operator(;) operator(}) keyword(else) operator({) ident(DynamicMethod) ident(dynamicMethod) operator(=) ident(methodFactory)operator(.)ident(getAnnotatedMethod)operator(()local_variable(this)operator(,) ident(methods)operator(\))operator(;) ident(methodDefiningCallback)operator(.)ident(define)operator(()local_variable(this)operator(,) ident(desc)operator(,) ident(dynamicMethod)operator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) directive(public) type(boolean) ident(defineAnnotatedMethod)operator(()pre_type(Method) ident(method)operator(,) ident(MethodFactory) ident(methodFactory)operator(\)) operator({) ident(JRubyMethod) ident(jrubyMethod) operator(=) ident(method)operator(.)ident(getAnnotation)operator(()ident(JRubyMethod)operator(.)ident(class)operator(\))operator(;) keyword(if) operator(()ident(jrubyMethod) operator(==) pre_constant(null)operator(\)) keyword(return) pre_constant(false)operator(;) keyword(if)operator(()ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(BOTH) operator(||) ident(getRuntime)operator(()operator(\))operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompatVersion)operator(()operator(\)) operator(==) ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\))operator(\)) operator({) ident(JavaMethodDescriptor) ident(desc) operator(=) keyword(new) ident(JavaMethodDescriptor)operator(()ident(method)operator(\))operator(;) ident(DynamicMethod) ident(dynamicMethod) operator(=) ident(methodFactory)operator(.)ident(getAnnotatedMethod)operator(()local_variable(this)operator(,) ident(desc)operator(\))operator(;) ident(methodDefiningCallback)operator(.)ident(define)operator(()local_variable(this)operator(,) ident(desc)operator(,) ident(dynamicMethod)operator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(defineAnnotatedMethod)operator(()ident(JavaMethodDescriptor) ident(desc)operator(,) ident(MethodFactory) ident(methodFactory)operator(\)) operator({) ident(JRubyMethod) ident(jrubyMethod) operator(=) ident(desc)operator(.)ident(anno)operator(;) keyword(if) operator(()ident(jrubyMethod) operator(==) pre_constant(null)operator(\)) keyword(return) pre_constant(false)operator(;) keyword(if)operator(()ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\)) operator(==) ident(CompatVersion)operator(.)ident(BOTH) operator(||) ident(getRuntime)operator(()operator(\))operator(.)ident(getInstanceConfig)operator(()operator(\))operator(.)ident(getCompatVersion)operator(()operator(\)) operator(==) ident(jrubyMethod)operator(.)ident(compat)operator(()operator(\))operator(\)) operator({) ident(DynamicMethod) ident(dynamicMethod) operator(=) ident(methodFactory)operator(.)ident(getAnnotatedMethod)operator(()local_variable(this)operator(,) ident(desc)operator(\))operator(;) ident(methodDefiningCallback)operator(.)ident(define)operator(()local_variable(this)operator(,) ident(desc)operator(,) ident(dynamicMethod)operator(\))operator(;) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(void) ident(defineFastMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) pre_type(Visibility) ident(visibility) operator(=) ident(name)operator(.)ident(equals)operator(()stringoperator(\)) operator(?) ident(PRIVATE) operator(:) ident(PUBLIC)operator(;) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(SimpleCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(visibility)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(defineFastMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(,) pre_type(Visibility) ident(visibility)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(SimpleCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(visibility)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(definePrivateMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(FullFunctionCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(PRIVATE)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(defineFastPrivateMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(SimpleCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(PRIVATE)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(defineFastProtectedMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(SimpleCallbackMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(PROTECTED)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(undefineMethod)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) ident(UndefinedMethod)operator(.)ident(getInstance)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_undef * */) directive(public) type(void) ident(undef)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\)) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) keyword(new) exception(SecurityException)operator(()stringoperator(\))operator(;) operator(}) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(name)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) ident(name)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(UNDEFINING_BAD)operator(,) stringoperator(+) ident(name) operator(+)stringoperator(\))operator(;) operator(}) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(s0) operator(=) stringoperator(;) ident(RubyModule) ident(c) operator(=) local_variable(this)operator(;) keyword(if) operator(()ident(c)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) operator(()operator(()ident(MetaClass)operator(\))ident(c)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(;) keyword(if) operator(()ident(obj) operator(!=) pre_constant(null) operator(&&) ident(obj) keyword(instanceof) ident(RubyModule)operator(\)) operator({) ident(c) operator(=) operator(()ident(RubyModule)operator(\)) ident(obj)operator(;) ident(s0) operator(=) stringoperator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(c)operator(.)ident(isModule)operator(()operator(\))operator(\)) operator({) ident(s0) operator(=) stringoperator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(s0) operator(+) string operator(+) ident(c)operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) ident(addMethod)operator(()ident(name)operator(,) ident(UndefinedMethod)operator(.)ident(getInstance)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(singleton) operator(=) operator(()operator(()ident(MetaClass)operator(\))local_variable(this)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(;) ident(singleton)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(include_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()operator(!)ident(arg)operator(.)ident(isModule)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(arg)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getModule)operator(()operator(\))operator(\))operator(;) operator(}) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(()ident(p) keyword(instanceof) ident(IncludedModuleWrapper)operator(\)) operator(&&) operator(()operator(()ident(IncludedModuleWrapper)operator(\)) ident(p)operator(\))operator(.)ident(getNonIncludedClass)operator(()operator(\)) operator(==) ident(arg)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(// TODO: Consider a better way of synchronizing ) directive(public) type(void) ident(addMethod)operator(()pre_type(String) ident(name)operator(,) ident(DynamicMethod) ident(method)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\)) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(testFrozen)operator(()stringoperator(\))operator(;) comment(// We can safely reference methods here instead of doing getMethods(\) since if we) comment(// are adding we are not using a IncludedModuleWrapper.) directive(synchronized)operator(()ident(getMethods)operator(()operator(\))operator(\)) operator({) comment(// If we add a method which already is cached in this class, then we should update the ) comment(// cachemap so it stays up to date.) ident(DynamicMethod) ident(existingMethod) operator(=) ident(getMethods)operator(()operator(\))operator(.)ident(put)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) keyword(if) operator(()ident(existingMethod) operator(!=) pre_constant(null)operator(\)) operator({) ident(runtime)operator(.)ident(getCacheMap)operator(()operator(\))operator(.)ident(remove)operator(()ident(existingMethod)operator(\))operator(;) operator(}) operator(}) operator(}) directive(public) type(void) ident(removeMethod)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\)) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(testFrozen)operator(()stringoperator(\))operator(;) comment(// We can safely reference methods here instead of doing getMethods(\) since if we) comment(// are adding we are not using a IncludedModuleWrapper.) directive(synchronized)operator(()ident(getMethods)operator(()operator(\))operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) operator(()ident(DynamicMethod)operator(\)) ident(getMethods)operator(()operator(\))operator(.)ident(remove)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getCacheMap)operator(()operator(\))operator(.)ident(remove)operator(()ident(method)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(singleton) operator(=) operator(()operator(()ident(MetaClass)operator(\))local_variable(this)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(;) ident(singleton)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** * Search through this module and supermodules for method definitions. Cache superclass definitions in this class. * * @param name The name of the method to search for * @return The method, or UndefinedMethod if not found */) directive(public) ident(DynamicMethod) ident(searchMethod)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(getMethods)operator(()operator(\))operator(.)ident(get)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(method)operator(;) keyword(return) ident(superClass) operator(==) pre_constant(null) operator(?) ident(UndefinedMethod)operator(.)ident(getInstance)operator(()operator(\)) operator(:) ident(superClass)operator(.)ident(searchMethod)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Search through this module and supermodules for method definitions. Cache superclass definitions in this class. * * @param name The name of the method to search for * @return The method, or UndefinedMethod if not found */) directive(public) ident(DynamicMethod) ident(retrieveMethod)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(getMethods)operator(()operator(\))operator(.)ident(get)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Search through this module and supermodules for method definitions. Cache superclass definitions in this class. * * @param name The name of the method to search for * @return The method, or UndefinedMethod if not found */) directive(public) ident(RubyModule) ident(findImplementer)operator(()ident(RubyModule) ident(clazz)operator(\)) operator({) keyword(for) operator(()ident(RubyModule) ident(searchModule) operator(=) local_variable(this)operator(;) ident(searchModule) operator(!=) pre_constant(null)operator(;) ident(searchModule) operator(=) ident(searchModule)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(searchModule)operator(.)ident(isSame)operator(()ident(clazz)operator(\))operator(\)) operator({) keyword(return) ident(searchModule)operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(public) type(void) ident(addModuleFunction)operator(()pre_type(String) ident(name)operator(,) ident(DynamicMethod) ident(method)operator(\)) operator({) ident(addMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(addMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** rb_define_module_function * */) directive(public) type(void) ident(defineModuleFunction)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(definePrivateMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** rb_define_module_function * */) directive(public) type(void) ident(definePublicModuleFunction)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(defineMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** rb_define_module_function * */) directive(public) type(void) ident(defineFastModuleFunction)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(defineFastPrivateMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** rb_define_module_function * */) directive(public) type(void) ident(defineFastPublicModuleFunction)operator(()pre_type(String) ident(name)operator(,) pre_type(Callback) ident(method)operator(\)) operator({) ident(defineFastMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastMethod)operator(()ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) comment(/** rb_alias * */) directive(public) directive(synchronized) type(void) ident(defineAlias)operator(()pre_type(String) ident(name)operator(,) pre_type(String) ident(oldName)operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(oldName)operator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) operator(}) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(oldName)operator(\))operator(;) ident(DynamicMethod) ident(oldMethod) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(isModule)operator(()operator(\))operator(\)) operator({) ident(method) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(searchMethod)operator(()ident(oldName)operator(\))operator(;) operator(}) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(oldName) operator(+) string operator(+) operator(()ident(isModule)operator(()operator(\)) operator(?) string operator(:) stringoperator(\)) operator(+) string operator(+) ident(getName)operator(()operator(\)) operator(+) stringoperator(,) ident(oldName)operator(\))operator(;) operator(}) operator(}) ident(CacheMap) ident(cacheMap) operator(=) ident(runtime)operator(.)ident(getCacheMap)operator(()operator(\))operator(;) ident(cacheMap)operator(.)ident(remove)operator(()ident(method)operator(\))operator(;) ident(cacheMap)operator(.)ident(remove)operator(()ident(oldMethod)operator(\))operator(;) keyword(if) operator(()ident(oldMethod) operator(!=) ident(oldMethod)operator(.)ident(getRealMethod)operator(()operator(\))operator(\)) operator({) ident(cacheMap)operator(.)ident(remove)operator(()ident(oldMethod)operator(.)ident(getRealMethod)operator(()operator(\))operator(\))operator(;) operator(}) ident(putMethod)operator(()ident(name)operator(,) keyword(new) ident(AliasMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(oldName)operator(\))operator(\))operator(;) operator(}) directive(public) directive(synchronized) type(void) ident(defineAliases)operator(()pre_type(List)operator(<)pre_type(String)operator(>) ident(aliases)operator(,) pre_type(String) ident(oldName)operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) operator(}) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(oldName)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(isModule)operator(()operator(\))operator(\)) operator({) ident(method) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(searchMethod)operator(()ident(oldName)operator(\))operator(;) operator(}) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(oldName) operator(+) string operator(+) operator(()ident(isModule)operator(()operator(\)) operator(?) string operator(:) stringoperator(\)) operator(+) string operator(+) ident(getName)operator(()operator(\)) operator(+) stringoperator(,) ident(oldName)operator(\))operator(;) operator(}) operator(}) ident(CacheMap) ident(cacheMap) operator(=) ident(runtime)operator(.)ident(getCacheMap)operator(()operator(\))operator(;) ident(cacheMap)operator(.)ident(remove)operator(()ident(method)operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(name)operator(:) ident(aliases)operator(\)) operator({) keyword(if) operator(()ident(oldName)operator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) keyword(continue)operator(;) ident(DynamicMethod) ident(oldMethod) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) ident(cacheMap)operator(.)ident(remove)operator(()ident(oldMethod)operator(\))operator(;) keyword(if) operator(()ident(oldMethod) operator(!=) ident(oldMethod)operator(.)ident(getRealMethod)operator(()operator(\))operator(\)) operator({) ident(cacheMap)operator(.)ident(remove)operator(()ident(oldMethod)operator(.)ident(getRealMethod)operator(()operator(\))operator(\))operator(;) operator(}) ident(putMethod)operator(()ident(name)operator(,) keyword(new) ident(AliasMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(oldName)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** this method should be used only by interpreter or compiler * */) directive(public) ident(RubyClass) ident(defineOrGetClassUnder)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClazz)operator(\)) operator({) comment(// This method is intended only for defining new classes in Ruby code,) comment(// so it uses the allocator of the specified superclass or default to) comment(// the Object allocator. It should NOT be used to define classes that require a native allocator.) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(classObj) operator(=) ident(getConstantAt)operator(()ident(name)operator(\))operator(;) ident(RubyClass) ident(clazz)operator(;) keyword(if) operator(()ident(classObj) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(classObj) keyword(instanceof) ident(RubyClass)operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(name) operator(+) stringoperator(\))operator(;) ident(clazz) operator(=) operator(()ident(RubyClass)operator(\))ident(classObj)operator(;) keyword(if) operator(()ident(superClazz) operator(!=) pre_constant(null)operator(\)) operator({) ident(RubyClass) ident(tmp) operator(=) ident(clazz)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) keyword(while) operator(()ident(tmp) operator(!=) pre_constant(null) operator(&&) ident(tmp)operator(.)ident(isIncluded)operator(()operator(\))operator(\)) ident(tmp) operator(=) ident(tmp)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) comment(// need to skip IncludedModuleWrappers) keyword(if) operator(()ident(tmp) operator(!=) pre_constant(null)operator(\)) ident(tmp) operator(=) ident(tmp)operator(.)ident(getRealClass)operator(()operator(\))operator(;) keyword(if) operator(()ident(tmp) operator(!=) ident(superClazz)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(name)operator(\))operator(;) comment(// superClazz = null;) operator(}) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(classProviders) operator(!=) pre_constant(null) operator(&&) operator(()ident(clazz) operator(=) ident(searchProvidersForClass)operator(()ident(name)operator(,) ident(superClazz)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) comment(// reopen a java class) operator(}) keyword(else) operator({) keyword(if) operator(()ident(superClazz) operator(==) pre_constant(null)operator(\)) ident(superClazz) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) ident(clazz) operator(=) ident(RubyClass)operator(.)ident(newClass)operator(()ident(runtime)operator(,) ident(superClazz)operator(,) ident(name)operator(,) ident(superClazz)operator(.)ident(getAllocator)operator(()operator(\))operator(,) local_variable(this)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(clazz)operator(;) operator(}) comment(/** this method should be used only by interpreter or compiler * */) directive(public) ident(RubyModule) ident(defineOrGetModuleUnder)operator(()pre_type(String) ident(name)operator(\)) operator({) comment(// This method is intended only for defining new modules in Ruby code) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(moduleObj) operator(=) ident(getConstantAt)operator(()ident(name)operator(\))operator(;) ident(RubyModule) ident(module)operator(;) keyword(if) operator(()ident(moduleObj) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(!)ident(moduleObj)operator(.)ident(isModule)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(name) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) ident(module) operator(=) operator(()ident(RubyModule)operator(\))ident(moduleObj)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(classProviders) operator(!=) pre_constant(null) operator(&&) operator(()ident(module) operator(=) ident(searchProvidersForModule)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) comment(// reopen a java module) operator(}) keyword(else) operator({) ident(module) operator(=) ident(RubyModule)operator(.)ident(newModule)operator(()ident(runtime)operator(,) ident(name)operator(,) local_variable(this)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(module)operator(;) operator(}) comment(/** rb_define_class_under * this method should be used only as an API to define/open nested classes */) directive(public) ident(RubyClass) ident(defineClassUnder)operator(()pre_type(String) ident(name)operator(,) ident(RubyClass) ident(superClass)operator(,) ident(ObjectAllocator) ident(allocator)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(defineClassUnder)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(allocator)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** rb_define_module_under * this method should be used only as an API to define/open nested module */) directive(public) ident(RubyModule) ident(defineModuleUnder)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(defineModuleUnder)operator(()ident(name)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(// FIXME: create AttrReaderMethod, AttrWriterMethod, for faster attr access) directive(private) type(void) ident(addAccessor)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(internedName)operator(,) type(boolean) ident(readable)operator(,) type(boolean) ident(writeable)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) comment(// Check the visibility of the previous frame, which will be the frame in which the class is being eval'ed) pre_type(Visibility) ident(attributeScope) operator(=) ident(context)operator(.)ident(getCurrentVisibility)operator(()operator(\))operator(;) keyword(if) operator(()ident(attributeScope) operator(==) ident(PRIVATE)operator(\)) operator({) comment(//FIXME warning) operator(}) keyword(else) keyword(if) operator(()ident(attributeScope) operator(==) ident(MODULE_FUNCTION)operator(\)) operator({) ident(attributeScope) operator(=) ident(PRIVATE)operator(;) comment(// FIXME warning) operator(}) directive(final) pre_type(String) ident(variableName) operator(=) operator(()string operator(+) ident(internedName)operator(\))operator(.)ident(intern)operator(()operator(\))operator(;) keyword(if) operator(()ident(readable)operator(\)) operator({) comment(// FIXME: should visibility be set to current visibility?) ident(addMethod)operator(()ident(internedName)operator(,) keyword(new) ident(JavaMethod)operator(()local_variable(this)operator(,) ident(PUBLIC)operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(0)operator(\)) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(runtime)operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(0)operator(\))operator(;) ident(IRubyObject) ident(variable) operator(=) ident(self)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastGetInstanceVariable)operator(()ident(variableName)operator(\))operator(;) keyword(return) ident(variable) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(variable)operator(;) operator(}) annotation(@Override) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(noArguments)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(fastNewSymbol)operator(()ident(internedName)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(writeable)operator(\)) operator({) ident(internedName) operator(=) operator(()ident(internedName) operator(+) stringoperator(\))operator(.)ident(intern)operator(()operator(\))operator(;) comment(// FIXME: should visibility be set to current visibility?) ident(addMethod)operator(()ident(internedName)operator(,) keyword(new) ident(JavaMethod)operator(()local_variable(this)operator(,) ident(PUBLIC)operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) comment(// ENEBO: Can anyone get args to be anything but length 1?) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(1)operator(\)) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(runtime)operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) ident(self)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastSetInstanceVariable)operator(()ident(variableName)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(singleArgument)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(fastNewSymbol)operator(()ident(internedName)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** set_method_visibility * */) directive(public) type(void) ident(setMethodVisibility)operator(()ident(IRubyObject)type([]) ident(methods)operator(,) pre_type(Visibility) ident(visibility)operator(\)) operator({) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(methods)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(exportMethod)operator(()ident(methods)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(,) ident(visibility)operator(\))operator(;) operator(}) operator(}) comment(/** rb_export_method * */) directive(public) type(void) ident(exportMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Visibility) ident(visibility)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) operator(}) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) string operator(+) operator(()ident(isModule)operator(()operator(\)) operator(?) string operator(:) stringoperator(\)) operator(+) string operator(+) ident(getName)operator(()operator(\)) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) keyword(if) operator(()ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(!=) ident(visibility)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(method)operator(.)ident(getImplementationClass)operator(()operator(\))operator(\)) operator({) ident(method)operator(.)ident(setVisibility)operator(()ident(visibility)operator(\))operator(;) operator(}) keyword(else) operator({) comment(// FIXME: Why was this using a FullFunctionCallbackMethod before that did callSuper?) ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(WrapperMethod)operator(()local_variable(this)operator(,) ident(method)operator(,) ident(visibility)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** * MRI: rb_method_boundp * */) directive(public) type(boolean) ident(isMethodBound)operator(()pre_type(String) ident(name)operator(,) type(boolean) ident(checkVisibility)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()operator(!)ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(return) operator(!)operator(()ident(checkVisibility) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(==) ident(PRIVATE)operator(\))operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) ident(IRubyObject) ident(newMethod)operator(()ident(IRubyObject) ident(receiver)operator(,) pre_type(String) ident(name)operator(,) type(boolean) ident(bound)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) string operator(+) local_variable(this)operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) ident(RubyModule) ident(implementationModule) operator(=) ident(method)operator(.)ident(getImplementationClass)operator(()operator(\))operator(;) ident(RubyModule) ident(originModule) operator(=) local_variable(this)operator(;) keyword(while) operator(()ident(originModule) operator(!=) ident(implementationModule) operator(&&) ident(originModule)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(originModule) operator(=) operator(()operator(()ident(MetaClass)operator(\))ident(originModule)operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(;) operator(}) ident(RubyMethod) ident(newMethod) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(bound)operator(\)) operator({) ident(newMethod) operator(=) ident(RubyMethod)operator(.)ident(newMethod)operator(()ident(implementationModule)operator(,) ident(name)operator(,) ident(originModule)operator(,) ident(name)operator(,) ident(method)operator(,) ident(receiver)operator(\))operator(;) operator(}) keyword(else) operator({) ident(newMethod) operator(=) ident(RubyUnboundMethod)operator(.)ident(newUnboundMethod)operator(()ident(implementationModule)operator(,) ident(name)operator(,) ident(originModule)operator(,) ident(name)operator(,) ident(method)operator(\))operator(;) operator(}) ident(newMethod)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(newMethod)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(define_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) ident(arg0)operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(;) ident(DynamicMethod) ident(newMethod) operator(=) pre_constant(null)operator(;) pre_type(Visibility) ident(visibility) operator(=) ident(context)operator(.)ident(getCurrentVisibility)operator(()operator(\))operator(;) keyword(if) operator(()ident(visibility) operator(==) ident(MODULE_FUNCTION)operator(\)) ident(visibility) operator(=) ident(PRIVATE)operator(;) ident(RubyProc) ident(proc) operator(=) ident(runtime)operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(,) ident(block)operator(\))operator(;) comment(// a normal block passed to define_method changes to do arity checking; make it a lambda) ident(proc)operator(.)ident(getBlock)operator(()operator(\))operator(.)ident(type) operator(=) ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(;) ident(newMethod) operator(=) ident(createProcMethod)operator(()ident(name)operator(,) ident(visibility)operator(,) ident(proc)operator(\))operator(;) ident(RuntimeHelpers)operator(.)ident(addInstanceMethod)operator(()local_variable(this)operator(,) ident(name)operator(,) ident(newMethod)operator(,) ident(context)operator(.)ident(getPreviousVisibility)operator(()operator(\))operator(,) ident(context)operator(,) ident(runtime)operator(\))operator(;) keyword(return) ident(proc)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(define_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(body)operator(;) pre_type(String) ident(name) operator(=) ident(arg0)operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(;) ident(DynamicMethod) ident(newMethod) operator(=) pre_constant(null)operator(;) pre_type(Visibility) ident(visibility) operator(=) ident(context)operator(.)ident(getCurrentVisibility)operator(()operator(\))operator(;) keyword(if) operator(()ident(visibility) operator(==) ident(MODULE_FUNCTION)operator(\)) ident(visibility) operator(=) ident(PRIVATE)operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getProc)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(arg1)operator(\))operator(\)) operator({) comment(// double-testing args.length here, but it avoids duplicating the proc-setup code in two places) ident(RubyProc) ident(proc) operator(=) operator(()ident(RubyProc)operator(\))ident(arg1)operator(;) ident(body) operator(=) ident(proc)operator(;) ident(newMethod) operator(=) ident(createProcMethod)operator(()ident(name)operator(,) ident(visibility)operator(,) ident(proc)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(runtime)operator(.)ident(getMethod)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(arg1)operator(\))operator(\)) operator({) ident(RubyMethod) ident(method) operator(=) operator(()ident(RubyMethod)operator(\))ident(arg1)operator(;) ident(body) operator(=) ident(method)operator(;) ident(newMethod) operator(=) keyword(new) ident(MethodMethod)operator(()local_variable(this)operator(,) ident(method)operator(.)ident(unbind)operator(()pre_constant(null)operator(\))operator(,) ident(visibility)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(arg1)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(RuntimeHelpers)operator(.)ident(addInstanceMethod)operator(()local_variable(this)operator(,) ident(name)operator(,) ident(newMethod)operator(,) ident(context)operator(.)ident(getPreviousVisibility)operator(()operator(\))operator(,) ident(context)operator(,) ident(runtime)operator(\))operator(;) keyword(return) ident(body)operator(;) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(define_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(define_method)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(define_method)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) operator(}) directive(private) ident(DynamicMethod) ident(createProcMethod)operator(()pre_type(String) ident(name)operator(,) pre_type(Visibility) ident(visibility)operator(,) ident(RubyProc) ident(proc)operator(\)) operator({) ident(Block) ident(block) operator(=) ident(proc)operator(.)ident(getBlock)operator(()operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getFrame)operator(()operator(\))operator(.)ident(setKlazz)operator(()local_variable(this)operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getFrame)operator(()operator(\))operator(.)ident(setName)operator(()ident(name)operator(\))operator(;) ident(StaticScope) ident(scope) operator(=) ident(block)operator(.)ident(getBody)operator(()operator(\))operator(.)ident(getStaticScope)operator(()operator(\))operator(;) comment(// for zsupers in define_method (blech!\) we tell the proc scope to act as the "argument" scope) ident(scope)operator(.)ident(setArgumentScope)operator(()pre_constant(true)operator(\))operator(;) ident(Arity) ident(arity) operator(=) ident(block)operator(.)ident(arity)operator(()operator(\))operator(;) comment(// just using required is broken...but no more broken than before zsuper refactoring) ident(scope)operator(.)ident(setRequiredArgs)operator(()ident(arity)operator(.)ident(required)operator(()operator(\))operator(\))operator(;) keyword(if)operator(()operator(!)ident(arity)operator(.)ident(isFixed)operator(()operator(\))operator(\)) operator({) ident(scope)operator(.)ident(setRestArg)operator(()ident(arity)operator(.)ident(required)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(ProcMethod)operator(()local_variable(this)operator(,) ident(proc)operator(,) ident(visibility)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(executeUnder)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(Callback) ident(method)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(context)operator(.)ident(preExecuteUnder)operator(()local_variable(this)operator(,) ident(block)operator(\))operator(;) keyword(try) operator({) keyword(return) ident(method)operator(.)ident(execute)operator(()local_variable(this)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postExecuteUnder)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(name)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(getBaseName)operator(()operator(\)) operator(==) pre_constant(null) operator(?) string operator(:) ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(cloneMethods)operator(()ident(RubyModule) ident(clone)operator(\)) operator({) ident(RubyModule) ident(realType) operator(=) local_variable(this)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Map)operator(.)ident(Entry)operator(<)pre_type(String)operator(,) ident(DynamicMethod)operator(>) ident(entry) operator(:) ident(getMethods)operator(()operator(\))operator(.)ident(entrySet)operator(()operator(\))operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(entry)operator(.)ident(getValue)operator(()operator(\))operator(;) comment(// Do not clone cached methods) comment(// FIXME: MRI copies all methods here) keyword(if) operator(()ident(method)operator(.)ident(getImplementationClass)operator(()operator(\)) operator(==) ident(realType) operator(||) ident(method) keyword(instanceof) ident(UndefinedMethod)operator(\)) operator({) comment(// A cloned method now belongs to a new class. Set it.) comment(// TODO: Make DynamicMethod immutable) ident(DynamicMethod) ident(clonedMethod) operator(=) ident(method)operator(.)ident(dup)operator(()operator(\))operator(;) ident(clonedMethod)operator(.)ident(setImplementationClass)operator(()ident(clone)operator(\))operator(;) ident(clone)operator(.)ident(putMethod)operator(()ident(entry)operator(.)ident(getKey)operator(()operator(\))operator(,) ident(clonedMethod)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(clone)operator(;) operator(}) comment(/** rb_mod_init_copy * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\)) operator({) local_variable(super)operator(.)ident(initialize_copy)operator(()ident(original)operator(\))operator(;) ident(RubyModule) ident(originalModule) operator(=) operator(()ident(RubyModule)operator(\))ident(original)operator(;) keyword(if) operator(()operator(!)ident(getMetaClass)operator(()operator(\))operator(.)ident(isSingleton)operator(()operator(\))operator(\)) ident(setMetaClass)operator(()ident(originalModule)operator(.)ident(getSingletonClassClone)operator(()operator(\))operator(\))operator(;) ident(setSuperClass)operator(()ident(originalModule)operator(.)ident(getSuperClass)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(originalModule)operator(.)ident(hasVariables)operator(()operator(\))operator(\))operator({) ident(syncVariables)operator(()ident(originalModule)operator(.)ident(getVariableList)operator(()operator(\))operator(\))operator(;) operator(}) ident(originalModule)operator(.)ident(cloneMethods)operator(()local_variable(this)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_mod_included_modules * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(included_modules)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) ident(getSuperClass)operator(()operator(\))operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(p)operator(.)ident(isIncluded)operator(()operator(\))operator(\)) operator({) ident(ary)operator(.)ident(append)operator(()ident(p)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_mod_ancestors * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(ancestors)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(getAncestorList)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(RubyArray) ident(ancestors)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(getAncestorList)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(getAncestorList)operator(()operator(\)) operator({) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if)operator(()operator(!)ident(p)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(p)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) directive(public) type(boolean) ident(hasModuleInHierarchy)operator(()ident(RubyModule) ident(type)operator(\)) operator({) comment(// XXX: This check previously used callMethod("=="\) to check for equality between classes) comment(// when scanning the hierarchy. However the == check may be safe; we should only ever have) comment(// one instance bound to a given type/constant. If it's found to be unsafe, examine ways) comment(// to avoid the == call.) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(p)operator(.)ident(getNonIncludedClass)operator(()operator(\)) operator(==) ident(type)operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(hashCode)operator(()operator(\)) operator({) keyword(return) ident(id)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(id)operator(\))operator(;) operator(}) comment(/** rb_mod_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if)operator(()ident(isSingleton)operator(()operator(\))operator(\))operator({) ident(IRubyObject) ident(attached) operator(=) operator(()operator(()ident(MetaClass)operator(\))local_variable(this)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(;) pre_type(StringBuilder) ident(buffer) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(attached) operator(!=) pre_constant(null)operator(\)) operator({) comment(// FIXME: figure out why we get null sometimes) keyword(if)operator(()ident(attached) keyword(instanceof) ident(RubyClass) operator(||) ident(attached) keyword(instanceof) ident(RubyModule)operator(\))operator({) ident(buffer)operator(.)ident(append)operator(()ident(attached)operator(.)ident(inspect)operator(()operator(\))operator(\))operator(;) operator(})keyword(else)operator({) ident(buffer)operator(.)ident(append)operator(()ident(attached)operator(.)ident(anyToString)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) ident(buffer)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buffer)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_mod_eqq * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(RubyBoolean) ident(op_eqq)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isInstance)operator(()ident(obj)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) local_variable(super)operator(.)ident(op_equal)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_mod_freeze * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(to_s)operator(()operator(\))operator(;) keyword(return) local_variable(super)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) operator(}) comment(/** rb_mod_le * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(isKindOfModule)operator(()operator(()ident(RubyModule)operator(\)) ident(obj)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(()operator(()ident(RubyModule)operator(\)) ident(obj)operator(\))operator(.)ident(isKindOfModule)operator(()local_variable(this)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_mod_lt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(obj) operator(==) local_variable(this) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(op_le)operator(()ident(obj)operator(\))operator(;) operator(}) comment(/** rb_mod_ge * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyModule)operator(\)) ident(obj)operator(\))operator(.)ident(op_le)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** rb_mod_gt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(obj) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(op_ge)operator(()ident(obj)operator(\))operator(;) operator(}) comment(/** rb_mod_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(obj)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(RubyModule) ident(module) operator(=) operator(()ident(RubyModule)operator(\)) ident(obj)operator(;) keyword(if) operator(()ident(module)operator(.)ident(isKindOfModule)operator(()local_variable(this)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()local_variable(this)operator(.)ident(isKindOfModule)operator(()ident(module)operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(-)integer(1)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(isKindOfModule)operator(()ident(RubyModule) ident(type)operator(\)) operator({) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(p)operator(.)ident(isSame)operator(()ident(type)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(protected) type(boolean) ident(isSame)operator(()ident(RubyModule) ident(module)operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(module)operator(;) operator(}) comment(/** rb_mod_initialize * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) comment(// class and module bodies default to public, so make the block's visibility public. JRUBY-1185.) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()ident(PUBLIC)operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(,) local_variable(this)operator(,) local_variable(this)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(addReadWriteAttribute)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(addAccessor)operator(()ident(context)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(true)operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(public) type(void) ident(addReadAttribute)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(addAccessor)operator(()ident(context)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(true)operator(,) pre_constant(false)operator(\))operator(;) operator(}) directive(public) type(void) ident(addWriteAttribute)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) ident(addAccessor)operator(()ident(context)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(;) operator(}) comment(/** rb_mod_attr * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(attr)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(boolean) ident(writeable) operator(=) ident(args)operator(.)ident(length) operator(>) integer(1) operator(?) ident(args)operator([)integer(1)operator(])operator(.)ident(isTrue)operator(()operator(\)) operator(:) pre_constant(false)operator(;) ident(addAccessor)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(true)operator(,) ident(writeable)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * @deprecated */) directive(public) ident(IRubyObject) ident(attr_reader)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(attr_reader)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** rb_mod_attr_reader * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(attr_reader)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(addAccessor)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(true)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_mod_attr_writer * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(attr_writer)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(addAccessor)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * @deprecated */) directive(public) ident(IRubyObject) ident(attr_accessor)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(attr_accessor)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** rb_mod_attr_accessor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(reads) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(IRubyObject) ident(attr_accessor)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) comment(// This is almost always already interned, since it will be called with a symbol in most cases) comment(// but when created from Java code, we might get an argument that needs to be interned.) comment(// addAccessor has as a precondition that the string MUST be interned) ident(addAccessor)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) pre_constant(true)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * Get a list of all instance methods names of the provided visibility unless not is true, then * get all methods which are not the provided * * @param args passed into one of the Ruby instance_method methods * @param visibility to find matching instance methods against * @param not if true only find methods not matching supplied visibility * @return a RubyArray of instance method names */) directive(private) ident(RubyArray) ident(instance_methods)operator(()ident(IRubyObject)type([]) ident(args)operator(,) directive(final) pre_type(Visibility) ident(visibility)operator(,) type(boolean) ident(not)operator(\)) operator({) type(boolean) ident(includeSuper) operator(=) ident(args)operator(.)ident(length) operator(>) integer(0) operator(?) ident(args)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\)) operator(:) pre_constant(true)operator(;) ident(RubyArray) ident(ary) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) pre_type(Set)operator(<)pre_type(String)operator(>) ident(seen) operator(=) keyword(new) pre_type(HashSet)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(type) operator(=) local_variable(this)operator(;) ident(type) operator(!=) pre_constant(null)operator(;) ident(type) operator(=) ident(type)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) ident(RubyModule) ident(realType) operator(=) ident(type)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(Iterator) ident(iter) operator(=) ident(type)operator(.)ident(getMethods)operator(()operator(\))operator(.)ident(entrySet)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(Map)operator(.)ident(Entry) ident(entry) operator(=) operator(()pre_type(Map)operator(.)ident(Entry)operator(\)) ident(iter)operator(.)ident(next)operator(()operator(\))operator(;) ident(DynamicMethod) ident(method) operator(=) operator(()ident(DynamicMethod)operator(\)) ident(entry)operator(.)ident(getValue)operator(()operator(\))operator(;) pre_type(String) ident(methodName) operator(=) operator(()pre_type(String)operator(\)) ident(entry)operator(.)ident(getKey)operator(()operator(\))operator(;) keyword(if) operator(()operator(!) ident(seen)operator(.)ident(contains)operator(()ident(methodName)operator(\))operator(\)) operator({) ident(seen)operator(.)ident(add)operator(()ident(methodName)operator(\))operator(;) keyword(if) operator(()ident(method)operator(.)ident(getImplementationClass)operator(()operator(\)) operator(==) ident(realType) operator(&&) operator(()operator(!)ident(not) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(==) ident(visibility) operator(||) operator(()ident(not) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(!=) ident(visibility)operator(\))operator(\)) operator(&&) operator(!) ident(method)operator(.)ident(isUndefined)operator(()operator(\))operator(\)) operator({) ident(ary)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(methodName)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(if) operator(()operator(!)ident(includeSuper)operator(\)) operator({) keyword(break)operator(;) operator(}) operator(}) keyword(return) ident(ary)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(instance_methods)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(instance_methods)operator(()ident(args)operator(,) ident(PRIVATE)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(public_instance_methods)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(instance_methods)operator(()ident(args)operator(,) ident(PUBLIC)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(instance_method)operator(()ident(IRubyObject) ident(symbol)operator(\)) operator({) keyword(return) ident(newMethod)operator(()pre_constant(null)operator(,) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_class_protected_instance_methods * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(protected_instance_methods)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(instance_methods)operator(()ident(args)operator(,) ident(PROTECTED)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_class_private_instance_methods * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(private_instance_methods)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(instance_methods)operator(()ident(args)operator(,) ident(PRIVATE)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_mod_append_features * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(RubyModule) ident(append_features)operator(()ident(IRubyObject) ident(module)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(module) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) comment(// MRI error message says Class, even though Module is ok ) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(module)operator(,)ident(getRuntime)operator(()operator(\))operator(.)ident(getClassClass)operator(()operator(\))operator(\))operator(;) operator(}) operator(()operator(()ident(RubyModule)operator(\)) ident(module)operator(\))operator(.)ident(includeModule)operator(()local_variable(this)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_mod_extend_object * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(extend_object)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(obj)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(includeModule)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) comment(/** rb_mod_include * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(RubyModule) ident(include)operator(()ident(IRubyObject)type([]) ident(modules)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) comment(// MRI checks all types first:) keyword(for) operator(()type(int) ident(i) operator(=) ident(modules)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) ident(modules)operator([)ident(i)operator(])operator(;) keyword(if) operator(()operator(!)ident(obj)operator(.)ident(isModule)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(obj)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getModule)operator(()operator(\))operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) ident(modules)operator(.)ident(length) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) ident(modules)operator([)ident(i)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) ident(modules)operator([)ident(i)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(included)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(extended)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(setVisibility)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) pre_type(Visibility) ident(visibility)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) comment(// Note: we change current frames visibility here because the methods which call) comment(// this method are all "fast" (e.g. they do not created their own frame\).) ident(context)operator(.)ident(setCurrentVisibility)operator(()ident(visibility)operator(\))operator(;) operator(}) keyword(else) operator({) ident(setMethodVisibility)operator(()ident(args)operator(,) ident(visibility)operator(\))operator(;) operator(}) operator(}) comment(/** rb_mod_public * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(writes) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(RubyModule) ident(rbPublic)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(setVisibility)operator(()ident(context)operator(,) ident(args)operator(,) ident(PUBLIC)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_mod_protected * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(writes) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(RubyModule) ident(rbProtected)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(setVisibility)operator(()ident(context)operator(,) ident(args)operator(,) ident(PROTECTED)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_mod_private * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(writes) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(RubyModule) ident(rbPrivate)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(setVisibility)operator(()ident(context)operator(,) ident(args)operator(,) ident(PRIVATE)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_mod_modfunc * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(,) ident(writes) operator(=) ident(VISIBILITY)operator(\)) directive(public) ident(RubyModule) ident(module_function)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(context)operator(.)ident(setCurrentVisibility)operator(()ident(MODULE_FUNCTION)operator(\))operator(;) operator(}) keyword(else) operator({) ident(setMethodVisibility)operator(()ident(args)operator(,) ident(PRIVATE)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(;) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(name)operator(\))operator(;) keyword(assert) operator(!)ident(method)operator(.)ident(isUndefined)operator(()operator(\)) operator(:) string operator(+) ident(name) operator(+) stringoperator(;) ident(getSingletonClass)operator(()operator(\))operator(.)ident(addMethod)operator(()ident(name)operator(,) keyword(new) ident(WrapperMethod)operator(()ident(getSingletonClass)operator(()operator(\))operator(,) ident(method)operator(,) ident(PUBLIC)operator(\))operator(\))operator(;) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(method_added)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(nothing)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(method_removed)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(nothing)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(method_undefined)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(nothing)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(method_defined_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) keyword(return) ident(isMethodBound)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(,) pre_constant(true)operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(public_method_defined)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(!)ident(method)operator(.)ident(isUndefined)operator(()operator(\)) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(==) ident(PUBLIC)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(protected_method_defined)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(!)ident(method)operator(.)ident(isUndefined)operator(()operator(\)) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(==) ident(PROTECTED)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(private_method_defined)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) ident(DynamicMethod) ident(method) operator(=) ident(searchMethod)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(!)ident(method)operator(.)ident(isUndefined)operator(()operator(\)) operator(&&) ident(method)operator(.)ident(getVisibility)operator(()operator(\)) operator(==) ident(PRIVATE)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyModule) ident(public_class_method)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(getMetaClass)operator(()operator(\))operator(.)ident(setMethodVisibility)operator(()ident(args)operator(,) ident(PUBLIC)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyModule) ident(private_class_method)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(getMetaClass)operator(()operator(\))operator(.)ident(setMethodVisibility)operator(()ident(args)operator(,) ident(PRIVATE)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(RubyModule) ident(alias_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(newId)operator(,) ident(IRubyObject) ident(oldId)operator(\)) operator({) pre_type(String) ident(newName) operator(=) ident(newId)operator(.)ident(asJavaString)operator(()operator(\))operator(;) ident(defineAlias)operator(()ident(newName)operator(,) ident(oldId)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) ident(RubySymbol) ident(newSym) operator(=) ident(newId) keyword(instanceof) ident(RubySymbol) operator(?) operator(()ident(RubySymbol)operator(\))ident(newId) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSymbol)operator(()ident(newName)operator(\))operator(;) keyword(if) operator(()ident(isSingleton)operator(()operator(\))operator(\)) operator({) operator(()operator(()ident(MetaClass)operator(\))local_variable(this)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(newSym)operator(\))operator(;) operator(}) keyword(else) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(newSym)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(RubyModule) ident(undef_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(undef)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(module_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(module_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(module_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(module_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(module_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(RubyModule) ident(remove_method)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(;)ident(i)operator(<)ident(args)operator(.)ident(length)operator(;)ident(i)operator(++)operator(\)) operator({) ident(removeMethod)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyModule) ident(module)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(module)operator(\))operator(;) ident(output)operator(.)ident(writeString)operator(()ident(MarshalStream)operator(.)ident(getPathFromClass)operator(()ident(module)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyModule) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) pre_type(String) ident(name) operator(=) ident(RubyString)operator(.)ident(byteListToString)operator(()ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(\))operator(;) ident(RubyModule) ident(result) operator(=) ident(UnmarshalStream)operator(.)ident(getModuleFromPath)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/* Module class methods */) comment(/** * Return an array of nested modules or classes. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(nesting)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyModule) ident(object) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) ident(StaticScope) ident(scope) operator(=) ident(context)operator(.)ident(getCurrentScope)operator(()operator(\))operator(.)ident(getStaticScope)operator(()operator(\))operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()ident(StaticScope) ident(current) operator(=) ident(scope)operator(;) ident(current)operator(.)ident(getModule)operator(()operator(\)) operator(!=) ident(object)operator(;) ident(current) operator(=) ident(current)operator(.)ident(getPreviousCRefScope)operator(()operator(\))operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(current)operator(.)ident(getModule)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) type(void) ident(doIncludeModule)operator(()ident(RubyModule) ident(includedModule)operator(\)) operator({) type(boolean) ident(skip) operator(=) pre_constant(false)operator(;) ident(RubyModule) ident(currentModule) operator(=) local_variable(this)operator(;) keyword(while) operator(()ident(includedModule) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(getNonIncludedClass)operator(()operator(\)) operator(==) ident(includedModule)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) type(boolean) ident(superclassSeen) operator(=) pre_constant(false)operator(;) comment(// scan class hierarchy for module) keyword(for) operator(()ident(RubyModule) ident(superClass) operator(=) local_variable(this)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) ident(superClass) operator(!=) pre_constant(null)operator(;) ident(superClass) operator(=) ident(superClass)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(superClass) keyword(instanceof) ident(IncludedModuleWrapper)operator(\)) operator({) keyword(if) operator(()ident(superClass)operator(.)ident(getNonIncludedClass)operator(()operator(\)) operator(==) ident(includedModule)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)ident(superclassSeen)operator(\)) operator({) ident(currentModule) operator(=) ident(superClass)operator(;) operator(}) ident(skip) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) operator(}) operator(}) keyword(else) operator({) ident(superclassSeen) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(skip)operator(\)) operator({) comment(// blow away caches for any methods that are redefined by module) ident(getRuntime)operator(()operator(\))operator(.)ident(getCacheMap)operator(()operator(\))operator(.)ident(moduleIncluded)operator(()ident(currentModule)operator(,) ident(includedModule)operator(\))operator(;) comment(// In the current logic, if we get here we know that module is not an) comment(// IncludedModuleWrapper, so there's no need to fish out the delegate. But just) comment(// in case the logic should change later, let's do it anyway:) ident(currentModule)operator(.)ident(setSuperClass)operator(()keyword(new) ident(IncludedModuleWrapper)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(currentModule)operator(.)ident(getSuperClass)operator(()operator(\))operator(,) ident(includedModule)operator(.)ident(getNonIncludedClass)operator(()operator(\))operator(\))operator(\))operator(;) ident(currentModule) operator(=) ident(currentModule)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) ident(includedModule) operator(=) ident(includedModule)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) ident(skip) operator(=) pre_constant(false)operator(;) operator(}) operator(}) comment(//) comment(////////////////// CLASS VARIABLE RUBY METHODS ////////////////) comment(//) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(class_variable_defined_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(var)operator(\)) operator({) pre_type(String) ident(internedName) operator(=) ident(validateClassVariable)operator(()ident(var)operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(intern)operator(()operator(\))operator(\))operator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(fastHasClassVariable)operator(()ident(internedName)operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_mod_cvar_get * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(class_variable_get)operator(()ident(IRubyObject) ident(var)operator(\)) operator({) keyword(return) ident(fastGetClassVar)operator(()ident(validateClassVariable)operator(()ident(var)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(.)ident(intern)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_mod_cvar_set * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(class_variable_set)operator(()ident(IRubyObject) ident(var)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(fastSetClassVar)operator(()ident(validateClassVariable)operator(()ident(var)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** rb_mod_remove_cvar * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(remove_class_variable)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) pre_type(String) ident(javaName) operator(=) ident(validateClassVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(deleteClassVariable)operator(()ident(javaName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(if) operator(()ident(fastIsClassVarDefined)operator(()ident(javaName)operator(\))operator(\)) operator({) keyword(throw) ident(cannotRemoveError)operator(()ident(javaName)operator(\))operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(javaName) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(javaName)operator(\))operator(;) operator(}) comment(/** rb_mod_class_variables * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(class_variables)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) pre_type(Set)operator(<)pre_type(String)operator(>) ident(names) operator(=) keyword(new) pre_type(HashSet)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(p)operator(.)ident(getClassVariableNameList)operator(()operator(\))operator(\)) operator({) ident(names)operator(.)ident(add)operator(()ident(name)operator(\))operator(;) operator(}) operator(}) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(ary) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(names)operator(\)) operator({) ident(ary)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(ary)operator(;) operator(}) comment(//) comment(////////////////// CONSTANT RUBY METHODS ////////////////) comment(//) comment(/** rb_mod_const_defined * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(const_defined_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(symbol)operator(\)) operator({) comment(// Note: includes part of fix for JRUBY-1339) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(fastIsConstantDefined)operator(()ident(validateConstant)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(.)ident(intern)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_mod_const_get * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(const_get)operator(()ident(IRubyObject) ident(symbol)operator(\)) operator({) keyword(return) ident(fastGetConstant)operator(()ident(validateConstant)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(.)ident(intern)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_mod_const_set * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(const_set)operator(()ident(IRubyObject) ident(symbol)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(return) ident(fastSetConstant)operator(()ident(validateConstant)operator(()ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(remove_const)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) pre_type(String) ident(id) operator(=) ident(validateConstant)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(deleteConstant)operator(()ident(id)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(removeAutoLoadFor)operator(()ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(id)operator(\))operator(;) comment(// FIXME: I'm not sure this is right, but the old code returned) comment(// the undef, which definitely isn't right...) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(hasConstantInHierarchy)operator(()ident(id)operator(\))operator(\)) operator({) keyword(throw) ident(cannotRemoveError)operator(()ident(id)operator(\))operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(id) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(id)operator(\))operator(;) operator(}) directive(private) type(boolean) ident(hasConstantInHierarchy)operator(()directive(final) pre_type(String) ident(name)operator(\)) operator({) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(p)operator(.)ident(hasConstant)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Base implementation of Module#const_missing, throws NameError for specific missing constant. * * @param name The constant name which was found to be missing * @return Nothing! Absolutely nothing! (though subclasses might choose to return something\) */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(const_missing)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(,) ident(Block) ident(block)operator(\)) operator({) comment(/* Uninitialized constant */) keyword(if) operator(()local_variable(this) operator(!=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(,) string operator(+) ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(,) ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_mod_constants * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(constants)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(array) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) ident(RubyModule) ident(objectClass) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getModule)operator(()operator(\)) operator(==) local_variable(this)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(objectClass)operator(.)ident(getStoredConstantNameList)operator(()operator(\))operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(objectClass) operator(==) local_variable(this)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(getStoredConstantNameList)operator(()operator(\))operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) pre_type(Set)operator(<)pre_type(String)operator(>) ident(names) operator(=) keyword(new) pre_type(HashSet)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(p) operator(!=) pre_constant(null)operator(;) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(objectClass) operator(!=) ident(p)operator(\)) operator({) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(p)operator(.)ident(getStoredConstantNameList)operator(()operator(\))operator(\)) operator({) ident(names)operator(.)ident(add)operator(()ident(name)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(names)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(array)operator(;) operator(}) comment(//) comment(////////////////// CLASS VARIABLE API METHODS ////////////////) comment(//) comment(/** * Set the named class variable to the given value, provided taint and freeze allow setting it. * * Ruby C equivalent = "rb_cvar_set" * * @param name The variable name to set * @param value The value to set it to */) directive(public) ident(IRubyObject) ident(setClassVar)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(hasClassVariable)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(module)operator(.)ident(storeClassVariable)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) ident(storeClassVariable)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastSetClassVar)operator(()directive(final) pre_type(String) ident(internedName)operator(,) directive(final) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(fastHasClassVariable)operator(()ident(internedName)operator(\))operator(\)) operator({) keyword(return) ident(module)operator(.)ident(fastStoreClassVariable)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) ident(fastStoreClassVariable)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * Retrieve the specified class variable, searching through this module, included modules, and supermodules. * * Ruby C equivalent = "rb_cvar_get" * * @param name The name of the variable to retrieve * @return The variable's value, or throws NameError if not found */) directive(public) ident(IRubyObject) ident(getClassVar)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(name)operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(module)operator(.)ident(variableTableFetch)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(value)operator(;) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastGetClassVar)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(internedName)operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(module)operator(.)ident(variableTableFastFetch)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(value)operator(;) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(internedName) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(internedName)operator(\))operator(;) operator(}) comment(/** * Is class var defined? * * Ruby C equivalent = "rb_cvar_defined" * * @param name The class var to determine "is defined?" * @return true if true, false if false */) directive(public) type(boolean) ident(isClassVarDefined)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(hasClassVariable)operator(()ident(name)operator(\))operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(fastIsClassVarDefined)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(fastHasClassVariable)operator(()ident(internedName)operator(\))operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** rb_mod_remove_cvar * * FIXME: any good reason to have two identical methods? (same as remove_class_variable\) */) directive(public) ident(IRubyObject) ident(removeCvar)operator(()ident(IRubyObject) ident(name)operator(\)) operator({) comment(// Wrong Parameter ?) pre_type(String) ident(internedName) operator(=) ident(validateClassVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(deleteClassVariable)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(if) operator(()ident(fastIsClassVarDefined)operator(()ident(internedName)operator(\))operator(\)) operator({) keyword(throw) ident(cannotRemoveError)operator(()ident(internedName)operator(\))operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(internedName) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(internedName)operator(\))operator(;) operator(}) comment(//) comment(////////////////// CONSTANT API METHODS ////////////////) comment(//) directive(public) ident(IRubyObject) ident(getConstantAt)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(fetchConstant)operator(()ident(name)operator(\))operator(\)) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) ident(deleteConstant)operator(()ident(name)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoload)operator(()ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastGetConstantAt)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(fastFetchConstant)operator(()ident(internedName)operator(\))operator(\)) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) ident(deleteConstant)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoload)operator(()ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(\))operator(;) operator(}) comment(/** * Retrieve the named constant, invoking 'const_missing' should that be appropriate. * * @param name The constant to retrieve * @return The value for the constant, or null if not found */) directive(public) ident(IRubyObject) ident(getConstant)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(;) type(boolean) ident(retryForModule) operator(=) pre_constant(false)operator(;) ident(IRubyObject) ident(value)operator(;) ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(retry)operator(:) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(while) operator(()ident(p) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(p)operator(.)ident(constantTableFetch)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) ident(p)operator(.)ident(deleteConstant)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoload)operator(() ident(p)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(break)operator(;) operator(}) keyword(continue)operator(;) operator(}) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(retryForModule) operator(&&) operator(!)ident(isClass)operator(()operator(\))operator(\)) operator({) ident(retryForModule) operator(=) pre_constant(true)operator(;) ident(p) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) keyword(continue) ident(retry)operator(;) operator(}) keyword(break)operator(;) operator(}) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastGetConstant)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\))operator(;) type(boolean) ident(retryForModule) operator(=) pre_constant(false)operator(;) ident(IRubyObject) ident(value)operator(;) ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) ident(retry)operator(:) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(while) operator(()ident(p) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(p)operator(.)ident(constantTableFastFetch)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) ident(p)operator(.)ident(deleteConstant)operator(()ident(internedName)operator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoload)operator(() ident(p)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(break)operator(;) operator(}) keyword(continue)operator(;) operator(}) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(retryForModule) operator(&&) operator(!)ident(isClass)operator(()operator(\))operator(\)) operator({) ident(retryForModule) operator(=) pre_constant(true)operator(;) ident(p) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) keyword(continue) ident(retry)operator(;) operator(}) keyword(break)operator(;) operator(}) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()ident(internedName)operator(\))operator(\))operator(;) operator(}) comment(// not actually called anywhere (all known uses call the fast version\)) directive(public) ident(IRubyObject) ident(getConstantFrom)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(fastGetConstantFrom)operator(()ident(name)operator(.)ident(intern)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastGetConstantFrom)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\))operator(;) ident(RubyClass) ident(objectClass) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) ident(RubyModule) ident(p) operator(=) local_variable(this)operator(;) keyword(while) operator(()ident(p) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(p)operator(.)ident(constantTableFastFetch)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) operator({) keyword(if) operator(()ident(p) operator(==) ident(objectClass) operator(&&) local_variable(this) operator(!=) ident(objectClass)operator(\)) operator({) pre_type(String) ident(badCName) operator(=) ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(CONSTANT_BAD_REFERENCE)operator(,) string operator(+) ident(internedName) operator(+) string operator(+) ident(badCName)operator(,) ident(badCName)operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) ident(p)operator(.)ident(deleteConstant)operator(()ident(internedName)operator(\))operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoload)operator(() ident(p)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(break)operator(;) operator(}) keyword(continue)operator(;) operator(}) ident(p) operator(=) ident(p)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(fastNewSymbol)operator(()ident(internedName)operator(\))operator(\))operator(;) operator(}) comment(/** * Set the named constant on this module. Also, if the value provided is another Module and * that module has not yet been named, assign it the specified name. * * @param name The name to assign * @param value The value to assign to it; if an unnamed Module, also set its basename to name * @return The result of setting the variable. */) directive(public) ident(IRubyObject) ident(setConstant)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(IRubyObject) ident(oldValue)operator(;) keyword(if) operator(()operator(()ident(oldValue) operator(=) ident(fetchConstant)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(oldValue) operator(==) ident(UNDEF)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(removeAutoLoadFor)operator(()ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(\))operator(;) operator(}) keyword(else) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(CONSTANT_ALREADY_INITIALIZED)operator(,) string operator(+) ident(name)operator(,) ident(name)operator(\))operator(;) operator(}) operator(}) ident(storeConstant)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) comment(// if adding a module under a constant name, set that module's basename to the constant name) keyword(if) operator(()ident(value) keyword(instanceof) ident(RubyModule)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) operator(()ident(RubyModule)operator(\))ident(value)operator(;) keyword(if) operator(()ident(module)operator(.)ident(getBaseName)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(module)operator(.)ident(setBaseName)operator(()ident(name)operator(\))operator(;) ident(module)operator(.)ident(setParent)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/* module.setParent(this\); */) operator(}) keyword(return) ident(value)operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastSetConstant)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(IRubyObject) ident(oldValue)operator(;) keyword(if) operator(()operator(()ident(oldValue) operator(=) ident(fastFetchConstant)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(oldValue) operator(==) ident(UNDEF)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(removeAutoLoadFor)operator(()ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(\))operator(;) operator(}) keyword(else) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(CONSTANT_ALREADY_INITIALIZED)operator(,) string operator(+) ident(internedName)operator(,) ident(internedName)operator(\))operator(;) operator(}) operator(}) ident(fastStoreConstant)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) comment(// if adding a module under a constant name, set that module's basename to the constant name) keyword(if) operator(()ident(value) keyword(instanceof) ident(RubyModule)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) operator(()ident(RubyModule)operator(\))ident(value)operator(;) keyword(if) operator(()ident(module)operator(.)ident(getBaseName)operator(()operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(module)operator(.)ident(setBaseName)operator(()ident(internedName)operator(\))operator(;) ident(module)operator(.)ident(setParent)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/* module.setParent(this\); */) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** rb_define_const * */) directive(public) type(void) ident(defineConstant)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(value) operator(!=) pre_constant(null)operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getClassClass)operator(()operator(\))operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(IdUtil)operator(.)ident(isValidConstantName)operator(()ident(name)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name)operator(,) ident(name)operator(\))operator(;) operator(}) ident(setConstant)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) comment(// Fix for JRUBY-1339 - search hierarchy for constant) comment(/** rb_const_defined_at * */) directive(public) type(boolean) ident(isConstantDefined)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(;) type(boolean) ident(isObject) operator(=) local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) pre_type(Object) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(module)operator(.)ident(constantTableFetch)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) keyword(return) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoloadFor)operator(() ident(module)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(name)operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) operator(}) keyword(while) operator(()ident(isObject) operator(&&) operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null) operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) type(boolean) ident(fastIsConstantDefined)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\))operator(;) type(boolean) ident(isObject) operator(=) local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) pre_type(Object) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(module)operator(.)ident(constantTableFastFetch)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(value) operator(!=) ident(UNDEF)operator(\)) keyword(return) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(autoloadFor)operator(() ident(module)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(internedName)operator(\)) operator(!=) pre_constant(null)operator(;) operator(}) operator(}) keyword(while) operator(()ident(isObject) operator(&&) operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null) operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) comment(//) comment(////////////////// COMMON CONSTANT / CVAR METHODS ////////////////) comment(//) directive(private) ident(RaiseException) ident(cannotRemoveError)operator(()pre_type(String) ident(id)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(id) operator(+) string operator(+) ident(getName)operator(()operator(\))operator(,) ident(id)operator(\))operator(;) operator(}) comment(//) comment(////////////////// INTERNAL MODULE VARIABLE API METHODS ////////////////) comment(//) comment(/** * Behaves similarly to {@link #getClassVar(String\)}. Searches this * class/module and its ancestors for the specified internal * variable. * * @param name the internal variable name * @return the value of the specified internal variable if found, else null * @see #setInternalModuleVariable(String, IRubyObject\) */) directive(public) type(boolean) ident(hasInternalModuleVariable)operator(()directive(final) pre_type(String) ident(name)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(hasInternalVariable)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Behaves similarly to {@link #getClassVar(String\)}. Searches this * class/module and its ancestors for the specified internal * variable. * * @param name the internal variable name * @return the value of the specified internal variable if found, else null * @see #setInternalModuleVariable(String, IRubyObject\) */) directive(public) ident(IRubyObject) ident(searchInternalModuleVariable)operator(()directive(final) pre_type(String) ident(name)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) ident(IRubyObject) ident(value)operator(;) keyword(do) operator({) keyword(if) operator(()operator(()ident(value) operator(=) ident(module)operator(.)ident(getInternalVariable)operator(()ident(name)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** * Behaves similarly to {@link #setClassVar(String, IRubyObject\)}. If the * specified internal variable is found in this class/module or an ancestor, * it is set where found. Otherwise it is set in this module. * * @param name the internal variable name * @param value the internal variable value * @see #searchInternalModuleVariable(String\) */) directive(public) type(void) ident(setInternalModuleVariable)operator(()directive(final) pre_type(String) ident(name)operator(,) directive(final) ident(IRubyObject) ident(value)operator(\)) operator({) ident(RubyModule) ident(module) operator(=) local_variable(this)operator(;) keyword(do) operator({) keyword(if) operator(()ident(module)operator(.)ident(hasInternalVariable)operator(()ident(name)operator(\))operator(\)) operator({) ident(module)operator(.)ident(setInternalVariable)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) keyword(return)operator(;) operator(}) operator(}) keyword(while) operator(()operator(()ident(module) operator(=) ident(module)operator(.)ident(getSuperClass)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\))operator(;) ident(setInternalVariable)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) comment(//) comment(////////////////// LOW-LEVEL CLASS VARIABLE INTERFACE ////////////////) comment(//) comment(// fetch/store/list class variables for this module) comment(//) directive(public) type(boolean) ident(hasClassVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableContains)operator(()ident(name)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(fastHasClassVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fetchClassVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastFetchClassVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(storeClassVariable)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(name)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureClassVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastStoreClassVariable)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(internedName)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureClassVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(deleteClassVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(name)operator(\))operator(;) ident(ensureClassVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getClassVariableList)operator(()operator(\)) operator({) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(list)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(getClassVariableNameList)operator(()operator(\)) operator({) pre_type(ArrayList)operator(<)pre_type(String)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isClassVariable)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) directive(protected) directive(static) directive(final) pre_type(String) ident(ERR_INSECURE_SET_CLASS_VAR) operator(=) stringoperator(;) directive(protected) directive(static) directive(final) pre_type(String) ident(ERR_FROZEN_CVAR_TYPE) operator(=) stringoperator(;) directive(protected) directive(final) pre_type(String) ident(validateClassVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isValidClassVariableName)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(name)operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) directive(protected) directive(final) type(void) ident(ensureClassVariablesSettable)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isFrozen)operator(()operator(\)) operator(&&) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(<) integer(4) operator(||) ident(isTaint)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()ident(ERR_INSECURE_SET_CONSTANT)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyModule)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFrozenError)operator(()ident(ERR_FROZEN_CONST_TYPE)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(//) comment(////////////////// LOW-LEVEL CONSTANT INTERFACE ////////////////) comment(//) comment(// fetch/store/list constants for this module) comment(//) directive(public) type(boolean) ident(hasConstant)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(;) keyword(return) ident(constantTableContains)operator(()ident(name)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(fastHasConstant)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(constantTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(// returns the stored value without processing undefs (autoloads\)) directive(public) ident(IRubyObject) ident(fetchConstant)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(;) keyword(return) ident(constantTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) comment(// returns the stored value without processing undefs (autoloads\)) directive(public) ident(IRubyObject) ident(fastFetchConstant)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(constantTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(storeConstant)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureConstantsSettable)operator(()operator(\))operator(;) keyword(return) ident(constantTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(fastStoreConstant)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(internedName)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureConstantsSettable)operator(()operator(\))operator(;) keyword(return) ident(constantTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) comment(// removes and returns the stored value without processing undefs (autoloads\)) directive(public) ident(IRubyObject) ident(deleteConstant)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(;) ident(ensureConstantsSettable)operator(()operator(\))operator(;) keyword(return) ident(constantTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getStoredConstantList)operator(()operator(\)) operator({) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(table) operator(=) ident(constantTableGetTable)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(getStoredConstantNameList)operator(()operator(\)) operator({) pre_type(ArrayList)operator(<)pre_type(String)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(table) operator(=) ident(constantTableGetTable)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) directive(protected) directive(static) directive(final) pre_type(String) ident(ERR_INSECURE_SET_CONSTANT) operator(=) stringoperator(;) directive(protected) directive(static) directive(final) pre_type(String) ident(ERR_FROZEN_CONST_TYPE) operator(=) stringoperator(;) directive(protected) directive(final) pre_type(String) ident(validateConstant)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isValidConstantName)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(name)operator(;) operator(}) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name)operator(,) ident(name)operator(\))operator(;) operator(}) directive(protected) directive(final) type(void) ident(ensureConstantsSettable)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isFrozen)operator(()operator(\)) operator(&&) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(<) integer(4) operator(||) ident(isTaint)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newSecurityError)operator(()ident(ERR_INSECURE_SET_CONSTANT)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyModule)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFrozenError)operator(()ident(ERR_FROZEN_CONST_TYPE)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(//) comment(////////////////// VARIABLE TABLE METHODS ////////////////) comment(//) comment(// Overridden to use variableWriteLock in place of synchronization ) comment(//) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableStore)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(table) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(,) pre_constant(null)operator(\))operator(;) ident(table)operator([)ident(hash) operator(&) operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(-) integer(1)operator(\))operator(]) operator(=) ident(e)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTableSize) operator(=) integer(1)operator(;) ident(variableTable) operator(=) ident(table)operator(;) keyword(return) ident(value)operator(;) operator(}) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(variableTableSize) operator(+) integer(1)operator(\)) operator(>) ident(variableTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(variableTableRehash)operator(()operator(\))operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(e)operator(.)ident(value) operator(=) ident(value)operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) comment(// external volatile value initialization intended to obviate the need for) comment(// readValueUnderLock technique used in ConcurrentHashMap. may be a little) comment(// slower, but better to pay a price on first write rather than all reads.) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) ident(e)operator(;) ident(variableTableSize) operator(=) ident(potentialNewSize)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableFastStore)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) type(int) ident(hash) operator(=) ident(internedName)operator(.)ident(hashCode)operator(()operator(\))operator(;) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(table) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(value)operator(,) pre_constant(null)operator(\))operator(;) ident(table)operator([)ident(hash) operator(&) operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(-) integer(1)operator(\))operator(]) operator(=) ident(e)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTableSize) operator(=) integer(1)operator(;) ident(variableTable) operator(=) ident(table)operator(;) keyword(return) ident(value)operator(;) operator(}) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(variableTableSize) operator(+) integer(1)operator(\)) operator(>) ident(variableTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(variableTableRehash)operator(()operator(\))operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) ident(e)operator(.)ident(value) operator(=) ident(value)operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) comment(// external volatile value initialization intended to obviate the need for) comment(// readValueUnderLock technique used in ConcurrentHashMap. may be a little) comment(// slower, but better to pay a price on first write rather than all reads.) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) ident(e)operator(;) ident(variableTableSize) operator(=) ident(potentialNewSize)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableRemove)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) type(int) ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(;) ident(VariableTableEntry) ident(first) operator(=) ident(table)operator([)ident(index)operator(])operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(for) operator(()ident(e) operator(=) ident(first)operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(IRubyObject) ident(oldValue) operator(=) ident(e)operator(.)ident(value)operator(;) comment(// All entries following removed node can stay) comment(// in list, but all preceding ones need to be) comment(// cloned.) ident(VariableTableEntry) ident(newFirst) operator(=) ident(e)operator(.)ident(next)operator(;) keyword(for) operator(()ident(VariableTableEntry) ident(p) operator(=) ident(first)operator(;) ident(p) operator(!=) ident(e)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) ident(newFirst) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(value)operator(,) ident(newFirst)operator(\))operator(;) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) ident(newFirst)operator(;) ident(variableTableSize)operator(--)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile ) keyword(return) ident(oldValue)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@Override) directive(protected) ident(IRubyObject) ident(variableTableReadLocked)operator(()ident(VariableTableEntry) ident(entry)operator(\)) operator({) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) keyword(return) ident(entry)operator(.)ident(value)operator(;) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(protected) type(void) ident(variableTableSync)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(vars)operator(\)) operator({) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(variableTableSize) operator(=) integer(0)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTable) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) keyword(for) operator(()ident(Variable)operator(<)ident(IRubyObject)operator(>) ident(var) operator(:) ident(vars)operator(\)) operator({) keyword(assert) operator(!)ident(var)operator(.)ident(isConstant)operator(()operator(\)) operator(&&) ident(var)operator(.)ident(getValue)operator(()operator(\)) operator(!=) pre_constant(null)operator(;) ident(variableTableStore)operator(()ident(var)operator(.)ident(getName)operator(()operator(\))operator(,) ident(var)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(public) type(void) ident(syncVariables)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(variables)operator(\)) operator({) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(constants) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()ident(variables)operator(.)ident(size)operator(()operator(\))operator(\))operator(;) ident(Variable)operator(<)ident(IRubyObject)operator(>) ident(var)operator(;) keyword(for) operator(()pre_type(Iterator)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(iter) operator(=) ident(variables)operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;) operator(\)) operator({) keyword(if) operator(()operator(()ident(var) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(.)ident(isConstant)operator(()operator(\))operator(\)) operator({) ident(constants)operator(.)ident(add)operator(()ident(var)operator(\))operator(;) ident(iter)operator(.)ident(remove)operator(()operator(\))operator(;) operator(}) operator(}) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(variableTableSync)operator(()ident(variables)operator(\))operator(;) ident(constantTableSync)operator(()ident(constants)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@Override) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Deprecated) comment(// born deprecated) directive(public) pre_type(Map) ident(getVariableMap)operator(()operator(\)) operator({) pre_type(Map) ident(map) operator(=) ident(variableTableGetMap)operator(()operator(\))operator(;) ident(constantTableGetMap)operator(()ident(map)operator(\))operator(;) keyword(return) ident(map)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(hasVariables)operator(()operator(\)) operator({) keyword(return) ident(variableTableGetSize)operator(()operator(\)) operator(>) integer(0) operator(||) ident(constantTableGetSize)operator(()operator(\)) operator(>) integer(0)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getVariableCount)operator(()operator(\)) operator({) keyword(return) ident(variableTableGetSize)operator(()operator(\)) operator(+) ident(constantTableGetSize)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getVariableList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(vtable) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(ctable) operator(=) ident(constantTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(vtable)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(vtable)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(list)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) ident(ctable)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(ctable)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) annotation(@Override) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(getVariableNameList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(vtable) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(ctable) operator(=) ident(constantTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)pre_type(String)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(vtable)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(vtable)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) ident(ctable)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(ctable)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(//) comment(////////////////// CONSTANT TABLE METHODS, ETC. ////////////////) comment(//) directive(protected) directive(static) directive(final) type(int) ident(CONSTANT_TABLE_DEFAULT_CAPACITY) operator(=) integer(8)operator(;) comment(// MUST be power of 2!) directive(protected) directive(static) directive(final) type(int) ident(CONSTANT_TABLE_MAXIMUM_CAPACITY) operator(=) integer(1) operator(<)operator(<) integer(30)operator(;) directive(protected) directive(static) directive(final) type(float) ident(CONSTANT_TABLE_LOAD_FACTOR) operator(=) float(0.75f)operator(;) directive(protected) directive(static) directive(final) type(class) class(ConstantTableEntry) directive(implements) ident(Variable)operator(<)ident(IRubyObject)operator(>) operator({) directive(final) type(int) ident(hash)operator(;) directive(final) pre_type(String) ident(name)operator(;) directive(final) ident(IRubyObject) ident(value)operator(;) directive(final) ident(ConstantTableEntry) ident(next)operator(;) comment(// constant table entry values are final; if a constant is redefined, the) comment(// entry will be removed and replaced with a new entry.) ident(ConstantTableEntry)operator(() type(int) ident(hash)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(,) ident(ConstantTableEntry) ident(next)operator(\)) operator({) local_variable(this)operator(.)ident(hash) operator(=) ident(hash)operator(;) local_variable(this)operator(.)ident(name) operator(=) ident(name)operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) local_variable(this)operator(.)ident(next) operator(=) ident(next)operator(;) operator(}) directive(public) pre_type(String) ident(getName)operator(()operator(\)) operator({) keyword(return) ident(name)operator(;) operator(}) directive(public) ident(IRubyObject) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(public) directive(final) type(boolean) ident(isClassVariable)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) directive(final) type(boolean) ident(isConstant)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) directive(public) directive(final) type(boolean) ident(isInstanceVariable)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) directive(public) directive(final) type(boolean) ident(isRubyVariable)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) directive(protected) type(boolean) ident(constantTableContains)operator(()pre_type(String) ident(name)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(constantTable)operator(\))operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(protected) type(boolean) ident(constantTableFastContains)operator(()pre_type(String) ident(internedName)operator(\)) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(constantTable)operator(\))operator([)ident(internedName)operator(.)ident(hashCode)operator(()operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) directive(protected) ident(IRubyObject) ident(constantTableFetch)operator(()pre_type(String) ident(name)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(constantTable)operator(\))operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) ident(e)operator(.)ident(value)operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(protected) ident(IRubyObject) ident(constantTableFastFetch)operator(()pre_type(String) ident(internedName)operator(\)) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(constantTable)operator(\))operator([)ident(internedName)operator(.)ident(hashCode)operator(()operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(return) ident(e)operator(.)ident(value)operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(protected) ident(IRubyObject) ident(constantTableStore)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) ident(ConstantTableEntry) ident(e)operator(;) ident(ConstantTableEntry) ident(first)operator(;) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(constantTableSize) operator(+) integer(1)operator(\)) operator(>) ident(constantTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(constantTableRehash)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(table) operator(=) ident(constantTable)operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(first) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) comment(// if value is unchanged, do nothing) keyword(if) operator(()ident(value) operator(==) ident(e)operator(.)ident(value)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) comment(// create new entry, prepend to any trailing entries) ident(ConstantTableEntry) ident(newFirst) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(e)operator(.)ident(hash)operator(,) ident(e)operator(.)ident(name)operator(,) ident(value)operator(,) ident(e)operator(.)ident(next)operator(\))operator(;) comment(// all entries before this one must be cloned) keyword(for) operator(()ident(ConstantTableEntry) ident(n) operator(=) ident(first)operator(;) ident(n) operator(!=) ident(e)operator(;) ident(n) operator(=) ident(n)operator(.)ident(next)operator(\)) operator({) ident(newFirst) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(n)operator(.)ident(hash)operator(,) ident(n)operator(.)ident(name)operator(,) ident(n)operator(.)ident(value)operator(,) ident(newFirst)operator(\))operator(;) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) ident(newFirst)operator(;) ident(constantTable) operator(=) ident(table)operator(;) comment(// write-volatile) keyword(return) ident(value)operator(;) operator(}) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(hash)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(constantTableSize) operator(=) ident(potentialNewSize)operator(;) ident(constantTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) directive(protected) ident(IRubyObject) ident(constantTableFastStore)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) type(int) ident(hash) operator(=) ident(internedName)operator(.)ident(hashCode)operator(()operator(\))operator(;) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) ident(ConstantTableEntry) ident(e)operator(;) ident(ConstantTableEntry) ident(first)operator(;) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(constantTableSize) operator(+) integer(1)operator(\)) operator(>) ident(constantTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(constantTableRehash)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(table) operator(=) ident(constantTable)operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(first) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) comment(// if value is unchanged, do nothing) keyword(if) operator(()ident(value) operator(==) ident(e)operator(.)ident(value)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) comment(// create new entry, prepend to any trailing entries) ident(ConstantTableEntry) ident(newFirst) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(e)operator(.)ident(hash)operator(,) ident(e)operator(.)ident(name)operator(,) ident(value)operator(,) ident(e)operator(.)ident(next)operator(\))operator(;) comment(// all entries before this one must be cloned) keyword(for) operator(()ident(ConstantTableEntry) ident(n) operator(=) ident(first)operator(;) ident(n) operator(!=) ident(e)operator(;) ident(n) operator(=) ident(n)operator(.)ident(next)operator(\)) operator({) ident(newFirst) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(n)operator(.)ident(hash)operator(,) ident(n)operator(.)ident(name)operator(,) ident(n)operator(.)ident(value)operator(,) ident(newFirst)operator(\))operator(;) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) ident(newFirst)operator(;) ident(constantTable) operator(=) ident(table)operator(;) comment(// write-volatile) keyword(return) ident(value)operator(;) operator(}) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(constantTableSize) operator(=) ident(potentialNewSize)operator(;) ident(constantTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(;) operator(}) directive(protected) ident(IRubyObject) ident(constantTableRemove)operator(()pre_type(String) ident(name)operator(\)) operator({) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(constantTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) type(int) ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(;) ident(ConstantTableEntry) ident(first) operator(=) ident(table)operator([)ident(index)operator(])operator(;) ident(ConstantTableEntry) ident(e)operator(;) keyword(for) operator(()ident(e) operator(=) ident(first)operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(IRubyObject) ident(oldValue) operator(=) ident(e)operator(.)ident(value)operator(;) comment(// All entries following removed node can stay) comment(// in list, but all preceding ones need to be) comment(// cloned.) ident(ConstantTableEntry) ident(newFirst) operator(=) ident(e)operator(.)ident(next)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(p) operator(=) ident(first)operator(;) ident(p) operator(!=) ident(e)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) ident(newFirst) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(value)operator(,) ident(newFirst)operator(\))operator(;) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) ident(newFirst)operator(;) ident(constantTableSize)operator(--)operator(;) ident(constantTable) operator(=) ident(table)operator(;) comment(// write-volatile ) keyword(return) ident(oldValue)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(protected) ident(ConstantTableEntry)type([]) ident(constantTableGetTable)operator(()operator(\)) operator({) keyword(return) ident(constantTable)operator(;) operator(}) directive(protected) type(int) ident(constantTableGetSize)operator(()operator(\)) operator({) keyword(if) operator(()ident(constantTable) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(constantTableSize)operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) directive(protected) type(void) ident(constantTableSync)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(vars)operator(\)) operator({) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(variableWriteLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) ident(constantTableSize) operator(=) integer(0)operator(;) ident(constantTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(CONSTANT_TABLE_DEFAULT_CAPACITY) operator(*) ident(CONSTANT_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(constantTable) operator(=) keyword(new) ident(ConstantTableEntry)operator([)ident(CONSTANT_TABLE_DEFAULT_CAPACITY)operator(])operator(;) keyword(for) operator(()ident(Variable)operator(<)ident(IRubyObject)operator(>) ident(var) operator(:) ident(vars)operator(\)) operator({) keyword(assert) ident(var)operator(.)ident(isConstant)operator(()operator(\)) operator(&&) ident(var)operator(.)ident(getValue)operator(()operator(\)) operator(!=) pre_constant(null)operator(;) ident(constantTableStore)operator(()ident(var)operator(.)ident(getName)operator(()operator(\))operator(,) ident(var)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) comment(// MUST be called from synchronized/locked block!) comment(// should only be called by constantTableStore/constantTableFastStore) directive(private) directive(final) ident(ConstantTableEntry)type([]) ident(constantTableRehash)operator(()operator(\)) operator({) ident(ConstantTableEntry)type([]) ident(oldTable) operator(=) ident(constantTable)operator(;) type(int) ident(oldCapacity)operator(;) keyword(if) operator(()operator(()ident(oldCapacity) operator(=) ident(oldTable)operator(.)ident(length)operator(\)) operator(>=) ident(CONSTANT_TABLE_MAXIMUM_CAPACITY)operator(\)) operator({) keyword(return) ident(oldTable)operator(;) operator(}) type(int) ident(newCapacity) operator(=) ident(oldCapacity) operator(<)operator(<) integer(1)operator(;) ident(ConstantTableEntry)type([]) ident(newTable) operator(=) keyword(new) ident(ConstantTableEntry)operator([)ident(newCapacity)operator(])operator(;) ident(constantTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(newCapacity) operator(*) ident(CONSTANT_TABLE_LOAD_FACTOR)operator(\))operator(;) type(int) ident(sizeMask) operator(=) ident(newCapacity) operator(-) integer(1)operator(;) ident(ConstantTableEntry) ident(e)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(oldCapacity)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) comment(// We need to guarantee that any existing reads of old Map can) comment(// proceed. So we cannot yet null out each bin.) ident(e) operator(=) ident(oldTable)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(e) operator(!=) pre_constant(null)operator(\)) operator({) ident(ConstantTableEntry) ident(next) operator(=) ident(e)operator(.)ident(next)operator(;) type(int) ident(idx) operator(=) ident(e)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) comment(// Single node on list) keyword(if) operator(()ident(next) operator(==) pre_constant(null)operator(\)) ident(newTable)operator([)ident(idx)operator(]) operator(=) ident(e)operator(;) keyword(else) operator({) comment(// Reuse trailing consecutive sequence at same slot) ident(ConstantTableEntry) ident(lastRun) operator(=) ident(e)operator(;) type(int) ident(lastIdx) operator(=) ident(idx)operator(;) keyword(for) operator(()ident(ConstantTableEntry) ident(last) operator(=) ident(next)operator(;) ident(last) operator(!=) pre_constant(null)operator(;) ident(last) operator(=) ident(last)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(last)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) keyword(if) operator(()ident(k) operator(!=) ident(lastIdx)operator(\)) operator({) ident(lastIdx) operator(=) ident(k)operator(;) ident(lastRun) operator(=) ident(last)operator(;) operator(}) operator(}) ident(newTable)operator([)ident(lastIdx)operator(]) operator(=) ident(lastRun)operator(;) comment(// Clone all remaining nodes) keyword(for) operator(()ident(ConstantTableEntry) ident(p) operator(=) ident(e)operator(;) ident(p) operator(!=) ident(lastRun)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(p)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) ident(ConstantTableEntry) ident(m) operator(=) keyword(new) ident(ConstantTableEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(value)operator(,) ident(newTable)operator([)ident(k)operator(])operator(\))operator(;) ident(newTable)operator([)ident(k)operator(]) operator(=) ident(m)operator(;) operator(}) operator(}) operator(}) operator(}) ident(constantTable) operator(=) ident(newTable)operator(;) keyword(return) ident(newTable)operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) directive(protected) pre_type(Map) ident(constantTableGetMap)operator(()operator(\)) operator({) pre_type(HashMap) ident(map) operator(=) keyword(new) pre_type(HashMap)operator(()operator(\))operator(;) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(constantTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(map)operator(.)ident(put)operator(()ident(e)operator(.)ident(name)operator(,) ident(e)operator(.)ident(value)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(map)operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) directive(protected) pre_type(Map) ident(constantTableGetMap)operator(()pre_type(Map) ident(map)operator(\)) operator({) ident(ConstantTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(constantTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(ConstantTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(map)operator(.)ident(put)operator(()ident(e)operator(.)ident(name)operator(,) ident(e)operator(.)ident(value)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(map)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Anders Bengtsson * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.runtime.Visibility.PRIVATE)operator(;) keyword(import) include(static) include(org.jruby.runtime.Visibility.PROTECTED)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.Sprintf)operator(;) comment(/** * @author Anders Bengtsson */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyNameError) directive(extends) ident(RubyException) operator({) directive(private) ident(IRubyObject) ident(name)operator(;) comment(/** * Nested class whose instances act as thunks reacting to to_str method * called from (Exception#to_str, Exception#message\) * MRI equivalent: rb_cNameErrorMesg, class name: "message", construction method: "!", * to_str implementation: "name_err_mesg_to_str" * * TODO: this class should not be lookupable */) annotation(@JRubyClass)operator(()ident(name) operator(=) stringoperator(,) ident(parent) operator(=) stringoperator(\)) directive(public) directive(static) directive(final) type(class) class(RubyNameErrorMessage) directive(extends) ident(RubyObject) operator({) directive(static) ident(ObjectAllocator) ident(NAMEERRORMESSAGE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(IRubyObject) ident(dummy) operator(=) keyword(new) ident(RubyObject)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\))operator(;) keyword(return) keyword(new) ident(RubyNameErrorMessage)operator(()ident(runtime)operator(,) ident(dummy)operator(,) ident(dummy)operator(,) pre_type(Visibility)operator(.)ident(PRIVATE)operator(,) ident(CallType)operator(.)ident(VARIABLE)operator(\))operator(;) operator(}) operator(})operator(;) directive(private) directive(final) ident(IRubyObject) ident(object)operator(;) directive(private) directive(final) ident(IRubyObject) ident(method)operator(;) directive(private) directive(final) pre_type(Visibility) ident(visibility)operator(;) directive(private) directive(final) ident(CallType) ident(callType)operator(;) ident(RubyNameErrorMessage)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(object)operator(,) ident(IRubyObject) ident(method)operator(,) pre_type(Visibility) ident(visibility)operator(,) ident(CallType) ident(callType)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getNameErrorMessage)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) local_variable(this)operator(.)ident(object) operator(=) ident(object)operator(;) local_variable(this)operator(.)ident(method) operator(=) ident(method)operator(;) local_variable(this)operator(.)ident(visibility) operator(=) ident(visibility)operator(;) local_variable(this)operator(.)ident(callType) operator(=) ident(callType)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(arg)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(dump)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(to_str)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_str)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) pre_type(String) ident(format) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(visibility) operator(==) ident(PRIVATE)operator(\)) operator({) ident(format) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(visibility) operator(==) ident(PROTECTED)operator(\)) operator({) ident(format) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(callType) operator(==) ident(CallType)operator(.)ident(VARIABLE)operator(\)) operator({) ident(format) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(callType) operator(==) ident(CallType)operator(.)ident(SUPER)operator(\)) operator({) ident(format) operator(=) stringoperator(;) operator(}) keyword(if) operator(()ident(format) operator(==) pre_constant(null)operator(\)) ident(format) operator(=) stringoperator(;) pre_type(String) ident(description) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(object)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(description) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyBoolean) operator(&&) ident(object)operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(description) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(object) keyword(instanceof) ident(RubyBoolean) operator(&&) operator(!)ident(object)operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(description) operator(=) stringoperator(;) operator(}) keyword(else) operator({) keyword(try) operator({) ident(description) operator(=) ident(RubyObject)operator(.)ident(inspect)operator(()ident(context)operator(,) ident(object)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()ident(JumpException) ident(e)operator(\)) operator({)operator(}) keyword(if) operator(()ident(description) operator(==) pre_constant(null) operator(||) ident(description)operator(.)ident(length)operator(()operator(\)) operator(>) integer(65)operator(\)) ident(description) operator(=) ident(object)operator(.)ident(anyToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(description)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0) operator(||) operator(()ident(description)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(description)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(!=) stringoperator(\))operator(\)) operator({) ident(description) operator(=) ident(description) operator(+) string operator(+) ident(object)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(arr) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(method)operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(description)operator(\))operator(\))operator(;) ident(RubyString) ident(msg) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(Sprintf)operator(.)ident(sprintf)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(format)operator(\))operator(,) ident(arr)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(object)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(msg)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(msg)operator(;) operator(}) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(NAMEERROR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyNameError)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createNameErrorClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(standardErrorClass)operator(\)) operator({) ident(RubyClass) ident(nameErrorClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(standardErrorClass)operator(,) ident(NAMEERROR_ALLOCATOR)operator(\))operator(;) ident(nameErrorClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNameError)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(nameErrorClass)operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createNameErrorMessageClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(nameErrorClass)operator(\)) operator({) ident(RubyClass) ident(messageClass) operator(=) ident(nameErrorClass)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(RubyNameErrorMessage)operator(.)ident(NAMEERRORMESSAGE_ALLOCATOR)operator(\))operator(;) ident(messageClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNameErrorMessage)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(messageClass)operator(;) operator(}) directive(protected) ident(RubyNameError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(exceptionClass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyNameError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(,) pre_type(String) ident(message)operator(\)) operator({) local_variable(this)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(message)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(RubyNameError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(,) pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(message)operator(\))operator(;) local_variable(this)operator(.)ident(name) operator(=) ident(name) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyException) ident(newRubyNameError)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyException) ident(newError) operator(=) operator(()ident(RubyException)operator(\)) ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(newError)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(newError)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(name) operator(=) ident(args)operator([)ident(args)operator(.)ident(length) operator(-) integer(1)operator(])operator(;) type(int) ident(newLength) operator(=) ident(args)operator(.)ident(length) operator(>) integer(2) operator(?) ident(args)operator(.)ident(length) operator(-) integer(2) operator(:) ident(args)operator(.)ident(length) operator(-) integer(1)operator(;) ident(IRubyObject) type([])ident(tmpArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(newLength)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(tmpArgs)operator(,) integer(0)operator(,) ident(newLength)operator(\))operator(;) ident(args) operator(=) ident(tmpArgs)operator(;) operator(}) keyword(else) operator({) ident(name) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) local_variable(super)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(if) operator(()ident(message)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(message)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(message)operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(str) operator(!=) ident(message)operator(\)) ident(message) operator(=) ident(str)operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(message)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(message)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(name)operator(()operator(\)) operator({) keyword(return) ident(name)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyNil) directive(extends) ident(RubyObject) operator({) directive(public) ident(RubyNil)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getNilClass)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) ident(flags) operator(|=) ident(NIL_F) operator(|) ident(FALSE_F)operator(;) operator(}) directive(public) directive(static) directive(final) ident(ObjectAllocator) ident(NIL_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createNilClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(nilClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(NIL_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setNilClass)operator(()ident(nilClass)operator(\))operator(;) ident(nilClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(NIL)operator(;) ident(nilClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNil)operator(.)ident(class)operator(\))operator(;) ident(nilClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) comment(// FIXME: This is causing a verification error for some reason) comment(//nilClass.dispatcher = callbackFactory.createDispatcher(nilClass\);) keyword(return) ident(nilClass)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(NIL)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyClass) ident(getSingletonClass)operator(()operator(\)) operator({) keyword(return) ident(metaClass)operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) type(void)operator(.)ident(class)operator(;) operator(}) comment(// Methods of the Nil Class (nil_*\):) comment(/** nil_to_i * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyFixnum) ident(to_i)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * nil_to_f * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyFloat) ident(to_f)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) float(0.0D)operator(\))operator(;) operator(}) comment(/** nil_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyString) ident(to_s)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nil_to_a * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyArray) ident(to_a)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEmptyArray)operator(()operator(\))operator(;) operator(}) comment(/** nil_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyString) ident(inspect)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) comment(/** nil_type * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(RubyClass) ident(type)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNilClass)operator(()operator(\))operator(;) operator(}) comment(/** nil_and * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_and)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nil_or * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_or)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(obj)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nil_xor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(op_xor)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(obj)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nil_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(RubyFixnum) ident(id)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(4)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(taint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** nilclass_to_c * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(to_c)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyComplex)operator(.)ident(newComplexCanonicalize)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** nilclass_to_r * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalCanonicalize)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Koichiro Ohba * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.nio.ByteBuffer)operator(;) keyword(import) include(java.nio.CharBuffer)operator(;) keyword(import) include(java.nio.charset.CharacterCodingException)operator(;) keyword(import) include(java.nio.charset.Charset)operator(;) keyword(import) include(java.nio.charset.CharsetDecoder)operator(;) keyword(import) include(java.nio.charset.CharsetEncoder)operator(;) keyword(import) include(java.nio.charset.UnsupportedCharsetException)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.KCode)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyNKF) operator({) directive(public) directive(static) directive(final) ident(NKFCharset) ident(AUTO) operator(=) keyword(new) ident(NKFCharset)operator(()integer(0)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(JIS) operator(=) keyword(new) ident(NKFCharset)operator(()integer(1)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(EUC) operator(=) keyword(new) ident(NKFCharset)operator(()integer(2)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(SJIS) operator(=) keyword(new) ident(NKFCharset)operator(()integer(3)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(BINARY) operator(=) keyword(new) ident(NKFCharset)operator(()integer(4)operator(,) pre_constant(null)operator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(NOCONV) operator(=) keyword(new) ident(NKFCharset)operator(()integer(4)operator(,) pre_constant(null)operator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(UNKNOWN) operator(=) keyword(new) ident(NKFCharset)operator(()integer(0)operator(,) pre_constant(null)operator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(ASCII) operator(=) keyword(new) ident(NKFCharset)operator(()integer(5)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(UTF8) operator(=) keyword(new) ident(NKFCharset)operator(()integer(6)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(UTF16) operator(=) keyword(new) ident(NKFCharset)operator(()integer(8)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(UTF32) operator(=) keyword(new) ident(NKFCharset)operator(()integer(12)operator(,) stringoperator(\))operator(;) directive(public) directive(static) directive(final) ident(NKFCharset) ident(OTHER) operator(=) keyword(new) ident(NKFCharset)operator(()integer(16)operator(,) pre_constant(null)operator(\))operator(;) directive(public) directive(static) type(class) class(NKFCharset) operator({) directive(private) directive(final) type(int) ident(value)operator(;) directive(private) directive(final) pre_type(String) ident(charset)operator(;) directive(public) ident(NKFCharset)operator(()type(int) ident(v)operator(,) pre_type(String) ident(c)operator(\)) operator({) ident(value) operator(=) ident(v)operator(;) ident(charset) operator(=) ident(c)operator(;) operator(}) directive(public) type(int) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) directive(public) pre_type(String) ident(getCharset)operator(()operator(\)) operator({) keyword(return) ident(charset)operator(;) operator(}) operator(}) directive(public) directive(static) type(void) ident(createNKF)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(nkfModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(AUTO)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(JIS)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(EUC)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(SJIS)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(BINARY)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(NOCONV)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(UNKNOWN)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(ASCII)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(UTF8)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(UTF16)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(UTF32)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(nkfModule)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(OTHER)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(\))operator(;) ident(RubyString) ident(version) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(RubyString) ident(nkfVersion) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(RubyString) ident(nkfDate) operator(=) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(version)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(nkfVersion)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(nkfDate)operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(nkfModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNKF)operator(.)ident(class)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(guess)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(s)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(s)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(s)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(ByteList) ident(bytes) operator(=) ident(s)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) pre_type(ByteBuffer) ident(buf) operator(=) pre_type(ByteBuffer)operator(.)ident(wrap)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) pre_type(CharsetDecoder) ident(decoder) operator(=) pre_type(Charset)operator(.)ident(forName)operator(()stringoperator(\))operator(.)ident(newDecoder)operator(()operator(\))operator(;) keyword(try) operator({) ident(decoder)operator(.)ident(decode)operator(()ident(buf)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(CharacterCodingException) ident(e)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(UNKNOWN)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(decoder)operator(.)ident(isCharsetDetected)operator(()operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(UNKNOWN)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) pre_type(Charset) ident(charset) operator(=) ident(decoder)operator(.)ident(detectedCharset)operator(()operator(\))operator(;) pre_type(String) ident(name) operator(=) ident(charset)operator(.)ident(name)operator(()operator(\))operator(;) comment(// System.out.println("detect: " + name + "\\n"\);) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(SJIS)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(SJIS)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(else) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(EUC)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(else) keyword(if) operator(()stringoperator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(JIS)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(else) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(UNKNOWN)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(guess1)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) keyword(return) ident(guess)operator(()ident(context)operator(,) ident(recv)operator(,) ident(str)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(guess2)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) keyword(return) ident(guess)operator(()ident(context)operator(,) ident(recv)operator(,) ident(str)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(nkf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(opt)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(opt)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(opt)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(str)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(str)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) pre_type(Map)operator(<)pre_type(String)operator(,) ident(NKFCharset)operator(>) ident(options) operator(=) ident(parseOpt)operator(()ident(opt)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(NKFCharset) ident(nc) operator(=) ident(options)operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(nc)operator(.)ident(getValue)operator(()operator(\)) operator(==) ident(AUTO)operator(.)ident(getValue)operator(()operator(\))operator(\)) operator({) ident(KCode) ident(kcode) operator(=) ident(runtime)operator(.)ident(getKCode)operator(()operator(\))operator(;) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(SJIS)operator(\)) operator({) ident(nc) operator(=) ident(SJIS)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(EUC)operator(\)) operator({) ident(nc) operator(=) ident(EUC)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(UTF8)operator(\)) operator({) ident(nc) operator(=) ident(UTF8)operator(;) operator(}) operator(}) pre_type(String) ident(decodeCharset) operator(=) ident(nc)operator(.)ident(getCharset)operator(()operator(\))operator(;) pre_type(String) ident(encodeCharset) operator(=) ident(options)operator(.)ident(get)operator(()stringoperator(\))operator(.)ident(getCharset)operator(()operator(\))operator(;) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(decodeCharset)operator(,) ident(encodeCharset)operator(,) ident(str)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(decodeCharset)operator(,) pre_type(String) ident(encodeCharset)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(CharsetDecoder) ident(decoder)operator(;) pre_type(CharsetEncoder) ident(encoder)operator(;) keyword(try) operator({) ident(decoder) operator(=) pre_type(Charset)operator(.)ident(forName)operator(()ident(decodeCharset)operator(\))operator(.)ident(newDecoder)operator(()operator(\))operator(;) ident(encoder) operator(=) pre_type(Charset)operator(.)ident(forName)operator(()ident(encodeCharset)operator(\))operator(.)ident(newEncoder)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedCharsetException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(ByteList) ident(bytes) operator(=) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) pre_type(ByteBuffer) ident(buf) operator(=) pre_type(ByteBuffer)operator(.)ident(wrap)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) keyword(try) operator({) pre_type(CharBuffer) ident(cbuf) operator(=) ident(decoder)operator(.)ident(decode)operator(()ident(buf)operator(\))operator(;) ident(buf) operator(=) ident(encoder)operator(.)ident(encode)operator(()ident(cbuf)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(CharacterCodingException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) type(byte)type([]) ident(arr) operator(=) ident(buf)operator(.)ident(array)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()ident(arr)operator(,) integer(0)operator(,) ident(buf)operator(.)ident(limit)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) type(int) ident(optionUTF)operator(()pre_type(String) ident(s)operator(,) type(int) ident(i)operator(\)) operator({) type(int) ident(n) operator(=) integer(8)operator(;) keyword(if) operator(()ident(i)operator(+)integer(1) operator(<) ident(s)operator(.)ident(length)operator(()operator(\)) operator(&&) pre_type(Character)operator(.)ident(isDigit)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(+)integer(1)operator(\))operator(\))operator(\)) operator({) ident(n) operator(=) pre_type(Character)operator(.)ident(digit)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(+)integer(1)operator(\))operator(,) integer(10)operator(\))operator(;) keyword(if) operator(()ident(i)operator(+)integer(2) operator(<) ident(s)operator(.)ident(length)operator(()operator(\)) operator(&&) pre_type(Character)operator(.)ident(isDigit)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(+)integer(2)operator(\))operator(\))operator(\)) operator({) ident(n) operator(*=) integer(10)operator(;) ident(n) operator(+=) pre_type(Character)operator(.)ident(digit)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(+)integer(2)operator(\))operator(,) integer(10)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(n)operator(;) operator(}) directive(private) directive(static) pre_type(Map)operator(<)pre_type(String)operator(,) ident(NKFCharset)operator(>) ident(parseOpt)operator(()pre_type(String) ident(s)operator(\)) operator({) pre_type(Map)operator(<)pre_type(String)operator(,) ident(NKFCharset)operator(>) ident(options) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) ident(NKFCharset)operator(>)operator(()operator(\))operator(;) comment(// default options) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(AUTO)operator(\))operator(;) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(JIS)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(s)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) keyword(switch) operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// iso-2022-jp) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(JIS)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// Shift_JIS) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(SJIS)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// EUC-JP) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(EUC)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// UTF-8) operator({) type(int) ident(n) operator(=) ident(optionUTF)operator(()ident(s)operator(,) ident(i)operator(\))operator(;) keyword(if) operator(()ident(n) operator(==) integer(32)operator(\)) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF32)operator(\))operator(;) keyword(else) keyword(if) operator(()ident(n) operator(==) integer(16)operator(\)) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF16)operator(\))operator(;) keyword(else) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF8)operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// iso-2022-jp) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(JIS)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// Shift_JIS) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(SJIS)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// EUC-JP) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(EUC)operator(\))operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) comment(// UTF-8) operator({) type(int) ident(n) operator(=) ident(optionUTF)operator(()ident(s)operator(,) ident(i)operator(\))operator(;) keyword(if) operator(()ident(n) operator(==) integer(32)operator(\)) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF32)operator(\))operator(;) keyword(else) keyword(if) operator(()ident(n) operator(==) integer(16)operator(\)) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF16)operator(\))operator(;) keyword(else) ident(options)operator(.)ident(put)operator(()stringoperator(,) ident(UTF8)operator(\))operator(;) operator(}) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(if) operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(+)integer(1)operator(\)) operator(==) stringoperator(\)) operator({) comment(// long name option) operator(}) keyword(default)operator(:) operator(}) operator(}) keyword(return) ident(options)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyNoMethodError) directive(extends) ident(RubyNameError) operator({) directive(private) ident(IRubyObject) ident(args)operator(;) directive(private) directive(static) directive(final) ident(ObjectAllocator) ident(NOMETHODERROR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyNoMethodError)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createNoMethodErrorClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(nameErrorClass)operator(\)) operator({) ident(RubyClass) ident(noMethodErrorClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(nameErrorClass)operator(,) ident(NOMETHODERROR_ALLOCATOR)operator(\))operator(;) ident(noMethodErrorClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNoMethodError)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(noMethodErrorClass)operator(;) operator(}) directive(protected) ident(RubyNoMethodError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(exceptionClass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) local_variable(this)operator(.)ident(args) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) ident(RubyNoMethodError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(,) pre_type(String) ident(message)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(args)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(,) ident(message)operator(,) ident(name)operator(\))operator(;) local_variable(this)operator(.)ident(args) operator(=) ident(args)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) operator({) local_variable(this)operator(.)ident(args) operator(=) ident(args)operator([)ident(args)operator(.)ident(length) operator(-) integer(1)operator(])operator(;) ident(IRubyObject) type([])ident(tmpArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(args)operator(.)ident(length) operator(-) integer(1)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(tmpArgs)operator(,) integer(0)operator(,) ident(tmpArgs)operator(.)ident(length)operator(\))operator(;) ident(args) operator(=) ident(tmpArgs)operator(;) operator(}) keyword(else) operator({) local_variable(this)operator(.)ident(args) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) local_variable(super)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(args)operator(()operator(\)) operator({) keyword(return) ident(args)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2006 Antti Karanta * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_abs)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_arg)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_negative_p)operator(;) keyword(import) include(java.math.BigInteger)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.Convert)operator(;) comment(/** * Base class for all numerical types in ruby. */) comment(// TODO: Numeric.new works in Ruby and it does here too. However trying to use) comment(// that instance in a numeric operation should generate an ArgumentError. Doing) comment(// this seems so pathological I do not see the need to fix this now.) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyNumeric) directive(extends) ident(RubyObject) operator({) directive(public) directive(static) ident(RubyClass) ident(createNumericClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(numeric) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(NUMERIC_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setNumeric)operator(()ident(numeric)operator(\))operator(;) ident(numeric)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyNumeric)operator(;) operator(}) operator(})operator(;) ident(numeric)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getComparable)operator(()operator(\))operator(\))operator(;) ident(numeric)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyNumeric)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(numeric)operator(;) operator(}) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(NUMERIC_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyNumeric)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) type(double) ident(DBL_EPSILON)operator(=)float(2.2204460492503131e-16)operator(;) directive(private) directive(static) ident(IRubyObject) ident(convertToNum)operator(()type(double) ident(val)operator(,) ident(Ruby) ident(runtime)operator(\)) operator({) keyword(if) operator(()ident(val) operator(>=) operator(()type(double)operator(\)) ident(RubyFixnum)operator(.)ident(MAX) operator(||) ident(val) operator(<) operator(()type(double)operator(\)) ident(RubyFixnum)operator(.)ident(MIN)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(runtime)operator(,) ident(val)operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) operator(()type(long)operator(\)) ident(val)operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(metaClass)operator(\))operator(;) operator(}) directive(public) ident(RubyNumeric)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(,) type(boolean) ident(useObjectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(metaClass)operator(,) ident(useObjectSpace)operator(\))operator(;) operator(}) comment(// The implementations of these are all bonus (see TODO above\) I was going) comment(// to throw an error from these, but it appears to be the wrong place to) comment(// do it.) directive(public) type(double) ident(getDoubleValue)operator(()operator(\)) operator({) keyword(return) integer(0)operator(;) operator(}) directive(public) type(long) ident(getLongValue)operator(()operator(\)) operator({) keyword(return) integer(0)operator(;) operator(}) directive(public) directive(static) ident(RubyNumeric) ident(newNumeric)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) keyword(new) ident(RubyNumeric)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* ================ * Utility Methods * ================ */) comment(/** rb_num2int, NUM2INT * */) directive(public) directive(static) type(int) ident(num2int)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) type(long) ident(num) operator(=) ident(num2long)operator(()ident(arg)operator(\))operator(;) ident(checkInt)operator(()ident(arg)operator(,) ident(num)operator(\))operator(;) keyword(return) operator(()type(int)operator(\))ident(num)operator(;) operator(}) comment(/** check_int * */) directive(public) directive(static) type(void) ident(checkInt)operator(()ident(IRubyObject) ident(arg)operator(,) type(long) ident(num)operator(\))operator({) pre_type(String) ident(s)operator(;) keyword(if) operator(()ident(num) operator(<) pre_type(Integer)operator(.)ident(MIN_VALUE)operator(\)) operator({) ident(s) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if) operator(()ident(num) operator(>) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(\)) operator({) ident(s) operator(=) stringoperator(;) operator(}) keyword(else) operator({) keyword(return)operator(;) operator(}) keyword(throw) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(num) operator(+) string operator(+) ident(s) operator(+) stringoperator(\))operator(;) operator(}) comment(/** * NUM2CHR */) directive(public) directive(static) type(byte) ident(num2chr)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyString)operator(\)) operator({) pre_type(String) ident(value) operator(=) operator(()operator(()ident(RubyString)operator(\)) ident(arg)operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if) operator(()ident(value) operator(!=) pre_constant(null) operator(&&) ident(value)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0)operator(\)) keyword(return) operator(()type(byte)operator(\)) ident(value)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(;) operator(}) keyword(return) operator(()type(byte)operator(\)) ident(num2int)operator(()ident(arg)operator(\))operator(;) operator(}) comment(/** rb_num2long and FIX2LONG (numeric.c\) * */) directive(public) directive(static) type(long) ident(num2long)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyFixnum)operator(\)) ident(arg)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(arg)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(aFloat) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(arg)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(aFloat) operator(<=) operator(()type(double)operator(\)) pre_type(Long)operator(.)ident(MAX_VALUE) operator(&&) ident(aFloat) operator(>=) operator(()type(double)operator(\)) pre_type(Long)operator(.)ident(MIN_VALUE)operator(\)) operator({) keyword(return) operator(()type(long)operator(\)) ident(aFloat)operator(;) operator(}) keyword(else) operator({) comment(// TODO: number formatting here, MRI uses "%-.10g", 1.4 API is a must?) keyword(throw) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(aFloat) operator(+) stringoperator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(big2long)operator(()operator(()ident(RubyBignum)operator(\)) ident(arg)operator(\))operator(;) operator(}) keyword(return) ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) comment(/** rb_dbl2big + LONG2FIX at once (numeric.c\) * */) directive(public) directive(static) ident(IRubyObject) ident(dbl2num)operator(()ident(Ruby) ident(runtime)operator(,) type(double) ident(val)operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(val)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFloatDomainError)operator(()ident(val) operator(<) integer(0) operator(?) string operator(:) stringoperator(\))operator(;) operator(}) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(val)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newFloatDomainError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(convertToNum)operator(()ident(val)operator(,)ident(runtime)operator(\))operator(;) operator(}) comment(/** rb_num2dbl and NUM2DBL * */) directive(public) directive(static) type(double) ident(num2dbl)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyFloat)operator(\)) ident(arg)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(throw) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) operator(==) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(arg)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(arg)operator(.)ident(convertToFloat)operator(()operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) operator(}) comment(/** rb_dbl_cmp (numeric.c\) * */) directive(public) directive(static) ident(IRubyObject) ident(dbl_cmp)operator(()ident(Ruby) ident(runtime)operator(,) type(double) ident(a)operator(,) type(double) ident(b)operator(\)) operator({) keyword(if) operator(()pre_type(Double)operator(.)ident(isNaN)operator(()ident(a)operator(\)) operator(||) pre_type(Double)operator(.)ident(isNaN)operator(()ident(b)operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(a) operator(>) ident(b)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(if) operator(()ident(a) operator(<) ident(b)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(public) directive(static) type(long) ident(fix2long)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyFixnum)operator(\)) ident(arg)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) type(int) ident(fix2int)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) type(long) ident(num) operator(=) ident(arg) keyword(instanceof) ident(RubyFixnum) operator(?) ident(fix2long)operator(()ident(arg)operator(\)) operator(:) ident(num2long)operator(()ident(arg)operator(\))operator(;) ident(checkInt)operator(()ident(arg)operator(,) ident(num)operator(\))operator(;) keyword(return) operator(()type(int)operator(\)) ident(num)operator(;) operator(}) directive(public) directive(static) ident(RubyInteger) ident(str2inum)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(str)operator(,) type(int) ident(base)operator(\)) operator({) keyword(return) ident(str2inum)operator(()ident(runtime)operator(,)ident(str)operator(,)ident(base)operator(,)pre_constant(false)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyNumeric) ident(int2fix)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(val)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,)ident(val)operator(\))operator(;) operator(}) comment(/** rb_num2fix * */) directive(public) directive(static) ident(IRubyObject) ident(num2fix)operator(()ident(IRubyObject) ident(val)operator(\)) operator({) keyword(if) operator(()ident(val) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(return) ident(val)operator(;) operator(}) keyword(if) operator(()ident(val) keyword(instanceof) ident(RubyBignum)operator(\)) operator({) comment(// any BigInteger is bigger than Fixnum and we don't have FIXABLE) keyword(throw) ident(val)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()string operator(+) ident(val) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(val)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(num2long)operator(()ident(val)operator(\))operator(\))operator(;) operator(}) comment(/** * Converts a string representation of an integer to the integer value. * Parsing starts at the beginning of the string (after leading and * trailing whitespace have been removed\), and stops at the end or at the * first character that can't be part of an integer. Leading signs are * allowed. If base is zero, strings that begin with '0[xX]', * '0[bB]', or '0' (optionally preceded by a sign\) will be treated as hex, * binary, or octal numbers, respectively. If a non-zero base is given, * only the prefix (if any\) that is appropriate to that base will be * parsed correctly. For example, if the base is zero or 16, the string * "0xff" will be converted to 256, but if the base is 10, it will come out * as zero, since 'x' is not a valid decimal digit. If the string fails * to parse as a number, zero is returned. * * @param runtime the ruby runtime * @param str the string to be converted * @param base the expected base of the number (for example, 2, 8, 10, 16\), * or 0 if the method should determine the base automatically * (defaults to 10\). Values 0 and 2-36 are permitted. Any other * value will result in an ArgumentError. * @param strict if true, enforce the strict criteria for String encoding of * numeric values, as required by Integer('n'\), and raise an * exception when those criteria are not met. Otherwise, allow * lax expression of values, as permitted by String#to_i, and * return a value in almost all cases (excepting illegal radix\). * TODO: describe the rules/criteria * @return a RubyFixnum or (if necessary\) a RubyBignum representing * the result of the conversion, which will be zero if the * conversion failed. */) directive(public) directive(static) ident(RubyInteger) ident(str2inum)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(str)operator(,) type(int) ident(base)operator(,) type(boolean) ident(strict)operator(\)) operator({) keyword(if) operator(()ident(base) operator(!=) integer(0) operator(&&) operator(()ident(base) operator(<) integer(2) operator(||) ident(base) operator(>) integer(36)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(base)operator(\))operator(;) operator(}) ident(ByteList) ident(bytes) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(try) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(Convert)operator(.)ident(byteListToLong)operator(()ident(bytes)operator(,) ident(base)operator(,) ident(strict)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidIntegerException) ident(e)operator(\)) operator({) keyword(return) ident(str2inumIIE)operator(()ident(strict)operator(,) ident(runtime)operator(,) ident(str)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(NumberTooLargeException) ident(e)operator(\)) operator({) keyword(return) ident(str2inumNTLE)operator(()ident(strict)operator(,) ident(runtime)operator(,) ident(str)operator(,) ident(bytes)operator(,) ident(base)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) ident(RubyInteger) ident(str2inumIIE)operator(()type(boolean) ident(strict)operator(,) ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(str)operator(\)) directive(throws) ident(RaiseException) operator({) keyword(if) operator(()ident(strict)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(str)operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(private) directive(static) ident(RubyInteger) ident(str2inumNTLE)operator(()type(boolean) ident(strict)operator(,) ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(str)operator(,) ident(ByteList) ident(bytes)operator(,) type(int) ident(base)operator(\)) operator({) keyword(try) operator({) pre_type(BigInteger) ident(bi) operator(=) ident(Convert)operator(.)ident(byteListToBigInteger)operator(()ident(bytes)operator(,) ident(base)operator(,) ident(strict)operator(\))operator(;) keyword(return) keyword(new) ident(RubyBignum)operator(()ident(runtime)operator(,) ident(bi)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(InvalidIntegerException) ident(e2)operator(\)) operator({) keyword(return) ident(str2inumIIE)operator(()ident(strict)operator(,) ident(runtime)operator(,) ident(str)operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyFloat) ident(str2fnum)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(arg)operator(\)) operator({) keyword(return) ident(str2fnum)operator(()ident(runtime)operator(,)ident(arg)operator(,)pre_constant(false)operator(\))operator(;) operator(}) comment(/** * Converts a string representation of a floating-point number to the * numeric value. Parsing starts at the beginning of the string (after * leading and trailing whitespace have been removed\), and stops at the * end or at the first character that can't be part of a number. If * the string fails to parse as a number, 0.0 is returned. * * @param runtime the ruby runtime * @param arg the string to be converted * @param strict if true, enforce the strict criteria for String encoding of * numeric values, as required by Float('n'\), and raise an * exception when those criteria are not met. Otherwise, allow * lax expression of values, as permitted by String#to_f, and * return a value in all cases. * TODO: describe the rules/criteria * @return a RubyFloat representing the result of the conversion, which * will be 0.0 if the conversion failed. */) directive(public) directive(static) ident(RubyFloat) ident(str2fnum)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(arg)operator(,) type(boolean) ident(strict)operator(\)) operator({) directive(final) type(double) ident(ZERO) operator(=) float(0.0)operator(;) keyword(try) operator({) keyword(return) keyword(new) ident(RubyFloat)operator(()ident(runtime)operator(,)ident(Convert)operator(.)ident(byteListToDouble)operator(()ident(arg)operator(.)ident(getByteList)operator(()operator(\))operator(,)ident(strict)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(NumberFormatException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(strict)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(arg)operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyFloat)operator(()ident(runtime)operator(,)ident(ZERO)operator(\))operator(;) operator(}) operator(}) comment(/** Numeric methods. (num_*\) * */) directive(protected) ident(IRubyObject)type([]) ident(getCoerced)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) type(boolean) ident(error)operator(\)) operator({) ident(IRubyObject) ident(result)operator(;) keyword(try) operator({) ident(result) operator(=) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(error)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(() ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(result) keyword(instanceof) ident(RubyArray)operator(\)) operator(||) operator(()operator(()ident(RubyArray)operator(\))ident(result)operator(\))operator(.)ident(getLength)operator(()operator(\)) operator(!=) integer(2)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()operator(()ident(RubyArray)operator(\))ident(result)operator(\))operator(.)ident(toJavaArray)operator(()operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(callCoerced)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(,) type(boolean) ident(err)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) ident(getCoerced)operator(()ident(context)operator(,) ident(other)operator(,) ident(err)operator(\))operator(;) keyword(if)operator(()ident(args) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(callCoerced)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject)type([]) ident(args) operator(=) ident(getCoerced)operator(()ident(context)operator(,) ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(args) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) comment(// beneath are rewritten coercions that reflect MRI logic, the aboves are used only by RubyBigDecimal) comment(/** coerce_body * */) directive(protected) directive(final) ident(IRubyObject) ident(coerceBody)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** do_coerce * */) directive(protected) directive(final) ident(RubyArray) ident(doCoerce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(,) type(boolean) ident(err)operator(\)) operator({) ident(IRubyObject) ident(result)operator(;) keyword(try) operator({) ident(result) operator(=) ident(coerceBody)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(e)operator(\)) operator({) keyword(if) operator(()ident(err)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(() ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) keyword(if) operator(()operator(!)operator(()ident(result) keyword(instanceof) ident(RubyArray)operator(\)) operator(||) operator(()operator(()ident(RubyArray)operator(\)) ident(result)operator(\))operator(.)ident(getLength)operator(()operator(\)) operator(!=) integer(2)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) operator(()ident(RubyArray)operator(\)) ident(result)operator(;) operator(}) comment(/** rb_num_coerce_bin * coercion taking two arguments */) directive(protected) directive(final) ident(IRubyObject) ident(coerceBin)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(doCoerce)operator(()ident(context)operator(,) ident(other)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) operator(()ident(ary)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(,) ident(ary)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(\))operator(;) operator(}) comment(/** rb_num_coerce_cmp * coercion used for comparisons */) directive(protected) directive(final) ident(IRubyObject) ident(coerceCmp)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(doCoerce)operator(()ident(context)operator(,) ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(ary) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) comment(// MRI does it!) operator(}) keyword(return) operator(()ident(ary)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(,) ident(ary)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(\))operator(;) operator(}) comment(/** rb_num_coerce_relop * coercion used for relative operators */) directive(protected) directive(final) ident(IRubyObject) ident(coerceRelOp)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(doCoerce)operator(()ident(context)operator(,) ident(other)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(ary) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(RubyComparable)operator(.)ident(cmperr)operator(()local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(unwrapCoerced)operator(()ident(context)operator(,) ident(method)operator(,) ident(other)operator(,) ident(ary)operator(\))operator(;) operator(}) directive(private) directive(final) ident(IRubyObject) ident(unwrapCoerced)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(method)operator(,) ident(IRubyObject) ident(other)operator(,) ident(RubyArray) ident(ary)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) operator(()ident(ary)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(method)operator(,) ident(ary)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RubyComparable)operator(.)ident(cmperr)operator(()local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(public) ident(RubyNumeric) ident(asNumeric)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/* ================ * Instance Methods * ================ */) comment(/** num_sadded * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sadded)operator(()ident(IRubyObject) ident(name)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(name) operator(+) string operator(+) ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** num_init_copy * */) annotation(@Override) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** num_coerce * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(coerce)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(getClass)operator(()operator(\)) operator(==) ident(other)operator(.)ident(getClass)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(other)operator(,) local_variable(this)operator(\))operator(;) ident(IRubyObject) ident(cdr) operator(=) ident(RubyKernel)operator(.)ident(new_float)operator(()local_variable(this)operator(,) local_variable(this)operator(\))operator(;) ident(IRubyObject) ident(car) operator(=) ident(RubyKernel)operator(.)ident(new_float)operator(()local_variable(this)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(car)operator(,) ident(cdr)operator(\))operator(;) operator(}) comment(/** num_uplus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uplus)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** num_uminus * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_uminus)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyFixnum) ident(zero) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyArray) ident(ary) operator(=) ident(zero)operator(.)ident(doCoerce)operator(()ident(context)operator(,) local_variable(this)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(ary)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(ary)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(\))operator(;) operator(}) comment(/** num_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) operator({) comment(// won't hurt fixnums) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** num_eql * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(getClass)operator(()operator(\)) operator(!=) ident(other)operator(.)ident(getClass)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(return) ident(equalInternal)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** num_quo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(quo)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** num_quo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(quo_19)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalRaw)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** num_div * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(.)ident(convertToFloat)operator(()operator(\))operator(.)ident(floor)operator(()operator(\))operator(;) operator(}) comment(/** num_divmod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(RubyArray)operator(.)ident(newArray)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(div)operator(()ident(context)operator(,) ident(other)operator(\))operator(,) ident(modulo)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) comment(/** num_fdiv (1.9\) */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(fdiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(.)ident(convertToFloat)operator(()operator(\))operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** num_modulo * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(modulo)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** num_remainder * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(remainder)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(dividend)operator(\)) operator({) ident(IRubyObject) ident(z) operator(=) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(dividend)operator(\))operator(;) ident(IRubyObject) ident(x) operator(=) local_variable(this)operator(;) ident(RubyFixnum) ident(zero) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(equalInternal)operator(()ident(context)operator(,) ident(z)operator(,) ident(zero)operator(\)) operator(&&) operator(()operator(()ident(x)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(&&) ident(dividend)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_GT)operator(,) string)delimiter(")>operator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator(||) operator(()ident(x)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_GT)operator(,) string)delimiter(")>operator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(&&) ident(dividend)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(zero)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(\))operator(\)) operator({) keyword(return) ident(z)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(dividend)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(z)operator(;) operator(}) operator(}) comment(/** num_abs * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(abs)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** num_to_int * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_int)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) stringoperator(\))operator(;) operator(}) comment(/** num_scalar_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(scalar_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** num_int_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(integer_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** num_zero_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(zero_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(equalInternal)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** num_nonzero_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nonzero_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** num_floor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(floor)operator(()operator(\)) operator({) keyword(return) ident(convertToFloat)operator(()operator(\))operator(.)ident(floor)operator(()operator(\))operator(;) operator(}) comment(/** num_ceil * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(ceil)operator(()operator(\)) operator({) keyword(return) ident(convertToFloat)operator(()operator(\))operator(.)ident(ceil)operator(()operator(\))operator(;) operator(}) comment(/** num_round * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(round)operator(()operator(\)) operator({) keyword(return) ident(convertToFloat)operator(()operator(\))operator(.)ident(round)operator(()operator(\))operator(;) operator(}) comment(/** num_truncate * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(truncate)operator(()operator(\)) operator({) keyword(return) ident(convertToFloat)operator(()operator(\))operator(.)ident(truncate)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(step)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(step)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(step)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(2)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(step)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(step)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(step)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(to)operator(,) ident(IRubyObject) ident(step)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(to) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(step) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(value) operator(=) ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(end) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(to)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(diff) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(step)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(diff) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(diff) operator(>) integer(0)operator(\)) operator({) keyword(for) operator(()type(long) ident(i) operator(=) ident(value)operator(;) ident(i) operator(<=) ident(end)operator(;) ident(i) operator(+=) ident(diff)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(long) ident(i) operator(=) ident(value)operator(;) ident(i) operator(>=) ident(end)operator(;) ident(i) operator(+=) ident(diff)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyFloat) operator(||) ident(to) keyword(instanceof) ident(RubyFloat) operator(||) ident(step) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(beg) operator(=) ident(num2dbl)operator(()local_variable(this)operator(\))operator(;) type(double) ident(end) operator(=) ident(num2dbl)operator(()ident(to)operator(\))operator(;) type(double) ident(unit) operator(=) ident(num2dbl)operator(()ident(step)operator(\))operator(;) keyword(if) operator(()ident(unit) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) type(double) ident(n) operator(=) operator(()ident(end) operator(-) ident(beg)operator(\))operator(/)ident(unit)operator(;) type(double) ident(err) operator(=) operator(()pre_type(Math)operator(.)ident(abs)operator(()ident(beg)operator(\)) operator(+) pre_type(Math)operator(.)ident(abs)operator(()ident(end)operator(\)) operator(+) pre_type(Math)operator(.)ident(abs)operator(()ident(end) operator(-) ident(beg)operator(\))operator(\)) operator(/) pre_type(Math)operator(.)ident(abs)operator(()ident(unit)operator(\)) operator(*) ident(DBL_EPSILON)operator(;) keyword(if) operator(()ident(err)operator(>)float(0.5)operator(\)) operator({) ident(err)operator(=)float(0.5)operator(;) operator(}) ident(n) operator(=) pre_type(Math)operator(.)ident(floor)operator(()ident(n) operator(+) ident(err)operator(\)) operator(+) integer(1)operator(;) keyword(for)operator(()type(double) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(n)operator(;) ident(i)operator(++)operator(\))operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(i) operator(*) ident(unit) operator(+) ident(beg)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(RubyNumeric) ident(i) operator(=) local_variable(this)operator(;) type(int) ident(cmp)operator(;) pre_type(String) ident(cmpString)operator(;) keyword(if) operator(()operator(()operator(()ident(RubyBoolean)operator(\)) ident(step)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_GT)operator(,) string)delimiter(")>operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(cmp) operator(=) ident(MethodIndex)operator(.)ident(OP_GT)operator(;) operator(}) keyword(else) operator({) ident(cmp) operator(=) ident(MethodIndex)operator(.)ident(OP_LT)operator(;) operator(}) ident(cmpString) operator(=) ident(MethodIndex)operator(.)ident(NAMES)operator(.)ident(get)operator(()ident(cmp)operator(\))operator(;) keyword(while) operator(()pre_constant(true)operator(\)) operator({) keyword(if) operator(()ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(cmp)operator(,) ident(cmpString)operator(,) ident(to)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(i)operator(\))operator(;) ident(i) operator(=) operator(()ident(RubyNumeric)operator(\)) ident(i)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(step)operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** num_equal, doesn't override RubyObject.op_equal * */) directive(protected) directive(final) ident(IRubyObject) ident(op_num_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) comment(// it won't hurt fixnums) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EQUALEQUAL)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** num_numerator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(numerator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalConvert)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) comment(/** num_denominator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(denominator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalConvert)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) comment(/** numeric_to_c * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(to_c)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyComplex)operator(.)ident(newComplexCanonicalize)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** numeric_re * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(re)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyComplex)operator(.)ident(newComplexConvert)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** numeric_im * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(im)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyComplex)operator(.)ident(newComplexConvert)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** numeric_real * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(real)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** numeric_image * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(image)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** numeric_arg * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(arg)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()operator(!)ident(f_negative_p)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getMath)operator(()operator(\))operator(.)ident(fastFetchConstant)operator(()stringoperator(\))operator(;) operator(}) comment(/** numeric_polar * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(polar)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(f_abs)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(f_arg)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(\))operator(;) operator(}) comment(/** numeric_real * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(conjugate)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) directive(static) type(class) class(InvalidIntegerException) directive(extends) exception(NumberFormatException) operator({) directive(private) directive(static) directive(final) type(long) ident(serialVersionUID) operator(=) integer(55019452543252148L)operator(;) directive(public) ident(InvalidIntegerException)operator(()operator(\)) operator({) local_variable(super)operator(()operator(\))operator(;) operator(}) directive(public) ident(InvalidIntegerException)operator(()pre_type(String) ident(message)operator(\)) operator({) local_variable(super)operator(()ident(message)operator(\))operator(;) operator(}) directive(public) pre_type(Throwable) ident(fillInStackTrace)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) directive(public) directive(static) type(class) class(NumberTooLargeException) directive(extends) exception(NumberFormatException) operator({) directive(private) directive(static) directive(final) type(long) ident(serialVersionUID) operator(=) operator(-)integer(1835120694982699449L)operator(;) directive(public) ident(NumberTooLargeException)operator(()operator(\)) operator({) local_variable(super)operator(()operator(\))operator(;) operator(}) directive(public) ident(NumberTooLargeException)operator(()pre_type(String) ident(message)operator(\)) operator({) local_variable(super)operator(()ident(message)operator(\))operator(;) operator(}) directive(public) pre_type(Throwable) ident(fillInStackTrace)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004-2006 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2007 MenTaLguY * Copyright (C\) 2007 William N Dortch * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.io.ObjectInputStream)operator(;) keyword(import) include(java.io.ObjectOutputStream)operator(;) keyword(import) include(java.io.Serializable)operator(;) keyword(import) include(java.util.concurrent.atomic.AtomicBoolean)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.evaluator.ASTInterpreter)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) keyword(import) include(org.jruby.runtime.component.VariableEntry)operator(;) keyword(import) include(org.jruby.util.IdUtil)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.javasupport.JavaObject)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.builtin.InstanceVariables)operator(;) keyword(import) include(org.jruby.runtime.builtin.InternalVariables)operator(;) keyword(import) include(org.jruby.runtime.marshal.CoreObjectType)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) comment(/** * RubyObject is the only implementation of the * {@link org.jruby.runtime.builtin.IRubyObject}. Every Ruby object in JRuby * is represented by something that is an instance of RubyObject. In * some of the core class implementations, this means doing a subclass * that extends RubyObject, in other cases it means using a simple * RubyObject instance and the data field to store specific * information about the Ruby object. * * Some care has been taken to make the implementation be as * monomorphic as possible, so that the Java Hotspot engine can * improve performance of it. That is the reason for several patterns * that might seem odd in this class. * * The IRubyObject interface used to have lots of methods for * different things, but these have now mostly been refactored into * several interfaces that gives access to that specific part of the * object. This gives us the possibility to switch out that subsystem * without changing interfaces again. For example, instance variable * and internal variables are handled this way, but the implementation * in RubyObject only returns "this" in {@link #getInstanceVariables(\)} and * {@link #getInternalVariables(\)}. * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyObject) directive(implements) pre_type(Cloneable)operator(,) ident(IRubyObject)operator(,) pre_type(Serializable)operator(,) ident(CoreObjectType)operator(,) ident(InstanceVariables)operator(,) ident(InternalVariables) operator({) comment(/** * It's not valid to create a totally empty RubyObject. Since the * RubyObject is always defined in relation to a runtime, that * means that creating RubyObjects from outside the class might * cause problems. */) directive(private) ident(RubyObject)operator(()operator(\))operator({)operator(})operator(;) comment(/** * A value that is used as a null sentinel in among other places * the RubyArray implementation. It will cause large problems to * call any methods on this object. */) directive(public) directive(static) directive(final) ident(IRubyObject) ident(NEVER) operator(=) keyword(new) ident(RubyObject)operator(()operator(\))operator(;) comment(/** * A value that specifies an undefined value. This value is used * as a sentinel for undefined constant values, and other places * where neither null nor NEVER makes sense. */) directive(public) directive(static) directive(final) ident(IRubyObject) ident(UNDEF) operator(=) keyword(new) ident(RubyObject)operator(()operator(\))operator(;) comment(// The class of this object) directive(protected) directive(transient) ident(RubyClass) ident(metaClass)operator(;) comment(/** * The variableTable contains variables for an object, defined as: *
    *
  • instance variables *
  • class variables (for classes/modules\) *
  • internal variables (such as those used when marshaling RubyRange and RubyException\) *
* * Constants are stored separately, see {@link RubyModule}. * */) directive(protected) directive(transient) directive(volatile) ident(VariableTableEntry)type([]) ident(variableTable)operator(;) directive(protected) directive(transient) type(int) ident(variableTableSize)operator(;) directive(protected) directive(transient) type(int) ident(variableTableThreshold)operator(;) comment(// The dataStruct is a place where custom information can be) comment(// contained for core implementations that doesn't necessarily) comment(// want to go to the trouble of creating a subclass of) comment(// RubyObject. The OpenSSL implementation uses this heavily to) comment(// save holder objects containing Java cryptography objects.) comment(// Java integration uses this to store the Java object ref.) directive(protected) directive(transient) pre_type(Object) ident(dataStruct)operator(;) directive(protected) type(int) ident(flags)operator(;) comment(// zeroed by jvm) directive(public) directive(static) directive(final) type(int) ident(ALL_F) operator(=) operator(-)integer(1)operator(;) directive(public) directive(static) directive(final) type(int) ident(FALSE_F) operator(=) integer(1) operator(<)operator(<) integer(0)operator(;) comment(/** * This flag is a bit funny. It's used to denote that this value * is nil. It's a bit counterintuitive for a Java programmer to * not use subclassing to handle this case, since we have a * RubyNil subclass anyway. Well, the reason for it being a flag * is that the {@link #isNil(\)} method is called extremely often. So often * that it gives a good speed boost to make it monomorphic and * final. It turns out using a flag for this actually gives us * better performance than having a polymorphic {@link #isNil(\)} method. */) directive(public) directive(static) directive(final) type(int) ident(NIL_F) operator(=) integer(1) operator(<)operator(<) integer(1)operator(;) directive(public) directive(static) directive(final) type(int) ident(FROZEN_F) operator(=) integer(1) operator(<)operator(<) integer(2)operator(;) directive(public) directive(static) directive(final) type(int) ident(TAINTED_F) operator(=) integer(1) operator(<)operator(<) integer(3)operator(;) directive(public) directive(static) directive(final) type(int) ident(FL_USHIFT) operator(=) integer(4)operator(;) directive(public) directive(static) directive(final) type(int) ident(USER0_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(0)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER1_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(1)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER2_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(2)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER3_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(3)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER4_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(4)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER5_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(5)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER6_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(6)operator(\))operator(\))operator(;) directive(public) directive(static) directive(final) type(int) ident(USER7_F) operator(=) operator(()integer(1)operator(<)operator(<)operator(()ident(FL_USHIFT)operator(+)integer(7)operator(\))operator(\))operator(;) comment(/** * Sets or unsets a flag on this object. The only flags that are * guaranteed to be valid to use as the first argument is: * *
    *
  • {@link #FALSE_F}
  • *
  • {@link NIL_F}
  • *
  • {@link FROZEN_F}
  • *
  • {@link TAINTED_F}
  • *
  • {@link USER0_F}
  • *
  • {@link USER1_F}
  • *
  • {@link USER2_F}
  • *
  • {@link USER3_F}
  • *
  • {@link USER4_F}
  • *
  • {@link USER5_F}
  • *
  • {@link USER6_F}
  • *
  • {@link USER7_F}
  • *
* * @param flag the actual flag to set or unset. * @param set if true, the flag will be set, if false, the flag will be unset. */) directive(public) directive(final) type(void) ident(setFlag)operator(()type(int) ident(flag)operator(,) type(boolean) ident(set)operator(\)) operator({) keyword(if) operator(()ident(set)operator(\)) operator({) ident(flags) operator(|=) ident(flag)operator(;) operator(}) keyword(else) operator({) ident(flags) operator(&=) operator(~)ident(flag)operator(;) operator(}) operator(}) comment(/** * Get the value of a custom flag on this object. The only * guaranteed flags that can be sent in to this method is: * *
    *
  • {@link #FALSE_F}
  • *
  • {@link NIL_F}
  • *
  • {@link FROZEN_F}
  • *
  • {@link TAINTED_F}
  • *
  • {@link USER0_F}
  • *
  • {@link USER1_F}
  • *
  • {@link USER2_F}
  • *
  • {@link USER3_F}
  • *
  • {@link USER4_F}
  • *
  • {@link USER5_F}
  • *
  • {@link USER6_F}
  • *
  • {@link USER7_F}
  • *
* * @param flag the flag to get * @return true if the flag is set, false otherwise */) directive(public) directive(final) type(boolean) ident(getFlag)operator(()type(int) ident(flag)operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(flag)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(private) directive(transient) ident(Finalizer) ident(finalizer)operator(;) comment(/** * Class that keeps track of the finalizers for the object under * operation. */) directive(public) type(class) class(Finalizer) directive(implements) ident(Finalizable) operator({) directive(private) type(long) ident(id)operator(;) directive(private) pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(finalizers)operator(;) directive(private) pre_type(AtomicBoolean) ident(finalized)operator(;) directive(public) ident(Finalizer)operator(()type(long) ident(id)operator(\)) operator({) local_variable(this)operator(.)ident(id) operator(=) ident(id)operator(;) local_variable(this)operator(.)ident(finalized) operator(=) keyword(new) pre_type(AtomicBoolean)operator(()pre_constant(false)operator(\))operator(;) operator(}) directive(public) type(void) ident(addFinalizer)operator(()ident(IRubyObject) ident(finalizer)operator(\)) operator({) keyword(if) operator(()ident(finalizers) operator(==) pre_constant(null)operator(\)) operator({) ident(finalizers) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()operator(\))operator(;) operator(}) ident(finalizers)operator(.)ident(add)operator(()ident(finalizer)operator(\))operator(;) operator(}) directive(public) type(void) ident(removeFinalizers)operator(()operator(\)) operator({) ident(finalizers) operator(=) pre_constant(null)operator(;) operator(}) annotation(@Override) directive(public) type(void) ident(finalize)operator(()operator(\)) operator({) keyword(if) operator(()ident(finalized)operator(.)ident(compareAndSet)operator(()pre_constant(false)operator(,) pre_constant(true)operator(\))operator(\)) operator({) keyword(if) operator(()ident(finalizers) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(finalizers)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(finalizer) operator(=) ident(finalizers)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) ident(RuntimeHelpers)operator(.)ident(invoke)operator(() ident(finalizer)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(finalizer)operator(,) stringoperator(,) ident(RubyObject)operator(.)ident(this)operator(.)ident(id)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) operator(}) comment(/** * Standard path for object creation. Objects are entered into ObjectSpace * only if ObjectSpace is enabled. */) directive(public) ident(RubyObject)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(\)) operator({) local_variable(this)operator(.)ident(metaClass) operator(=) ident(metaClass)operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\)) ident(addToObjectSpace)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(3)operator(\)) ident(taint)operator(()ident(runtime)operator(\))operator(;) operator(}) comment(/** * Path for objects who want to decide whether they don't want to be in * ObjectSpace even when it is on. (notably used by objects being * considered immediate, they'll always pass false here\) */) directive(protected) ident(RubyObject)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(,) type(boolean) ident(useObjectSpace)operator(\)) operator({) local_variable(this)operator(.)ident(metaClass) operator(=) ident(metaClass)operator(;) keyword(if) operator(()ident(useObjectSpace)operator(\)) ident(addToObjectSpace)operator(()ident(runtime)operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(3)operator(\)) ident(taint)operator(()ident(runtime)operator(\))operator(;) operator(}) directive(private) type(void) ident(addToObjectSpace)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(assert) ident(runtime)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(add)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** * Will create the Ruby class Object in the runtime * specified. This method needs to take the actual class as an * argument because of the Object class' central part in runtime * initialization. */) directive(public) directive(static) ident(RubyClass) ident(createObjectClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(objectClass)operator(\)) operator({) ident(objectClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(OBJECT)operator(;) ident(objectClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(ObjectMethods)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(objectClass)operator(;) operator(}) comment(/** * Interestingly, the Object class doesn't really have that many * methods for itself. Instead almost all of the Object methods * are really defined on the Kernel module. This class is a holder * for all Object methods. * * @see RubyKernel */) directive(public) directive(static) type(class) class(ObjectMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(intialize)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** * Default allocator instance for all Ruby objects. The only * reason to not use this allocator is if you actually need to * have all instances of something be a subclass of RubyObject. * * @see org.jruby.runtime.ObjectAllocator */) directive(public) directive(static) directive(final) ident(ObjectAllocator) ident(OBJECT_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyObject)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) comment(/** * Will make sure that this object is added to the current object * space. * * @see org.jruby.runtime.ObjectSpace */) directive(public) type(void) ident(attachToObjectSpace)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(add)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** * This is overridden in the other concrete Java builtins to provide a fast way * to determine what type they are. * * Will generally return a value from org.jruby.runtime.ClassIndex * * @see org.jruby.runtime.ClassInde */) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(OBJECT)operator(;) operator(}) comment(/** * Specifically polymorphic method that are meant to be overridden * by modules to specify that they are modules in an easy way. */) directive(public) type(boolean) ident(isModule)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Specifically polymorphic method that are meant to be overridden * by classes to specify that they are classes in an easy way. */) directive(public) type(boolean) ident(isClass)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Is object immediate (def: Fixnum, Symbol, true, false, nil?\). */) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** rb_make_metaclass * * Will create a new meta class, insert this in the chain of * classes for this specific object, and return the generated meta * class. */) directive(public) ident(RubyClass) ident(makeMetaClass)operator(()ident(RubyClass) ident(superClass)operator(\)) operator({) ident(MetaClass) ident(klass) operator(=) keyword(new) ident(MetaClass)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(superClass)operator(\))operator(;) comment(// rb_class_boot) ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) ident(klass)operator(.)ident(setAttached)operator(()local_variable(this)operator(\))operator(;) ident(klass)operator(.)ident(setMetaClass)operator(()ident(superClass)operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) keyword(return) ident(klass)operator(;) operator(}) comment(/** * Will return the Java interface that most closely can represent * this object, when working through JAva integration * translations. */) directive(public) pre_type(Class) ident(getJavaClass)operator(()operator(\)) operator({) keyword(if) operator(()ident(dataGetStruct)operator(()operator(\)) keyword(instanceof) ident(JavaObject)operator(\)) operator({) keyword(return) operator(()operator(()ident(JavaObject)operator(\))ident(dataGetStruct)operator(()operator(\))operator(\))operator(.)ident(getValue)operator(()operator(\))operator(.)ident(getClass)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getClass)operator(()operator(\))operator(;) operator(}) comment(/** * Simple helper to print any objects. */) directive(public) directive(static) type(void) ident(puts)operator(()pre_type(Object) ident(obj)operator(\)) operator({) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()ident(obj)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * This method is just a wrapper around the Ruby "==" method, * provided so that RubyObjects can be used as keys in the Java * HashMap object underlying RubyHash. */) annotation(@Override) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\)) operator({) keyword(return) ident(other) operator(==) local_variable(this) operator(||) ident(other) keyword(instanceof) ident(IRubyObject) operator(&&) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(EQUALEQUAL)operator(,) stringoperator(,) operator(()ident(IRubyObject)operator(\)) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) comment(/** * The default toString method is just a wrapper that calls the * Ruby "to_s" method. */) annotation(@Override) directive(public) pre_type(String) ident(toString)operator(()operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(,) stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) comment(/** * Will return the runtime that this object is associated with. * * @return current runtime */) directive(public) directive(final) ident(Ruby) ident(getRuntime)operator(()operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(getClassRuntime)operator(()operator(\))operator(;) operator(}) comment(/** * if exist return the meta-class else return the type of the object. * */) directive(public) directive(final) ident(RubyClass) ident(getMetaClass)operator(()operator(\)) operator({) keyword(return) ident(metaClass)operator(;) operator(}) comment(/** * Makes it possible to change the metaclass of an object. In * practice, this is a simple version of Smalltalks Become, except * that it doesn't work when we're dealing with subclasses. In * practice it's used to change the singleton/meta class used, * without changing the "real" inheritance chain. */) directive(public) type(void) ident(setMetaClass)operator(()ident(RubyClass) ident(metaClass)operator(\)) operator({) local_variable(this)operator(.)ident(metaClass) operator(=) ident(metaClass)operator(;) operator(}) comment(/** * Is this value frozen or not? Shortcut for doing * getFlag(FROZEN_F\). * * @return true if this object is frozen, false otherwise */) directive(public) type(boolean) ident(isFrozen)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(FROZEN_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) comment(/** * Sets whether this object is frozen or not. Shortcut for doing * setFlag(FROZEN_F, frozen\). * * @param frozen should this object be frozen? */) directive(public) type(void) ident(setFrozen)operator(()type(boolean) ident(frozen)operator(\)) operator({) keyword(if) operator(()ident(frozen)operator(\)) operator({) ident(flags) operator(|=) ident(FROZEN_F)operator(;) operator(}) keyword(else) operator({) ident(flags) operator(&=) operator(~)ident(FROZEN_F)operator(;) operator(}) operator(}) comment(/** rb_frozen_class_p * * Helper to test whether this object is frozen, and if it is will * throw an exception based on the message. */) directive(protected) directive(final) type(void) ident(testFrozen)operator(()pre_type(String) ident(message)operator(\)) operator({) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFrozenError)operator(()ident(message) operator(+) string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** * The actual method that checks frozen with the default frozen message from MRI. * If possible, call this instead of {@link #testFrozen}. */) directive(protected) type(void) ident(checkFrozen)operator(()operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) operator(}) comment(/** * Gets the taint. Shortcut for getFlag(TAINTED_F\). * * @return true if this object is tainted */) directive(public) type(boolean) ident(isTaint)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(TAINTED_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) comment(/** * Sets the taint flag. Shortcut for setFlag(TAINTED_F, taint\) * * @param taint should this object be tainted or not? */) directive(public) type(void) ident(setTaint)operator(()type(boolean) ident(taint)operator(\)) operator({) keyword(if) operator(()ident(taint)operator(\)) operator({) ident(flags) operator(|=) ident(TAINTED_F)operator(;) operator(}) keyword(else) operator({) ident(flags) operator(&=) operator(~)ident(TAINTED_F)operator(;) operator(}) operator(}) comment(/** * Does this object represent nil? See the docs for the {@link * #NIL_F} flag for more information. */) directive(public) directive(final) type(boolean) ident(isNil)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(NIL_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) comment(/** * Is this value a true value or not? Based on the {@link #FALSE_F} flag. */) directive(public) directive(final) type(boolean) ident(isTrue)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(FALSE_F)operator(\)) operator(==) integer(0)operator(;) operator(}) comment(/** * Is this value a false value or not? Based on the {@link #FALSE_F} flag. */) directive(public) directive(final) type(boolean) ident(isFalse)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(FALSE_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) comment(/** * Does this object respond to the specified message? Uses a * shortcut if it can be proved that respond_to? haven't been * overridden. */) directive(public) directive(final) type(boolean) ident(respondsTo)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(searchMethod)operator(()stringoperator(\)) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getRespondToMethod)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(isMethodBound)operator(()ident(name)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(,)ident(getRuntime)operator(()operator(\))operator(.)ident(newSymbol)operator(()ident(name)operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_singleton_class * * Note: this method is specialized for RubyFixnum, RubySymbol, * RubyNil and RubyBoolean * * Will either return the existing singleton class for this * object, or create a new one and return that. */) directive(public) ident(RubyClass) ident(getSingletonClass)operator(()operator(\)) operator({) ident(RubyClass) ident(klass)operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(isSingleton)operator(()operator(\)) operator(&&) operator(()operator(()ident(MetaClass)operator(\))ident(getMetaClass)operator(()operator(\))operator(\))operator(.)ident(getAttached)operator(()operator(\)) operator(==) local_variable(this)operator(\)) operator({) ident(klass) operator(=) ident(getMetaClass)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(klass) operator(=) ident(makeMetaClass)operator(()ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) ident(klass)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) ident(klass)operator(.)ident(setFrozen)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(klass)operator(;) operator(}) comment(/** rb_singleton_class_clone * * Will make sure that if the current objects class is a * singleton, it will get cloned. * * @return either a real class, or a clone of the current singleton class */) directive(protected) ident(RubyClass) ident(getSingletonClassClone)operator(()operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) ident(getMetaClass)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(klass)operator(.)ident(isSingleton)operator(()operator(\))operator(\)) keyword(return) ident(klass)operator(;) ident(MetaClass) ident(clone) operator(=) keyword(new) ident(MetaClass)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(clone)operator(.)ident(flags) operator(=) ident(flags)operator(;) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyClass)operator(\)) operator({) ident(clone)operator(.)ident(setMetaClass)operator(()ident(clone)operator(\))operator(;) operator(}) keyword(else) operator({) ident(clone)operator(.)ident(setMetaClass)operator(()ident(klass)operator(.)ident(getSingletonClassClone)operator(()operator(\))operator(\))operator(;) operator(}) ident(clone)operator(.)ident(setSuperClass)operator(()ident(klass)operator(.)ident(getSuperClass)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(klass)operator(.)ident(hasVariables)operator(()operator(\))operator(\)) operator({) ident(clone)operator(.)ident(syncVariables)operator(()ident(klass)operator(.)ident(getVariableList)operator(()operator(\))operator(\))operator(;) operator(}) ident(klass)operator(.)ident(cloneMethods)operator(()ident(clone)operator(\))operator(;) operator(()operator(()ident(MetaClass)operator(\))ident(clone)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(.)ident(setAttached)operator(()ident(clone)operator(\))operator(;) operator(()operator(()ident(MetaClass)operator(\))ident(clone)operator(\))operator(.)ident(setAttached)operator(()operator(()operator(()ident(MetaClass)operator(\))ident(klass)operator(\))operator(.)ident(getAttached)operator(()operator(\))operator(\))operator(;) keyword(return) ident(clone)operator(;) operator(}) comment(/** init_copy * * Initializes a copy with variable and special instance variable * information, and then call the initialize_copy Ruby method. */) directive(private) directive(static) type(void) ident(initCopy)operator(()ident(IRubyObject) ident(clone)operator(,) ident(RubyObject) ident(original)operator(\)) operator({) keyword(assert) operator(!)ident(clone)operator(.)ident(isFrozen)operator(()operator(\)) operator(:) string operator(+) ident(clone)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(;) ident(original)operator(.)ident(copySpecialInstanceVariables)operator(()ident(clone)operator(\))operator(;) keyword(if) operator(()ident(original)operator(.)ident(hasVariables)operator(()operator(\))operator(\)) operator({) ident(clone)operator(.)ident(syncVariables)operator(()ident(original)operator(.)ident(getVariableList)operator(()operator(\))operator(\))operator(;) operator(}) comment(/* FIXME: finalizer should be dupped here */) ident(clone)operator(.)ident(callMethod)operator(()ident(clone)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(original)operator(\))operator(;) operator(}) comment(/** OBJ_INFECT * * Infects this object with traits from the argument obj. In real * terms this currently means that if obj is tainted, this object * will get tainted too. It's possible to hijack this method to do * other infections if that would be interesting. */) directive(public) ident(IRubyObject) ident(infectBy)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * The protocol for super method invocation is a bit complicated * in Ruby. In real terms it involves first finding the real * implementation class (the super class\), getting the name of the * method to call from the frame, and then invoke that on the * super class with the current self as the actual object * invoking. */) directive(public) ident(IRubyObject) ident(callSuper)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyModule) ident(klazz) operator(=) ident(context)operator(.)ident(getFrameKlazz)operator(()operator(\))operator(;) ident(RubyClass) ident(superClass) operator(=) ident(RuntimeHelpers)operator(.)ident(findImplementerIfNecessary)operator(()ident(getMetaClass)operator(()operator(\))operator(,) ident(klazz)operator(\))operator(.)ident(getSuperClass)operator(()operator(\))operator(;) keyword(if) operator(()ident(superClass) operator(==) pre_constant(null)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(context)operator(.)ident(getFrameName)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(callMethodMissing)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(klazz)operator(.)ident(searchMethod)operator(()ident(name)operator(\))operator(,) ident(name)operator(,) ident(args)operator(,) local_variable(this)operator(,) ident(CallType)operator(.)ident(SUPER)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invokeAs)operator(()ident(context)operator(,) ident(superClass)operator(,) local_variable(this)operator(,) ident(context)operator(.)ident(getFrameName)operator(()operator(\))operator(,) ident(args)operator(,) ident(CallType)operator(.)ident(SUPER)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** * Will invoke a named method with no arguments and no block. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(\))operator(;) operator(}) comment(/** * Will invoke a named method with one argument and no block with * functional invocation. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(\))operator(;) operator(}) comment(/** * Will invoke a named method with the supplied arguments and no * block with functional invocation. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** * Will invoke a named method with the supplied arguments and * supplied block with functional invocation. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** * Will invoke an indexed method with the no arguments and no * block. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) type(int) ident(methodIndex)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(\))operator(;) operator(}) comment(/** * Will invoke an indexed method with the one argument and no * block with a functional invocation. */) directive(public) directive(final) ident(IRubyObject) ident(callMethod)operator(()ident(ThreadContext) ident(context)operator(,) type(int) ident(methodIndex)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) comment(/** * Call the Ruby initialize method with the supplied arguments and block. */) directive(public) directive(final) type(void) ident(callInit)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** rb_to_id * * Will try to convert this object to a String using the Ruby * "to_str" if the object isn't already a String. If this still * doesn't work, will throw a Ruby TypeError. * */) directive(public) pre_type(String) ident(asJavaString)operator(()operator(\)) operator({) ident(IRubyObject) ident(asString) operator(=) ident(checkStringType)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)ident(asString)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) operator(()operator(()ident(RubyString)operator(\))ident(asString)operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(inspect)operator(()operator(\))operator(.)ident(toString)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby Array using the "to_ary" * method. */) directive(public) ident(RubyArray) ident(convertToArray)operator(()operator(\)) operator({) keyword(return) operator(()ident(RubyArray)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getArray)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_ARY)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby Hash using the "to_hash" * method. */) directive(public) ident(RubyHash) ident(convertToHash)operator(()operator(\)) operator({) keyword(return) operator(()ident(RubyHash)operator(\))ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getHash)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_HASH)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby Float using the "to_f" * method. */) directive(public) ident(RubyFloat) ident(convertToFloat)operator(()operator(\)) operator({) keyword(return) operator(()ident(RubyFloat)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getFloat)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_F)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby Integer using the "to_int" * method. */) directive(public) ident(RubyInteger) ident(convertToInteger)operator(()operator(\)) operator({) keyword(return) ident(convertToInteger)operator(()ident(MethodIndex)operator(.)ident(TO_INT)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby Integer using the * supplied conversion method. */) directive(public) ident(RubyInteger) ident(convertToInteger)operator(()type(int) ident(convertMethodIndex)operator(,) pre_type(String) ident(convertMethod)operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getInteger)operator(()operator(\))operator(,) ident(convertMethodIndex)operator(,) ident(convertMethod)operator(,) pre_constant(true)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(val) keyword(instanceof) ident(RubyInteger)operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(convertMethod) operator(+) stringoperator(\))operator(;) keyword(return) operator(()ident(RubyInteger)operator(\))ident(val)operator(;) operator(}) comment(/** * Tries to convert this object to a Ruby String using the * "to_str" method. */) directive(public) ident(RubyString) ident(convertToString)operator(()operator(\)) operator({) keyword(return) operator(()ident(RubyString)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_STR)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Tries to convert this object to the specified Ruby type, using * a specific conversion method. */) directive(public) directive(final) ident(IRubyObject) ident(convertToType)operator(()ident(RubyClass) ident(target)operator(,) type(int) ident(convertMethodIndex)operator(\)) operator({) keyword(return) ident(TypeConverter)operator(.)ident(convertToType)operator(()local_variable(this)operator(,) ident(target)operator(,) ident(convertMethodIndex)operator(,) operator(()pre_type(String)operator(\))ident(MethodIndex)operator(.)ident(NAMES)operator(.)ident(get)operator(()ident(convertMethodIndex)operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_as_string * * First converts this object into a String using the "to_s" * method, infects it with the current taint and returns it. If * to_s doesn't return a Ruby String, {@link #anyToString} is used * instead. */) directive(public) ident(RubyString) ident(asString)operator(()operator(\)) operator({) ident(IRubyObject) ident(str) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(str) keyword(instanceof) ident(RubyString)operator(\))operator(\)) keyword(return) operator(()ident(RubyString)operator(\))ident(anyToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) operator(()ident(RubyString)operator(\)) ident(str)operator(;) operator(}) comment(/** rb_check_string_type * * Tries to return a coerced string representation of this object, * using "to_str". If that returns something other than a String * or nil, an empty String will be returned. * */) directive(public) ident(IRubyObject) ident(checkStringType)operator(()operator(\)) operator({) ident(IRubyObject) ident(str) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_STR)operator(,) stringoperator(\))operator(;) keyword(if)operator(()operator(!)ident(str)operator(.)ident(isNil)operator(()operator(\)) operator(&&) operator(!)operator(()ident(str) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) ident(str) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_check_array_type * * Returns the result of trying to convert this object to an Array * with "to_ary". */) directive(public) ident(IRubyObject) ident(checkArrayType)operator(()operator(\)) operator({) keyword(return) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()local_variable(this)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getArray)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(TO_ARY)operator(,) stringoperator(\))operator(;) operator(}) comment(/** specific_eval * * Evaluates the block or string inside of the context of this * object, using the supplied arguments. If a block is given, this * will be yielded in the specific context of this object. If no * block is given then a String-like object needs to be the first * argument, and this string will be evaluated. Second and third * arguments in the args-array is optional, but can contain the * filename and line of the string under evaluation. */) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(specificEval)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(mod)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(0)operator(\))operator(;) keyword(return) ident(yieldUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(3)operator(\)) operator({) pre_type(String) ident(lastFuncName) operator(=) ident(context)operator(.)ident(getFrameName)operator(()operator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(() string operator(+) ident(lastFuncName) operator(+) string operator(+) ident(lastFuncName) operator(+) stringoperator(\))operator(;) operator(}) comment(// We just want the TypeError if the argument doesn't convert to a String (JRUBY-386\)) ident(RubyString) ident(evalStr)operator(;) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(evalStr) operator(=) operator(()ident(RubyString)operator(\))ident(args)operator([)integer(0)operator(])operator(;) operator(}) keyword(else) operator({) ident(evalStr) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(file)operator(;) type(int) ident(line)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(file) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) operator({) ident(line) operator(=) operator(()type(int)operator(\))operator(()ident(args)operator([)integer(2)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) operator(}) keyword(else) operator({) ident(line) operator(=) integer(0)operator(;) operator(}) operator(}) keyword(else) operator({) ident(file) operator(=) stringoperator(;) ident(line) operator(=) integer(0)operator(;) operator(}) keyword(return) ident(evalUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(evalStr)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) comment(/** specific_eval * * Evaluates the block or string inside of the context of this * object, using the supplied arguments. If a block is given, this * will be yielded in the specific context of this object. If no * block is given then a String-like object needs to be the first * argument, and this string will be evaluated. Second and third * arguments in the args-array is optional, but can contain the * filename and line of the string under evaluation. */) directive(public) ident(IRubyObject) ident(specificEval)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(mod)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(return) ident(yieldUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** specific_eval * * Evaluates the block or string inside of the context of this * object, using the supplied arguments. If a block is given, this * will be yielded in the specific context of this object. If no * block is given then a String-like object needs to be the first * argument, and this string will be evaluated. Second and third * arguments in the args-array is optional, but can contain the * filename and line of the string under evaluation. */) directive(public) ident(IRubyObject) ident(specificEval)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(mod)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(1)operator(,) integer(0)operator(\))operator(;) comment(// We just want the TypeError if the argument doesn't convert to a String (JRUBY-386\)) ident(RubyString) ident(evalStr)operator(;) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(evalStr) operator(=) operator(()ident(RubyString)operator(\))ident(arg)operator(;) operator(}) keyword(else) operator({) ident(evalStr) operator(=) ident(arg)operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(file) operator(=) stringoperator(;) type(int) ident(line) operator(=) integer(0)operator(;) keyword(return) ident(evalUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(evalStr)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) comment(/** specific_eval * * Evaluates the block or string inside of the context of this * object, using the supplied arguments. If a block is given, this * will be yielded in the specific context of this object. If no * block is given then a String-like object needs to be the first * argument, and this string will be evaluated. Second and third * arguments in the args-array is optional, but can contain the * filename and line of the string under evaluation. */) directive(public) ident(IRubyObject) ident(specificEval)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(mod)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(2)operator(,) integer(0)operator(\))operator(;) comment(// We just want the TypeError if the argument doesn't convert to a String (JRUBY-386\)) ident(RubyString) ident(evalStr)operator(;) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(evalStr) operator(=) operator(()ident(RubyString)operator(\))ident(arg0)operator(;) operator(}) keyword(else) operator({) ident(evalStr) operator(=) ident(arg0)operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(file) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(;) type(int) ident(line) operator(=) integer(0)operator(;) keyword(return) ident(evalUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(evalStr)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) comment(/** specific_eval * * Evaluates the block or string inside of the context of this * object, using the supplied arguments. If a block is given, this * will be yielded in the specific context of this object. If no * block is given then a String-like object needs to be the first * argument, and this string will be evaluated. Second and third * arguments in the args-array is optional, but can contain the * filename and line of the string under evaluation. */) directive(public) ident(IRubyObject) ident(specificEval)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(mod)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(2)operator(,) integer(0)operator(\))operator(;) comment(// We just want the TypeError if the argument doesn't convert to a String (JRUBY-386\)) ident(RubyString) ident(evalStr)operator(;) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(evalStr) operator(=) operator(()ident(RubyString)operator(\))ident(arg0)operator(;) operator(}) keyword(else) operator({) ident(evalStr) operator(=) ident(arg0)operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(file) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(;) type(int) ident(line) operator(=) operator(()type(int)operator(\))operator(()ident(arg2)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) keyword(return) ident(evalUnder)operator(()ident(context)operator(,) ident(mod)operator(,) ident(evalStr)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) comment(/** * Evaluates the string src with self set to the current object, * using the module under as the context. * @deprecated Call with an int line number and String file */) directive(public) ident(IRubyObject) ident(evalUnder)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(under)operator(,) ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(file)operator(,) ident(IRubyObject) ident(line)operator(\)) operator({) keyword(return) ident(evalUnder)operator(()ident(context)operator(,) ident(under)operator(,) ident(src)operator(.)ident(convertToString)operator(()operator(\))operator(,) ident(file)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(,) operator(()type(int)operator(\)) operator(()ident(line)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(-) integer(1)operator(\))operator(\))operator(;) operator(}) comment(/** * Evaluates the string src with self set to the current object, * using the module under as the context. */) directive(public) ident(IRubyObject) ident(evalUnder)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(under)operator(,) ident(RubyString) ident(src)operator(,) pre_type(String) ident(file)operator(,) type(int) ident(line)operator(\)) operator({) pre_type(Visibility) ident(savedVisibility) operator(=) ident(context)operator(.)ident(getCurrentVisibility)operator(()operator(\))operator(;) ident(context)operator(.)ident(setCurrentVisibility)operator(()pre_type(Visibility)operator(.)ident(PUBLIC)operator(\))operator(;) ident(context)operator(.)ident(preExecuteUnder)operator(()ident(under)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(try) operator({) keyword(return) ident(ASTInterpreter)operator(.)ident(evalSimple)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(src)operator(,) ident(file)operator(,) ident(line)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(context)operator(.)ident(postExecuteUnder)operator(()operator(\))operator(;) ident(context)operator(.)ident(setCurrentVisibility)operator(()ident(savedVisibility)operator(\))operator(;) operator(}) operator(}) comment(/** * Will yield to the specific block changing the self to be the * current object instead of the self that is part of the frame * saved in the block frame. This method is the basis for the Ruby * instance_eval and module_eval methods. The arguments sent in to * it in the args array will be yielded to the block. This makes * it possible to emulate both instance_eval and instance_exec * with this implementation. */) directive(private) ident(IRubyObject) ident(yieldUnder)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(under)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(context)operator(.)ident(preExecuteUnder)operator(()ident(under)operator(,) ident(block)operator(\))operator(;) pre_type(Visibility) ident(savedVisibility) operator(=) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getVisibility)operator(()operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()pre_type(Visibility)operator(.)ident(PUBLIC)operator(\))operator(;) keyword(try) operator({) ident(IRubyObject) ident(valueInYield)operator(;) type(boolean) ident(aValue)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(valueInYield) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(aValue) operator(=) pre_constant(false)operator(;) operator(}) keyword(else) operator({) ident(valueInYield) operator(=) ident(RubyArray)operator(.)ident(newArrayNoCopy)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) ident(aValue) operator(=) pre_constant(true)operator(;) operator(}) comment(// FIXME: This is an ugly hack to resolve JRUBY-1381; I'm not proud of it) ident(block) operator(=) ident(block)operator(.)ident(cloneBlock)operator(()operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setSelf)operator(()ident(RubyObject)operator(.)ident(this)operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getFrame)operator(()operator(\))operator(.)ident(setSelf)operator(()ident(RubyObject)operator(.)ident(this)operator(\))operator(;) comment(// end hack) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(valueInYield)operator(,) ident(RubyObject)operator(.)ident(this)operator(,) ident(context)operator(.)ident(getRubyClass)operator(()operator(\))operator(,) ident(aValue)operator(\))operator(;) comment(//TODO: Should next and return also catch here?) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()ident(savedVisibility)operator(\))operator(;) ident(context)operator(.)ident(postExecuteUnder)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** * Will yield to the specific block changing the self to be the * current object instead of the self that is part of the frame * saved in the block frame. This method is the basis for the Ruby * instance_eval and module_eval methods. The arguments sent in to * it in the args array will be yielded to the block. This makes * it possible to emulate both instance_eval and instance_exec * with this implementation. */) directive(private) ident(IRubyObject) ident(yieldUnder)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(RubyModule) ident(under)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(context)operator(.)ident(preExecuteUnder)operator(()ident(under)operator(,) ident(block)operator(\))operator(;) pre_type(Visibility) ident(savedVisibility) operator(=) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getVisibility)operator(()operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()pre_type(Visibility)operator(.)ident(PUBLIC)operator(\))operator(;) keyword(try) operator({) comment(// FIXME: This is an ugly hack to resolve JRUBY-1381; I'm not proud of it) ident(block) operator(=) ident(block)operator(.)ident(cloneBlock)operator(()operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setSelf)operator(()ident(RubyObject)operator(.)ident(this)operator(\))operator(;) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getFrame)operator(()operator(\))operator(.)ident(setSelf)operator(()ident(RubyObject)operator(.)ident(this)operator(\))operator(;) comment(// end hack) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) local_variable(this)operator(,) local_variable(this)operator(,) ident(context)operator(.)ident(getRubyClass)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) comment(//TODO: Should next and return also catch here?) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()ident(savedVisibility)operator(\))operator(;) ident(context)operator(.)ident(postExecuteUnder)operator(()operator(\))operator(;) operator(}) operator(}) comment(// Methods of the Object class (rb_obj_*\):) comment(/** rb_obj_equal * * Will by default use identity equality to compare objects. This * follows the Ruby semantics. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(obj) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_equal * * Will use Java identity equality. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(equal_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(obj) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** method used for Hash key comparison (specialized for String, Symbol and Fixnum\) * * Will by default just call the Ruby method "eql?" */) directive(public) type(boolean) ident(eql)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(EQL_P)operator(,) stringoperator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_equal * * Just like "==" and "equal?", "eql?" will use identity equality for Object. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) local_variable(this) operator(==) ident(obj) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_equal * * The Ruby "===" method is used by default in case/when * statements. The Object implementation first checks Java identity * equality and then calls the "==" method too. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_eqq)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(equalInternal)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) comment(/** * Helper method for checking equality, first using Java identity * equality, and then calling the "==" method. */) directive(protected) directive(static) type(boolean) ident(equalInternal)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(that)operator(,) directive(final) ident(IRubyObject) ident(other)operator(\))operator({) keyword(return) ident(that) operator(==) ident(other) operator(||) ident(that)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EQUALEQUAL)operator(,) stringoperator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) comment(/** * Helper method for checking equality, first using Java identity * equality, and then calling the "eql?" method. */) directive(protected) directive(static) type(boolean) ident(eqlInternal)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) directive(final) ident(IRubyObject) ident(that)operator(,) directive(final) ident(IRubyObject) ident(other)operator(\))operator({) keyword(return) ident(that) operator(==) ident(other) operator(||) ident(that)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EQL_P)operator(,) stringoperator(,) ident(other)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_init_copy * * Initializes this object as a copy of the original, that is the * parameter to this object. Will make sure that the argument * actually has the same real class as this object. It shouldn't * be possible to initialize an object with something totally * different. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(original)operator(\)) keyword(return) local_variable(this)operator(;) ident(checkFrozen)operator(()operator(\))operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(original)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** obj_respond_to * * respond_to?( aSymbol, includePriv=false \) -> true or false * * Returns true if this object responds to the given method. Private * methods are included in the search only if the optional second * parameter evaluates to true. * * @return true if this responds to the given method * * !!! For some reason MRI shows the arity of respond_to? as -1, when it should be -2; that's why this is rest instead of required, optional = 1 * * Going back to splitting according to method arity. MRI is wrong * about most of these anyway, and since we have arity splitting * in both the compiler and the interpreter, the performance * benefit is important for this method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(respond_to_p)operator(()ident(IRubyObject) ident(mname)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(mname)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(isMethodBound)operator(()ident(name)operator(,) pre_constant(true)operator(\))operator(\))operator(;) operator(}) comment(/** obj_respond_to * * respond_to?( aSymbol, includePriv=false \) -> true or false * * Returns true if this object responds to the given method. Private * methods are included in the search only if the optional second * parameter evaluates to true. * * @return true if this responds to the given method * * !!! For some reason MRI shows the arity of respond_to? as -1, when it should be -2; that's why this is rest instead of required, optional = 1 * * Going back to splitting according to method arity. MRI is wrong * about most of these anyway, and since we have arity splitting * in both the compiler and the interpreter, the performance * benefit is important for this method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(respond_to_p)operator(()ident(IRubyObject) ident(mname)operator(,) ident(IRubyObject) ident(includePrivate)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(mname)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(isMethodBound)operator(()ident(name)operator(,) operator(!)ident(includePrivate)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_id * * Return the internal id of an object. * * FIXME: Should this be renamed to match its ruby name? */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) directive(synchronized) ident(IRubyObject) ident(id)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(idOf)operator(()local_variable(this)operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_id_obsolete * * Old id version. This one is bound to the "id" name and will emit a deprecation warning. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(synchronized) ident(IRubyObject) ident(id_deprecated)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(id)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_id * * Will return the hash code of this object. In comparison to MRI, * this method will use the Java identity hash code instead of * using rb_obj_id, since the usage of id in JRuby will incur the * cost of some. ObjectSpace maintenance. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()local_variable(super)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Override the Object#hashCode method to make sure that the Ruby * hash is actually used as the hashcode for Ruby objects. If the * Ruby "hash" method doesn't return a number, the Object#hashCode * implementation will be used instead. */) annotation(@Override) directive(public) type(int) ident(hashCode)operator(()operator(\)) operator({) ident(IRubyObject) ident(hashValue) operator(=) ident(callMethod)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(MethodIndex)operator(.)ident(HASH)operator(,) stringoperator(\))operator(;) keyword(if) operator(()ident(hashValue) keyword(instanceof) ident(RubyFixnum)operator(\)) keyword(return) operator(()type(int)operator(\)) ident(RubyNumeric)operator(.)ident(fix2long)operator(()ident(hashValue)operator(\))operator(;) keyword(return) local_variable(super)operator(.)ident(hashCode)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_class * * Returns the real class of this object, excluding any * singleton/meta class in the inheritance chain. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyClass) ident(type)operator(()operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_type * * The deprecated version of type, that emits a deprecation * warning. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyClass) ident(type_deprecated)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(type)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_clone * * This method should be overridden only by: Proc, Method, * UnboundedMethod, Binding. It will use the defined allocated of * the object, then clone the singleton class, taint the object, * call initCopy and then copy frozen state. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(rbClone)operator(()operator(\)) operator({) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) comment(// We're cloning ourselves, so we know the result should be a RubyObject) ident(RubyObject) ident(clone) operator(=) operator(()ident(RubyObject)operator(\))ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(allocate)operator(()operator(\))operator(;) ident(clone)operator(.)ident(setMetaClass)operator(()ident(getSingletonClassClone)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(clone)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) ident(initCopy)operator(()ident(clone)operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) ident(clone)operator(.)ident(setFrozen)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(clone)operator(;) operator(}) comment(/** rb_obj_dup * * This method should be overridden only by: Proc * * Will allocate a new instance of the real class of this object, * and then initialize that copy. It's different from {@link * #rbClone} in that it doesn't copy the singleton class. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(dup)operator(()operator(\)) operator({) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) ident(IRubyObject) ident(dup) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(allocate)operator(()operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) ident(dup)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) ident(initCopy)operator(()ident(dup)operator(,) local_variable(this)operator(\))operator(;) keyword(return) ident(dup)operator(;) operator(}) comment(/** * Lots of MRI objects keep their state in non-lookupable ivars * (e:g. Range, Struct, etc\). This method is responsible for * dupping our java field equivalents */) directive(protected) type(void) ident(copySpecialInstanceVariables)operator(()ident(IRubyObject) ident(clone)operator(\)) operator({) operator(}) comment(/** rb_obj_display * * call-seq: * obj.display(port=$>\) => nil * * Prints obj on the given port (default $>\). * Equivalent to: * * def display(port=$>\) * port.write self * end * * For example: * * 1.display * "cat".display * [ 4, 5, 6 ].display * puts * * produces: * * 1cat456 * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(display)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(port) operator(=) ident(args)operator(.)ident(length) operator(==) integer(0) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()string)delimiter(")>operator(\)) operator(:) ident(args)operator([)integer(0)operator(])operator(;) ident(port)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_tainted * * call-seq: * obj.tainted? => true or false * * Returns true if the object is tainted. * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(tainted_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_taint * * call-seq: * obj.taint -> obj * * Marks obj as tainted---if the $SAFE level is * set appropriately, many method calls which might alter the running * programs environment will refuse to accept tainted strings. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(taint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(taint)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(private) type(void) ident(taint)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) operator(}) comment(/** rb_obj_untaint * * call-seq: * obj.untaint => obj * * Removes the taint from obj. * * Only callable in if more secure than 3. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(untaint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(secure)operator(()integer(3)operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) ident(setTaint)operator(()pre_constant(false)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_obj_freeze * * call-seq: * obj.freeze => obj * * Prevents further modifications to obj. A * TypeError will be raised if modification is attempted. * There is no way to unfreeze a frozen object. See also * Object#frozen?. * * a = [ "a", "b", "c" ] * a.freeze * a << "z" * * produces: * * prog.rb:3:in `<<': can't modify frozen array (TypeError\) * from prog.rb:3 */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(FROZEN_F)operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(if) operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) ident(flags) operator(|=) ident(FROZEN_F)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_obj_frozen_p * * call-seq: * obj.frozen? => true or false * * Returns the freeze status of obj. * * a = [ "a", "b", "c" ] * a.freeze #=> ["a", "b", "c"] * a.frozen? #=> true */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(frozen_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isFrozen)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** inspect_obj * * The internal helper method that takes care of the part of the * inspection that inspects instance variables. */) directive(private) pre_type(StringBuilder) ident(inspectObj)operator(()pre_type(StringBuilder) ident(part)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(sep) operator(=) stringoperator(;) keyword(for) operator(()ident(Variable)operator(<)ident(IRubyObject)operator(>) ident(ivar) operator(:) ident(getInstanceVariableList)operator(()operator(\))operator(\)) operator({) ident(part)operator(.)ident(append)operator(()ident(sep)operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(ivar)operator(.)ident(getName)operator(()operator(\))operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(part)operator(.)ident(append)operator(()ident(ivar)operator(.)ident(getValue)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) ident(sep) operator(=) stringoperator(;) operator(}) ident(part)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(part)operator(;) operator(}) comment(/** rb_inspect * * The internal helper that ensures a RubyString instance is returned * so dangerous casting can be omitted * Prefered over callMethod(context, "inspect"\) */) directive(static) ident(RubyString) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(object)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(object)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_inspect * * call-seq: * obj.inspect => string * * Returns a string containing a human-readable representation of * obj. If not overridden, uses the to_s method to * generate the string. * * [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \\"five\\"]" * Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003" */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(()operator(!)ident(isImmediate)operator(()operator(\))operator(\)) operator(&&) comment(// TYPE(obj\) == T_OBJECT) operator(!)operator(()local_variable(this) keyword(instanceof) ident(RubyClass)operator(\)) operator(&&) local_variable(this) operator(!=) ident(runtime)operator(.)ident(getObject)operator(()operator(\)) operator(&&) local_variable(this) operator(!=) ident(runtime)operator(.)ident(getModule)operator(()operator(\)) operator(&&) operator(!)operator(()local_variable(this) keyword(instanceof) ident(RubyModule)operator(\)) operator(&&) comment(// TODO: should have #hasInstanceVariables method, though) comment(// this will work here:) ident(hasVariables)operator(()operator(\))operator(\)) operator({) pre_type(StringBuilder) ident(part) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) pre_type(String) ident(cname) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(;) ident(part)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(cname)operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(part)operator(.)ident(append)operator(()pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\))operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) operator({) comment(/* 6:tags 16:addr 1:eos */) ident(part)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(part)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(try) operator({) ident(runtime)operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()ident(inspectObj)operator(()ident(part)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(RubyNil)operator(.)ident(inspect)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) local_variable(this)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_obj_is_instance_of * * call-seq: * obj.instance_of?(class\) => true or false * * Returns true if obj is an instance of the given * class. See also Object#kind_of?. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(instance_of_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(type)operator(\)) operator({) keyword(if) operator(()ident(type)operator(()operator(\)) operator(==) ident(type)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)operator(()ident(type) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_obj_is_kind_of * * call-seq: * obj.is_a?(class\) => true or false * obj.kind_of?(class\) => true or false * * Returns true if class is the class of * obj, or if class is one of the superclasses of * obj or modules included in obj. * * module M; end * class A * include M * end * class B < A; end * class C < B; end * b = B.new * b.instance_of? A #=> false * b.instance_of? B #=> true * b.instance_of? C #=> false * b.instance_of? M #=> false * b.kind_of? A #=> true * b.kind_of? B #=> true * b.kind_of? C #=> false * b.kind_of? M #=> true */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(kind_of_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(type)operator(\)) operator({) comment(// TODO: Generalize this type-checking code into IRubyObject helper.) keyword(if) operator(()operator(!)operator(()ident(type) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) operator({) comment(// TODO: newTypeError does not offer enough for ruby error string...) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(()operator(()ident(RubyModule)operator(\))ident(type)operator(\))operator(.)ident(isInstance)operator(()local_variable(this)operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_methods * * call-seq: * obj.methods => array * * Returns a list of the names of methods publicly accessible in * obj. This will include all the methods accessible in * obj's ancestors. * * class Klass * def kMethod(\) * end * end * k = Klass.new * k.methods[0..9] #=> ["kMethod", "freeze", "nil?", "is_a?", * "class", "instance_variable_set", * "methods", "extend", "__send__", "instance_eval"] * k.methods.length #=> 42 */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(methods)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(boolean) ident(all) operator(=) pre_constant(true)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(all) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) ident(RubyArray) ident(singletonMethods) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(singletonMethods) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(instance_methods)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(})operator(\))operator(;) keyword(if) operator(()ident(all)operator(\)) operator({) ident(singletonMethods)operator(.)ident(concat)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getSuperClass)operator(()operator(\))operator(.)ident(instance_methods)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(})operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(all)operator(\)) operator({) ident(singletonMethods) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(instance_methods)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(})operator(\))operator(;) operator(}) keyword(else) operator({) ident(singletonMethods) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEmptyArray)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(singletonMethods)operator(;) operator(}) comment(/** rb_obj_public_methods * * call-seq: * obj.public_methods(all=true\) => array * * Returns the list of public methods accessible to obj. If * the all parameter is set to false, only those methods * in the receiver will be listed. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(public_methods)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(})operator(;) operator(}) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(public_instance_methods)operator(()ident(args)operator(\))operator(;) operator(}) comment(/** rb_obj_protected_methods * * call-seq: * obj.protected_methods(all=true\) => array * * Returns the list of protected methods accessible to obj. If * the all parameter is set to false, only those methods * in the receiver will be listed. * * Internally this implementation uses the * {@link RubyModule#protected_instance_methods} method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(protected_methods)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(})operator(;) operator(}) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(protected_instance_methods)operator(()ident(args)operator(\))operator(;) operator(}) comment(/** rb_obj_private_methods * * call-seq: * obj.private_methods(all=true\) => array * * Returns the list of private methods accessible to obj. If * the all parameter is set to false, only those methods * in the receiver will be listed. * * Internally this implementation uses the * {@link RubyModule#private_instance_methods} method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(private_methods)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(})operator(;) operator(}) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(private_instance_methods)operator(()ident(args)operator(\))operator(;) operator(}) comment(/** rb_obj_singleton_methods * * call-seq: * obj.singleton_methods(all=true\) => array * * Returns an array of the names of singleton methods for obj. * If the optional all parameter is true, the list will include * methods in modules included in obj. * * module Other * def three(\) end * end * * class Single * def Single.four(\) end * end * * a = Single.new * * def a.one(\) * end * * class << a * include Other * def two(\) * end * end * * Single.singleton_methods #=> ["four"] * a.singleton_methods(false\) #=> ["two", "one"] * a.singleton_methods #=> ["two", "one", "three"] */) comment(// TODO: This is almost RubyModule#instance_methods on the metaClass. Perhaps refactor.) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyArray) ident(singleton_methods)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(boolean) ident(all) operator(=) pre_constant(true)operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(all) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(;) operator(}) ident(RubyArray) ident(singletonMethods)operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(isSingleton)operator(()operator(\))operator(\)) operator({) ident(singletonMethods) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(instance_methods)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(})operator(\))operator(;) keyword(if) operator(()ident(all)operator(\)) operator({) ident(RubyClass) ident(superClass) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getSuperClass)operator(()operator(\))operator(;) keyword(while) operator(()ident(superClass)operator(.)ident(isIncluded)operator(()operator(\))operator(\)) operator({) ident(singletonMethods)operator(.)ident(concat)operator(()ident(superClass)operator(.)ident(instance_methods)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(})operator(\))operator(\))operator(;) ident(superClass) operator(=) ident(superClass)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) ident(singletonMethods) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newEmptyArray)operator(()operator(\))operator(;) operator(}) keyword(return) ident(singletonMethods)operator(;) operator(}) comment(/** rb_obj_method * * call-seq: * obj.method(sym\) => method * * Looks up the named method as a receiver in obj, returning a * Method object (or raising NameError\). The * Method object acts as a closure in obj's object * instance, so instance variables and the value of self * remain available. * * class Demo * def initialize(n\) * @iv = n * end * def hello(\) * "Hello, @iv = #{@iv}" * end * end * * k = Demo.new(99\) * m = k.method(:hello\) * m.call #=> "Hello, @iv = 99" * * l = Demo.new('Fred'\) * m = l.method("hello"\) * m.call #=> "Hello, @iv = Fred" */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(method)operator(()ident(IRubyObject) ident(symbol)operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(newMethod)operator(()local_variable(this)operator(,) ident(symbol)operator(.)ident(asJavaString)operator(()operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) comment(/** * Internal method that helps to convert any object into the * format of a class name and a hex string inside of #<>. */) directive(public) ident(IRubyObject) ident(anyToString)operator(()operator(\)) operator({) pre_type(String) ident(cname) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(;) comment(/* 6:tags 16:addr 1:eos */) ident(RubyString) ident(str) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(cname) operator(+) string operator(+) pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\)) operator(+) string)delimiter(")>operator(\))operator(;) ident(str)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_any_to_s * * call-seq: * obj.to_s => string * * Returns a string representing obj. The default * to_s prints the object's class and an encoding of the * object id. As a special case, the top-level object that is the * initial execution context of Ruby programs returns ``main.'' */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(return) ident(anyToString)operator(()operator(\))operator(;) operator(}) comment(/** rb_any_to_a * * call-seq: * obj.to_a -> anArray * * Returns an array representation of obj. For objects of class * Object and others that don't explicitly override the * method, the return value is an array containing self. * However, this latter behavior will soon be obsolete. * * self.to_a #=> -:1: warning: default `to_a' will be obsolete * "hello".to_a #=> ["hello"] * Time.new.to_a #=> [39, 54, 8, 9, 4, 2003, 3, 99, true, "CDT"] * * The default to_a method is deprecated. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PUBLIC)operator(\)) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()local_variable(this)operator(\))operator(;) operator(}) comment(/** rb_obj_instance_eval * * call-seq: * obj.instance_eval(string [, filename [, lineno]] \) => obj * obj.instance_eval {| | block } => obj * * Evaluates a string containing Ruby source code, or the given block, * within the context of the receiver (_obj_\). In order to set the * context, the variable +self+ is set to _obj_ while * the code is executing, giving the code access to _obj_'s * instance variables. In the version of instance_eval * that takes a +String+, the optional second and third * parameters supply a filename and starting line number that are used * when reporting compilation errors. * * class Klass * def initialize * @secret = 99 * end * end * k = Klass.new * k.instance_eval { @secret } #=> 99 */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(instance_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) ident(getInstanceEvalClass)operator(()operator(\))operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(instance_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) ident(getInstanceEvalClass)operator(()operator(\))operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(instance_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) ident(getInstanceEvalClass)operator(()operator(\))operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(instance_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(specificEval)operator(()ident(context)operator(,) ident(getInstanceEvalClass)operator(()operator(\))operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) ident(IRubyObject) ident(instance_eval)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyModule) ident(klazz)operator(;) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) operator({) comment(// Ruby uses Qnil here, we use "dummy" because we need a class) ident(klazz) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDummy)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(klazz) operator(=) ident(getSingletonClass)operator(()operator(\))operator(;) operator(}) keyword(return) ident(specificEval)operator(()ident(context)operator(,) ident(klazz)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) directive(private) ident(RubyModule) ident(getInstanceEvalClass)operator(()operator(\)) operator({) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) operator({) comment(// Ruby uses Qnil here, we use "dummy" because we need a class) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getDummy)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getSingletonClass)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** rb_obj_instance_exec * * call-seq: * obj.instance_exec(arg...\) {|var...| block } => obj * * Executes the given block within the context of the receiver * (_obj_\). In order to set the context, the variable +self+ is set * to _obj_ while the code is executing, giving the code access to * _obj_'s instance variables. Arguments are passed as block parameters. * * class Klass * def initialize * @secret = 99 * end * end * k = Klass.new * k.instance_exec(5\) {|x| @secret+x } #=> 104 */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(3)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(instance_exec)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) ident(RubyModule) ident(klazz)operator(;) keyword(if) operator(()ident(isImmediate)operator(()operator(\))operator(\)) operator({) comment(// Ruby uses Qnil here, we use "dummy" because we need a class) ident(klazz) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDummy)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(klazz) operator(=) ident(getSingletonClass)operator(()operator(\))operator(;) operator(}) keyword(return) ident(yieldUnder)operator(()ident(context)operator(,) ident(klazz)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** rb_obj_extend * * call-seq: * obj.extend(module, ...\) => obj * * Adds to _obj_ the instance methods from each module given as a * parameter. * * module Mod * def hello * "Hello from Mod.\\n" * end * end * * class Klass * def hello * "Hello from Klass.\\n" * end * end * * k = Klass.new * k.hello #=> "Hello from Klass.\\n" * k.extend(Mod\) #=> # * k.hello #=> "Hello from Mod.\\n" */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(extend)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) comment(// Make sure all arguments are modules before calling the callbacks) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(args)operator([)ident(i)operator(])operator(.)ident(isModule)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(args)operator([)ident(i)operator(])operator(,) ident(runtime)operator(.)ident(getModule)operator(()operator(\))operator(\))operator(;) operator(}) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) comment(// MRI extends in order from last to first) keyword(for) operator(()type(int) ident(i) operator(=) ident(args)operator(.)ident(length) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) ident(args)operator([)ident(i)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) ident(args)operator([)ident(i)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_obj_dummy * * Default initialize method. This one gets defined in some other * place as a Ruby method. */) directive(public) ident(IRubyObject) ident(initialize)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_f_send * * send( aSymbol [, args ]* \) -> anObject * * Invokes the method identified by aSymbol, passing it any arguments * specified. You can use __send__ if the name send clashes with an * existing method in this object. * *
     * class Klass
     *   def hello(*args\)
     *     "Hello " + args.join(' '\)
     *   end
     * end
     *
     * k = Klass.new
     * k.send :hello, "gentle", "readers"
     * 
* * @return the result of invoking the method identified by aSymbol. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(send)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()integer(0)operator(,) integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(send)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(arg0)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(finvoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(send)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(arg0)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(finvoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(send)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(arg0)operator(.)ident(asJavaString)operator(()operator(\))operator(;) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(finvoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(send)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(name) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(;) type(int) ident(newArgsLength) operator(=) ident(args)operator(.)ident(length) operator(-) integer(1)operator(;) ident(IRubyObject)type([]) ident(newArgs)operator(;) keyword(if) operator(()ident(newArgsLength) operator(==) integer(0)operator(\)) operator({) ident(newArgs) operator(=) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(;) operator(}) keyword(else) operator({) ident(newArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(newArgsLength)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(1)operator(,) ident(newArgs)operator(,) integer(0)operator(,) ident(newArgs)operator(.)ident(length)operator(\))operator(;) operator(}) keyword(return) ident(getMetaClass)operator(()operator(\))operator(.)ident(finvoke)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(name)operator(,) ident(newArgs)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** rb_false * * call_seq: * nil.nil? => true * .nil? => false * * Only the object nil responds true to nil?. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(nil_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_pattern_match * * call-seq: * obj =~ other => false * * Pattern Match---Overridden by descendents (notably * Regexp and String\) to provide meaningful * pattern-match semantics. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_match)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(to_java)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(as)operator(()pre_type(Class) ident(javaClass)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.IRubyObject#getType(\) */) directive(public) ident(RubyClass) ident(getType)operator(()operator(\)) operator({) keyword(return) ident(type)operator(()operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.IRubyObject#dataWrapStruct(\) */) directive(public) directive(synchronized) type(void) ident(dataWrapStruct)operator(()pre_type(Object) ident(obj)operator(\)) operator({) local_variable(this)operator(.)ident(dataStruct) operator(=) ident(obj)operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.IRubyObject#dataGetStruct(\) */) directive(public) directive(synchronized) pre_type(Object) ident(dataGetStruct)operator(()operator(\)) operator({) keyword(return) ident(dataStruct)operator(;) operator(}) comment(/** * Adds the specified object as a finalizer for this object. */) directive(public) type(void) ident(addFinalizer)operator(()ident(IRubyObject) ident(finalizer)operator(\)) operator({) keyword(if) operator(()local_variable(this)operator(.)ident(finalizer) operator(==) pre_constant(null)operator(\)) operator({) local_variable(this)operator(.)ident(finalizer) operator(=) keyword(new) ident(Finalizer)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(idOf)operator(()local_variable(this)operator(\))operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(addFinalizer)operator(()local_variable(this)operator(.)ident(finalizer)operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(finalizer)operator(.)ident(addFinalizer)operator(()ident(finalizer)operator(\))operator(;) operator(}) comment(/** * Remove all the finalizers for this object. */) directive(public) type(void) ident(removeFinalizers)operator(()operator(\)) operator({) keyword(if) operator(()ident(finalizer) operator(!=) pre_constant(null)operator(\)) operator({) ident(finalizer)operator(.)ident(removeFinalizers)operator(()operator(\))operator(;) ident(finalizer) operator(=) pre_constant(null)operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(removeFinalizer)operator(()local_variable(this)operator(.)ident(finalizer)operator(\))operator(;) operator(}) operator(}) comment(//) comment(// INSTANCE VARIABLE RUBY METHODS) comment(//) comment(/** rb_obj_ivar_defined * * call-seq: * obj.instance_variable_defined?(symbol\) => true or false * * Returns true if the given instance variable is * defined in obj. * * class Fred * def initialize(p1, p2\) * @a, @b = p1, p2 * end * end * fred = Fred.new('cat', 99\) * fred.instance_variable_defined?(:@a\) #=> true * fred.instance_variable_defined?("@b"\) #=> true * fred.instance_variable_defined?("@c"\) #=> false */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(instance_variable_defined_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) keyword(if) operator(()ident(variableTableContains)operator(()ident(validateInstanceVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(\))operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_ivar_get * * call-seq: * obj.instance_variable_get(symbol\) => obj * * Returns the value of the given instance variable, or nil if the * instance variable is not set. The @ part of the * variable name should be included for regular instance * variables. Throws a NameError exception if the * supplied symbol is not valid as an instance variable name. * * class Fred * def initialize(p1, p2\) * @a, @b = p1, p2 * end * end * fred = Fred.new('cat', 99\) * fred.instance_variable_get(:@a\) #=> "cat" * fred.instance_variable_get("@b"\) #=> 99 */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(instance_variable_get)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(\)) operator({) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(variableTableFetch)operator(()ident(validateInstanceVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_obj_ivar_set * * call-seq: * obj.instance_variable_set(symbol, obj\) => obj * * Sets the instance variable names by symbol to * object, thereby frustrating the efforts of the class's * author to attempt to provide proper encapsulation. The variable * did not have to exist prior to this call. * * class Fred * def initialize(p1, p2\) * @a, @b = p1, p2 * end * end * fred = Fred.new('cat', 99\) * fred.instance_variable_set(:@a, 'dog'\) #=> "dog" * fred.instance_variable_set(:@c, 'cat'\) #=> "cat" * fred.inspect #=> "#" */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(instance_variable_set)operator(()ident(IRubyObject) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(ensureInstanceVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableStore)operator(()ident(validateInstanceVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** rb_obj_remove_instance_variable * * call-seq: * obj.remove_instance_variable(symbol\) => obj * * Removes the named instance variable from obj, returning that * variable's value. * * class Dummy * attr_reader :var * def initialize * @var = 99 * end * def remove * remove_instance_variable(:@var\) * end * end * d = Dummy.new * d.var #=> 99 * d.remove #=> 99 * d.var #=> nil */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(remove_instance_variable)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(name)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(ensureInstanceVariablesSettable)operator(()operator(\))operator(;) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(variableTableRemove)operator(()ident(validateInstanceVariable)operator(()ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name)operator(.)ident(asJavaString)operator(()operator(\)) operator(+) stringoperator(,) ident(name)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_obj_instance_variables * * call-seq: * obj.instance_variables => array * * Returns an array of instance variable names for the receiver. Note * that simply defining an accessor does not create the corresponding * instance variable. * * class Fred * attr_accessor :a1 * def initialize * @iv = 3 * end * end * Fred.new.instance_variables #=> ["@iv"] */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(instance_variables)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(List)operator(<)pre_type(String)operator(>) ident(nameList) operator(=) ident(getInstanceVariableNameList)operator(()operator(\))operator(;) ident(RubyArray) ident(array) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(nameList)operator(.)ident(size)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(nameList)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(array)operator(;) operator(}) comment(//) comment(// INSTANCE VARIABLE API METHODS) comment(//) comment(/** * Dummy method to avoid a cast, and to avoid polluting the * IRubyObject interface with all the instance variable management * methods. */) directive(public) ident(InstanceVariables) ident(getInstanceVariables)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#hasInstanceVariable */) directive(public) type(boolean) ident(hasInstanceVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableContains)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#fastHasInstanceVariable */) directive(public) type(boolean) ident(fastHasInstanceVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#getInstanceVariable */) directive(public) ident(IRubyObject) ident(getInstanceVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#fastGetInstanceVariable */) directive(public) ident(IRubyObject) ident(fastGetInstanceVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** rb_iv_set / rb_ivar_set * * @see org.jruby.runtime.builtin.InstanceVariables#setInstanceVariable */) directive(public) ident(IRubyObject) ident(setInstanceVariable)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(name)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureInstanceVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#fastSetInstanceVariable */) directive(public) ident(IRubyObject) ident(fastSetInstanceVariable)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(internedName)operator(\)) operator(&&) ident(value) operator(!=) pre_constant(null)operator(;) ident(ensureInstanceVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#removeInstanceVariable */) directive(public) ident(IRubyObject) ident(removeInstanceVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(name)operator(\))operator(;) ident(ensureInstanceVariablesSettable)operator(()operator(\))operator(;) keyword(return) ident(variableTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#getInstanceVariableList */) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getInstanceVariableList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(list)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InstanceVariables#getInstanceVariableNameList */) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(getInstanceVariableNameList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)pre_type(String)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isInstanceVariable)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(/** * The error message used when some one tries to modify an * instance variable in a high security setting. */) directive(protected) directive(static) directive(final) pre_type(String) ident(ERR_INSECURE_SET_INST_VAR) operator(=) stringoperator(;) comment(/** * Checks if the name parameter represents a legal instance variable name, and otherwise throws a Ruby NameError */) directive(protected) pre_type(String) ident(validateInstanceVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(if) operator(()ident(IdUtil)operator(.)ident(isValidInstanceVariableName)operator(()ident(name)operator(\))operator(\)) keyword(return) ident(name)operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) comment(/** * Makes sure that instance variables can be set on this object, * including information about whether this object is frozen, or * tainted. Will throw a suitable exception in that case. */) directive(protected) type(void) ident(ensureInstanceVariablesSettable)operator(()operator(\)) operator({) keyword(if) operator(()operator(!)ident(isFrozen)operator(()operator(\)) operator(&&) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(<) integer(4) operator(||) ident(isTaint)operator(()operator(\))operator(\))operator(\)) operator({) keyword(return)operator(;) operator(}) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4) operator(&&) operator(!)ident(isTaint)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()ident(ERR_INSECURE_SET_INST_VAR)operator(\))operator(;) operator(}) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()local_variable(this) keyword(instanceof) ident(RubyModule)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) comment(//) comment(// INTERNAL VARIABLE METHODS) comment(//) comment(/** * Dummy method to avoid a cast, and to avoid polluting the * IRubyObject interface with all the instance variable management * methods. */) directive(public) ident(InternalVariables) ident(getInternalVariables)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#hasInternalVariable */) directive(public) type(boolean) ident(hasInternalVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableContains)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#fastHasInternalVariable */) directive(public) type(boolean) ident(fastHasInternalVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastContains)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#getInternalVariable */) directive(public) ident(IRubyObject) ident(getInternalVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableFetch)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#fastGetInternalVariable */) directive(public) ident(IRubyObject) ident(fastGetInternalVariable)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(internedName)operator(\))operator(;) keyword(return) ident(variableTableFastFetch)operator(()ident(internedName)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#setInternalVariable */) directive(public) type(void) ident(setInternalVariable)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(name)operator(\))operator(;) ident(variableTableStore)operator(()ident(name)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#fastSetInternalVariable */) directive(public) type(void) ident(fastSetInternalVariable)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(internedName)operator(\))operator(;) ident(variableTableFastStore)operator(()ident(internedName)operator(,) ident(value)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#removeInternalVariable */) directive(public) ident(IRubyObject) ident(removeInternalVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(assert) operator(!)ident(isRubyVariable)operator(()ident(name)operator(\))operator(;) keyword(return) ident(variableTableRemove)operator(()ident(name)operator(\))operator(;) operator(}) comment(/** * Sync one variable table with another - this is used to make * rbClone work correctly. */) directive(public) type(void) ident(syncVariables)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(variables)operator(\)) operator({) ident(variableTableSync)operator(()ident(variables)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.builtin.InternalVariables#getInternalVariableList */) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getInternalVariableList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()operator(!)ident(isRubyVariable)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(list)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(//) comment(// COMMON VARIABLE METHODS) comment(//) comment(/** * Returns true if object has any variables, defined as: *
    *
  • instance variables *
  • class variables *
  • constants *
  • internal variables, such as those used when marshaling Ranges and Exceptions *
* @return true if object has any variables, else false */) directive(public) type(boolean) ident(hasVariables)operator(()operator(\)) operator({) keyword(return) ident(variableTableGetSize)operator(()operator(\)) operator(>) integer(0)operator(;) operator(}) comment(/** * Returns the amount of instance variables, class variables, * constants and internal variables this object has. */) directive(public) type(int) ident(getVariableCount)operator(()operator(\)) operator({) keyword(return) ident(variableTableGetSize)operator(()operator(\))operator(;) operator(}) comment(/** * Gets a list of all variables in this object. */) comment(// TODO: must override in RubyModule to pick up constants) directive(public) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(getVariableList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>)operator(()operator(\))operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(list)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(/** * Gets a name list of all variables in this object. */) comment(// TODO: must override in RubyModule to pick up constants) directive(public) pre_type(List)operator(<)pre_type(String)operator(>) ident(getVariableNameList)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table) operator(=) ident(variableTableGetTable)operator(()operator(\))operator(;) pre_type(ArrayList)operator(<)pre_type(String)operator(>) ident(list) operator(=) keyword(new) pre_type(ArrayList)operator(<)pre_type(String)operator(>)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(list)operator(.)ident(add)operator(()ident(e)operator(.)ident(name)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(list)operator(;) operator(}) comment(/** * Gets internal access to the getmap for variables. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@Deprecated) comment(// born deprecated) directive(public) pre_type(Map) ident(getVariableMap)operator(()operator(\)) operator({) keyword(return) ident(variableTableGetMap)operator(()operator(\))operator(;) operator(}) comment(/** * Check the syntax of a Ruby variable, including that it's longer * than zero characters, and starts with either an @ or a capital * letter. */) comment(// FIXME: this should go somewhere more generic -- maybe IdUtil) directive(protected) directive(static) directive(final) type(boolean) ident(isRubyVariable)operator(()pre_type(String) ident(name)operator(\)) operator({) type(char) ident(c)operator(;) keyword(return) ident(name)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) operator(()operator(()ident(c) operator(=) ident(name)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\)) operator(==) string operator(||) operator(()ident(c) operator(<=) string operator(&&) ident(c) operator(>=) stringoperator(\))operator(\))operator(;) operator(}) comment(//) comment(// VARIABLE TABLE METHODS, ETC.) comment(//) directive(protected) directive(static) directive(final) type(int) ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(=) integer(8)operator(;) comment(// MUST be power of 2!) directive(protected) directive(static) directive(final) type(int) ident(VARIABLE_TABLE_MAXIMUM_CAPACITY) operator(=) integer(1) operator(<)operator(<) integer(30)operator(;) directive(protected) directive(static) directive(final) type(float) ident(VARIABLE_TABLE_LOAD_FACTOR) operator(=) float(0.75f)operator(;) directive(protected) directive(static) directive(final) ident(VariableTableEntry)type([]) ident(VARIABLE_TABLE_EMPTY_TABLE) operator(=) keyword(new) ident(VariableTableEntry)operator([)integer(0)operator(])operator(;) comment(/** * Every entry in the variable map is represented by an instance * of this class. */) directive(protected) directive(static) directive(final) type(class) class(VariableTableEntry) operator({) directive(final) type(int) ident(hash)operator(;) directive(final) pre_type(String) ident(name)operator(;) directive(volatile) ident(IRubyObject) ident(value)operator(;) directive(final) ident(VariableTableEntry) ident(next)operator(;) ident(VariableTableEntry)operator(()type(int) ident(hash)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(,) ident(VariableTableEntry) ident(next)operator(\)) operator({) keyword(assert) ident(name) operator(==) ident(name)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(name) operator(+) stringoperator(;) local_variable(this)operator(.)ident(hash) operator(=) ident(hash)operator(;) local_variable(this)operator(.)ident(name) operator(=) ident(name)operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) local_variable(this)operator(.)ident(next) operator(=) ident(next)operator(;) operator(}) operator(}) comment(/** * Reads the value of the specified entry, locked on the current * object. */) directive(protected) directive(synchronized) ident(IRubyObject) ident(variableTableReadLocked)operator(()ident(VariableTableEntry) ident(entry)operator(\)) operator({) keyword(return) ident(entry)operator(.)ident(value)operator(;) operator(}) comment(/** * Checks if the variable table contains a variable of the * specified name. */) directive(protected) type(boolean) ident(variableTableContains)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Checks if the variable table contains the the variable of the * specified name, where the precondition is that the name must be * an interned Java String. */) directive(protected) type(boolean) ident(variableTableFastContains)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(VariableTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(internedName)operator(.)ident(hashCode)operator(()operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** * Fetch an object from the variable table based on the name. * * @return the object or null if not found */) directive(protected) ident(IRubyObject) ident(variableTableFetch)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(readValue)operator(;) keyword(return) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** * Fetch an object from the variable table based on the name, * where the name must be an interned Java String. * * @return the object or null if not found */) directive(protected) ident(IRubyObject) ident(variableTableFastFetch)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(internedName)operator(.)ident(hashCode)operator(()operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(readValue)operator(;) keyword(return) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** * Store a value in the variable store under the specific name. */) directive(protected) ident(IRubyObject) ident(variableTableStore)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(table) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(,) pre_constant(null)operator(\))operator(;) ident(table)operator([)ident(hash) operator(&) operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(-) integer(1)operator(\))operator(]) operator(=) ident(e)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTableSize) operator(=) integer(1)operator(;) ident(variableTable) operator(=) ident(table)operator(;) keyword(return) ident(value)operator(;) operator(}) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(variableTableSize) operator(+) integer(1)operator(\)) operator(>) ident(variableTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(variableTableRehash)operator(()operator(\))operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(e)operator(.)ident(value) operator(=) ident(value)operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(name)operator(.)ident(intern)operator(()operator(\))operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) ident(e)operator(;) ident(variableTableSize) operator(=) ident(potentialNewSize)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** * Will store the value under the specified name, where the name * needs to be an interned Java String. */) directive(protected) ident(IRubyObject) ident(variableTableFastStore)operator(()pre_type(String) ident(internedName)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) type(int) ident(hash) operator(=) ident(internedName)operator(.)ident(hashCode)operator(()operator(\))operator(;) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(==) pre_constant(null)operator(\)) operator({) ident(table) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(value)operator(,) pre_constant(null)operator(\))operator(;) ident(table)operator([)ident(hash) operator(&) operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(-) integer(1)operator(\))operator(]) operator(=) ident(e)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTableSize) operator(=) integer(1)operator(;) ident(variableTable) operator(=) ident(table)operator(;) keyword(return) ident(value)operator(;) operator(}) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(variableTableSize) operator(+) integer(1)operator(\)) operator(>) ident(variableTableThreshold)operator(\)) operator({) ident(table) operator(=) ident(variableTableRehash)operator(()operator(\))operator(;) operator(}) type(int) ident(index)operator(;) keyword(for) operator(()ident(e) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) ident(e)operator(.)ident(value) operator(=) ident(value)operator(;) keyword(return) ident(value)operator(;) operator(}) operator(}) ident(e) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(value)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) ident(e)operator(;) ident(variableTableSize) operator(=) ident(potentialNewSize)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile) operator(}) keyword(return) ident(value)operator(;) operator(}) comment(/** * Removes the entry with the specified name from the variable * table, and returning the removed value. */) directive(protected) ident(IRubyObject) ident(variableTableRemove)operator(()pre_type(String) ident(name)operator(\)) operator({) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) type(int) ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(;) ident(VariableTableEntry) ident(first) operator(=) ident(table)operator([)ident(index)operator(])operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(for) operator(()ident(e) operator(=) ident(first)operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) ident(IRubyObject) ident(oldValue) operator(=) ident(e)operator(.)ident(value)operator(;) comment(// All entries following removed node can stay) comment(// in list, but all preceding ones need to be) comment(// cloned.) ident(VariableTableEntry) ident(newFirst) operator(=) ident(e)operator(.)ident(next)operator(;) keyword(for) operator(()ident(VariableTableEntry) ident(p) operator(=) ident(first)operator(;) ident(p) operator(!=) ident(e)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) ident(newFirst) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(value)operator(,) ident(newFirst)operator(\))operator(;) operator(}) ident(table)operator([)ident(index)operator(]) operator(=) ident(newFirst)operator(;) ident(variableTableSize)operator(--)operator(;) ident(variableTable) operator(=) ident(table)operator(;) comment(// write-volatile ) keyword(return) ident(oldValue)operator(;) operator(}) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** * Get the actual table used to save variable entries. */) directive(protected) ident(VariableTableEntry)type([]) ident(variableTableGetTable)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(table)operator(;) operator(}) keyword(return) ident(VARIABLE_TABLE_EMPTY_TABLE)operator(;) operator(}) comment(/** * Get the size of the variable table. */) directive(protected) type(int) ident(variableTableGetSize)operator(()operator(\)) operator({) keyword(if) operator(()ident(variableTable) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(variableTableSize)operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) comment(/** * Synchronize the variable table with the argument. In real terms * this means copy all entries into a newly allocated table. */) directive(protected) type(void) ident(variableTableSync)operator(()pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(vars)operator(\)) operator({) directive(synchronized)operator(()local_variable(this)operator(\)) operator({) ident(variableTableSize) operator(=) integer(0)operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(VARIABLE_TABLE_DEFAULT_CAPACITY) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) ident(variableTable) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(VARIABLE_TABLE_DEFAULT_CAPACITY)operator(])operator(;) keyword(for) operator(()ident(Variable)operator(<)ident(IRubyObject)operator(>) ident(var) operator(:) ident(vars)operator(\)) operator({) ident(variableTableStore)operator(()ident(var)operator(.)ident(getName)operator(()operator(\))operator(,) ident(var)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) comment(/** * Rehashes the variable table. Must be called from a synchronized * block. */) comment(// MUST be called from synchronized/locked block!) comment(// should only be called by variableTableStore/variableTableFastStore) directive(protected) directive(final) ident(VariableTableEntry)type([]) ident(variableTableRehash)operator(()operator(\)) operator({) ident(VariableTableEntry)type([]) ident(oldTable) operator(=) ident(variableTable)operator(;) type(int) ident(oldCapacity)operator(;) keyword(if) operator(()operator(()ident(oldCapacity) operator(=) ident(oldTable)operator(.)ident(length)operator(\)) operator(>=) ident(VARIABLE_TABLE_MAXIMUM_CAPACITY)operator(\)) operator({) keyword(return) ident(oldTable)operator(;) operator(}) type(int) ident(newCapacity) operator(=) ident(oldCapacity) operator(<)operator(<) integer(1)operator(;) ident(VariableTableEntry)type([]) ident(newTable) operator(=) keyword(new) ident(VariableTableEntry)operator([)ident(newCapacity)operator(])operator(;) ident(variableTableThreshold) operator(=) operator(()type(int)operator(\))operator(()ident(newCapacity) operator(*) ident(VARIABLE_TABLE_LOAD_FACTOR)operator(\))operator(;) type(int) ident(sizeMask) operator(=) ident(newCapacity) operator(-) integer(1)operator(;) ident(VariableTableEntry) ident(e)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(oldCapacity)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) comment(// We need to guarantee that any existing reads of old Map can) comment(// proceed. So we cannot yet null out each bin.) ident(e) operator(=) ident(oldTable)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(e) operator(!=) pre_constant(null)operator(\)) operator({) ident(VariableTableEntry) ident(next) operator(=) ident(e)operator(.)ident(next)operator(;) type(int) ident(idx) operator(=) ident(e)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) comment(// Single node on list) keyword(if) operator(()ident(next) operator(==) pre_constant(null)operator(\)) ident(newTable)operator([)ident(idx)operator(]) operator(=) ident(e)operator(;) keyword(else) operator({) comment(// Reuse trailing consecutive sequence at same slot) ident(VariableTableEntry) ident(lastRun) operator(=) ident(e)operator(;) type(int) ident(lastIdx) operator(=) ident(idx)operator(;) keyword(for) operator(()ident(VariableTableEntry) ident(last) operator(=) ident(next)operator(;) ident(last) operator(!=) pre_constant(null)operator(;) ident(last) operator(=) ident(last)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(last)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) keyword(if) operator(()ident(k) operator(!=) ident(lastIdx)operator(\)) operator({) ident(lastIdx) operator(=) ident(k)operator(;) ident(lastRun) operator(=) ident(last)operator(;) operator(}) operator(}) ident(newTable)operator([)ident(lastIdx)operator(]) operator(=) ident(lastRun)operator(;) comment(// Clone all remaining nodes) keyword(for) operator(()ident(VariableTableEntry) ident(p) operator(=) ident(e)operator(;) ident(p) operator(!=) ident(lastRun)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(p)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) ident(VariableTableEntry) ident(m) operator(=) keyword(new) ident(VariableTableEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(value)operator(,) ident(newTable)operator([)ident(k)operator(])operator(\))operator(;) ident(newTable)operator([)ident(k)operator(]) operator(=) ident(m)operator(;) operator(}) operator(}) operator(}) operator(}) ident(variableTable) operator(=) ident(newTable)operator(;) keyword(return) ident(newTable)operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) directive(protected) pre_type(Map) ident(variableTableGetMap)operator(()operator(\)) operator({) pre_type(HashMap) ident(map) operator(=) keyword(new) pre_type(HashMap)operator(()operator(\))operator(;) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(map)operator(.)ident(put)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(map)operator(;) operator(}) comment(/** * Method to help ease transition to new variables implementation. * Will likely be deprecated in the near future. */) annotation(@SuppressWarnings)operator(()stringoperator(\)) directive(protected) pre_type(Map) ident(variableTableGetMap)operator(()pre_type(Map) ident(map)operator(\)) operator({) ident(VariableTableEntry)type([]) ident(table)operator(;) ident(IRubyObject) ident(readValue)operator(;) keyword(if) operator(()operator(()ident(table) operator(=) ident(variableTable)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(VariableTableEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()operator(()ident(readValue) operator(=) ident(e)operator(.)ident(value)operator(\)) operator(==) pre_constant(null)operator(\)) ident(readValue) operator(=) ident(variableTableReadLocked)operator(()ident(e)operator(\))operator(;) ident(map)operator(.)ident(put)operator(()ident(e)operator(.)ident(name)operator(,) ident(readValue)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(return) ident(map)operator(;) operator(}) comment(/** * Tries to support Java serialization of Ruby objects. This is * still experimental and might not work. */) comment(// NOTE: Serialization is primarily supported for testing purposes, and there is no general) comment(// guarantee that serialization will work correctly. Specifically, instance variables pointing) comment(// at symbols, threads, modules, classes, and other unserializable types are not detected.) directive(private) type(void) ident(writeObject)operator(()pre_type(ObjectOutputStream) ident(out)operator(\)) directive(throws) exception(IOException) operator({) ident(out)operator(.)ident(defaultWriteObject)operator(()operator(\))operator(;) comment(// write out ivar count followed by name/value pairs) pre_type(List)operator(<)pre_type(String)operator(>) ident(names) operator(=) ident(getInstanceVariableNameList)operator(()operator(\))operator(;) ident(out)operator(.)ident(writeInt)operator(()ident(names)operator(.)ident(size)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()pre_type(String) ident(name) operator(:) ident(names)operator(\)) operator({) ident(out)operator(.)ident(writeObject)operator(()ident(name)operator(\))operator(;) ident(out)operator(.)ident(writeObject)operator(()ident(getInstanceVariables)operator(()operator(\))operator(.)ident(getInstanceVariable)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** * Tries to support Java unserialization of Ruby objects. This is * still experimental and might not work. */) directive(private) type(void) ident(readObject)operator(()pre_type(ObjectInputStream) ident(in)operator(\)) directive(throws) exception(IOException)operator(,) exception(ClassNotFoundException) operator({) ident(in)operator(.)ident(defaultReadObject)operator(()operator(\))operator(;) comment(// rest in ivar count followed by name/value pairs) type(int) ident(ivarCount) operator(=) ident(in)operator(.)ident(readInt)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(ivarCount)operator(;) ident(i)operator(++)operator(\)) operator({) ident(setInstanceVariable)operator(()operator(()pre_type(String)operator(\))ident(in)operator(.)ident(readObject)operator(()operator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(in)operator(.)ident(readObject)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * * @author nicksieger */) directive(public) type(interface) class(RubyObjectAdapter) operator({) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(value)operator(,) ident(RubyModule) ident(rubyModule)operator(\))operator(;) ident(IRubyObject) ident(setInstanceVariable)operator(()ident(IRubyObject) ident(obj)operator(,) pre_type(String) ident(variableName)operator(,) ident(IRubyObject) ident(value)operator(\))operator(;) ident(IRubyObject)type([]) ident(convertToJavaArray)operator(()ident(IRubyObject) ident(array)operator(\))operator(;) ident(RubyInteger) ident(convertToRubyInteger)operator(()ident(IRubyObject) ident(obj)operator(\))operator(;) ident(IRubyObject) ident(getInstanceVariable)operator(()ident(IRubyObject) ident(obj)operator(,) pre_type(String) ident(variableName)operator(\))operator(;) ident(RubyString) ident(convertToRubyString)operator(()ident(IRubyObject) ident(obj)operator(\))operator(;) comment(// These call* assume ThreadContext = receiver.getRuntime(\).getCurrentContext(\)) ident(IRubyObject) ident(callMethod)operator(()ident(IRubyObject) ident(receiver)operator(,) pre_type(String) ident(methodName)operator(\))operator(;) ident(IRubyObject) ident(callMethod)operator(()ident(IRubyObject) ident(receiver)operator(,) pre_type(String) ident(methodName)operator(,) ident(IRubyObject) ident(singleArg)operator(\))operator(;) ident(IRubyObject) ident(callMethod)operator(()ident(IRubyObject) ident(receiver)operator(,) pre_type(String) ident(methodName)operator(,) ident(IRubyObject)type([]) ident(args)operator(\))operator(;) ident(IRubyObject) ident(callMethod)operator(()ident(IRubyObject) ident(receiver)operator(,) pre_type(String) ident(methodName)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\))operator(;) ident(IRubyObject) ident(callSuper)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject)type([]) ident(args)operator(\))operator(;) ident(IRubyObject) ident(callSuper)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\))operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyObjectSpace) operator({) comment(/** Create the ObjectSpace module and add it to the Ruby runtime. * */) directive(public) directive(static) ident(RubyModule) ident(createObjectSpaceModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(objectSpaceModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setObjectSpaceModule)operator(()ident(objectSpaceModule)operator(\))operator(;) ident(objectSpaceModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyObjectSpace)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(objectSpaceModule)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(define_finalizer)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(finalizer) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2)operator(\)) operator({) ident(finalizer) operator(=) ident(args)operator([)integer(1)operator(])operator(;) keyword(if) operator(()operator(!)ident(finalizer)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(finalizer)operator(.)ident(getType)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(finalizer) operator(=) ident(runtime)operator(.)ident(newProc)operator(()ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(,) ident(block)operator(\))operator(;) operator(}) ident(IRubyObject) ident(obj) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(runtime)operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(addFinalizer)operator(()ident(obj)operator(,) ident(finalizer)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(newFixnum)operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\))operator(\))operator(,) ident(finalizer)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(undefine_finalizer)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(removeFinalizers)operator(()ident(RubyNumeric)operator(.)ident(fix2long)operator(()ident(arg1)operator(.)ident(id)operator(()operator(\))operator(\))operator(\))operator(;) keyword(return) ident(recv)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(id2ref)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(id)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(id)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(id) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(id)operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFixnum)operator(()operator(\))operator(\))operator(;) operator(}) ident(RubyFixnum) ident(idFixnum) operator(=) operator(()ident(RubyFixnum)operator(\)) ident(id)operator(;) type(long) ident(longId) operator(=) ident(idFixnum)operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(longId) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(longId) operator(==) integer(2)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(longId) operator(==) integer(4)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(longId) operator(%) integer(2) operator(!=) integer(0)operator(\)) operator({) comment(// odd) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()operator(()ident(longId) operator(-) integer(1)operator(\)) operator(/) integer(2)operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(object) operator(=) ident(runtime)operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(id2ref)operator(()ident(longId)operator(\))operator(;) keyword(if) operator(()ident(object) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(object)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_object)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyModule) ident(rubyClass)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(rubyClass) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getObject)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyModule)operator(\))operator(\)) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) ident(rubyClass) operator(=) operator(()ident(RubyModule)operator(\)) ident(args)operator([)integer(0)operator(])operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(count) operator(=) integer(0)operator(;) keyword(if) operator(()ident(rubyClass) operator(!=) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)ident(runtime)operator(.)ident(isObjectSpaceEnabled)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newRuntimeError)operator(()stringoperator(\))operator(;) operator(}) pre_type(Iterator) ident(iter) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getObjectSpace)operator(()operator(\))operator(.)ident(iterator)operator(()ident(rubyClass)operator(\))operator(;) ident(IRubyObject) ident(obj) operator(=) pre_constant(null)operator(;) keyword(while) operator(()operator(()ident(obj) operator(=) operator(()ident(IRubyObject)operator(\))ident(iter)operator(.)ident(next)operator(()operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(count)operator(++)operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) pre_type(Iterator) ident(iter) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(subclasses)operator(()pre_constant(true)operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) keyword(while) operator(()ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(\)) operator({) ident(count)operator(++)operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) operator(()ident(IRubyObject)operator(\))ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(count)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(garbage_collect)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(RubyGC)operator(.)ident(start)operator(()ident(recv)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.callback.Callback)operator(;) comment(/** * * @author jpetersen */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyPrecision) operator({) directive(public) directive(static) ident(RubyModule) ident(createPrecisionModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(precisionModule) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setPrecision)operator(()ident(precisionModule)operator(\))operator(;) ident(precisionModule)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyPrecision)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(precisionModule)operator(;) operator(}) directive(public) directive(static) ident(IRubyObject) ident(induced_from)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject) ident(source)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(throw) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(source)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) operator(()operator(()ident(RubyClass)operator(\))ident(receiver)operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(append_features)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject) ident(include)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(include) keyword(instanceof) ident(RubyModule)operator(\)) operator({) operator(()operator(()ident(RubyModule)operator(\)) ident(include)operator(\))operator(.)ident(includeModule)operator(()ident(receiver)operator(\))operator(;) ident(include)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) ident(RubyPrecision)operator(.)ident(induced_from)operator(()ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(ONE_ARGUMENT)operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(return) ident(receiver)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(prec)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject) ident(type)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(type)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(receiver)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(prec_i)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(receiver)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getInteger)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(receiver)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(prec_f)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(receiver)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFloat)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(receiver)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2005 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * Copyright (C\) 2007 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.reflect.InvocationHandler)operator(;) keyword(import) include(java.lang.reflect.Method)operator(;) keyword(import) include(java.lang.reflect.Proxy)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.exceptions.JumpException)operator(;) keyword(import) include(org.jruby.internal.runtime.JumpTarget)operator(;) keyword(import) include(org.jruby.java.MiniJava)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyProc) directive(extends) ident(RubyObject) directive(implements) ident(JumpTarget) operator({) directive(private) ident(Block) ident(block) operator(=) ident(Block)operator(.)ident(NULL_BLOCK)operator(;) directive(private) ident(Block)operator(.)ident(Type) ident(type)operator(;) directive(private) pre_type(String) ident(file)operator(;) directive(private) type(int) ident(line)operator(;) directive(public) ident(RubyProc)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) ident(Block)operator(.)ident(Type) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) local_variable(this)operator(.)ident(type) operator(=) ident(type)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(PROC_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyProc) ident(instance) operator(=) ident(RubyProc)operator(.)ident(newProc)operator(()ident(runtime)operator(,) ident(Block)operator(.)ident(Type)operator(.)ident(PROC)operator(\))operator(;) ident(instance)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createProcClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(procClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(PROC_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setProc)operator(()ident(procClass)operator(\))operator(;) ident(procClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyProc)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(procClass)operator(;) operator(}) directive(public) ident(Block) ident(getBlock)operator(()operator(\)) operator({) keyword(return) ident(block)operator(;) operator(}) comment(// Proc class) directive(public) directive(static) ident(RubyProc) ident(newProc)operator(()ident(Ruby) ident(runtime)operator(,) ident(Block)operator(.)ident(Type) ident(type)operator(\)) operator({) keyword(return) keyword(new) ident(RubyProc)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getProc)operator(()operator(\))operator(,) ident(type)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyProc) ident(newProc)operator(()ident(Ruby) ident(runtime)operator(,) ident(Block) ident(block)operator(,) ident(Block)operator(.)ident(Type) ident(type)operator(\)) operator({) ident(RubyProc) ident(proc) operator(=) keyword(new) ident(RubyProc)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getProc)operator(()operator(\))operator(,) ident(type)operator(\))operator(;) ident(proc)operator(.)ident(callInit)operator(()ident(NULL_ARRAY)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(proc)operator(;) operator(}) comment(/** * Create a new instance of a Proc object. We override this method (from RubyClass\) * since we need to deal with special case of Proc.new with no arguments or block arg. In * this case, we need to check previous frame for a block to consume. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) comment(// No passed in block, lets check next outer frame for one ('Proc.new'\)) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(block) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(getBlock)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\)) operator(&&) ident(block)operator(.)ident(getProcObject)operator(()operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(block)operator(.)ident(getProcObject)operator(()operator(\))operator(;) operator(}) ident(IRubyObject) ident(obj) operator(=) operator(()operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(.)ident(allocate)operator(()operator(\))operator(;) ident(obj)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(procBlock)operator(\)) operator({) keyword(if) operator(()operator(!)ident(procBlock)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(type) operator(==) ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA) operator(&&) ident(procBlock) operator(==) pre_constant(null)operator(\)) operator({) comment(// TODO: warn "tried to create Proc object without a block") operator(}) ident(block) operator(=) ident(procBlock)operator(.)ident(cloneBlock)operator(()operator(\))operator(;) ident(block)operator(.)ident(type) operator(=) ident(type)operator(;) ident(block)operator(.)ident(setProcObject)operator(()local_variable(this)operator(\))operator(;) ident(file) operator(=) ident(context)operator(.)ident(getFile)operator(()operator(\))operator(;) ident(line) operator(=) ident(context)operator(.)ident(getLine)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rbClone)operator(()operator(\)) operator({) ident(RubyProc) ident(newProc) operator(=) keyword(new) ident(RubyProc)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getProc)operator(()operator(\))operator(,) ident(type)operator(\))operator(;) ident(newProc)operator(.)ident(block) operator(=) ident(getBlock)operator(()operator(\))operator(;) ident(newProc)operator(.)ident(file) operator(=) ident(file)operator(;) ident(newProc)operator(.)ident(line) operator(=) ident(line)operator(;) comment(// TODO: CLONE_SETUP here) keyword(return) ident(newProc)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(dup)operator(()operator(\)) operator({) ident(RubyProc) ident(newProc) operator(=) keyword(new) ident(RubyProc)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getProc)operator(()operator(\))operator(,) ident(type)operator(\))operator(;) ident(newProc)operator(.)ident(block) operator(=) ident(getBlock)operator(()operator(\))operator(;) ident(newProc)operator(.)ident(file) operator(=) ident(file)operator(;) ident(newProc)operator(.)ident(line) operator(=) ident(line)operator(;) keyword(return) ident(newProc)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyProc)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(other) operator(||) local_variable(this)operator(.)ident(block) operator(==) operator(()operator(()ident(RubyProc)operator(\))ident(other)operator(\))operator(.)ident(block)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) string operator(+) pre_type(Integer)operator(.)ident(toString)operator(()ident(block)operator(.)ident(hashCode)operator(()operator(\))operator(,) integer(16)operator(\)) operator(+) string operator(+) ident(file) operator(+) string operator(+) operator(()ident(line) operator(+) integer(1)operator(\)) operator(+) string)delimiter(")>operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(binding)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBinding)operator(()ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(call)operator(()ident(context)operator(,) ident(args)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) keyword(assert) ident(args) operator(!=) pre_constant(null)operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(Block) ident(newBlock) operator(=) ident(block)operator(.)ident(cloneBlock)operator(()operator(\))operator(;) ident(JumpTarget) ident(jumpTarget) operator(=) ident(newBlock)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(getFrame)operator(()operator(\))operator(.)ident(getJumpTarget)operator(()operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(self) operator(!=) pre_constant(null)operator(\)) ident(newBlock)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setSelf)operator(()ident(self)operator(\))operator(;) keyword(return) ident(newBlock)operator(.)ident(call)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(BreakJump) ident(bj)operator(\)) operator({) keyword(switch)operator(()ident(block)operator(.)ident(type)operator(\)) operator({) keyword(case) ident(LAMBDA)operator(:) keyword(if) operator(()ident(bj)operator(.)ident(getTarget)operator(()operator(\)) operator(==) ident(jumpTarget)operator(\)) operator({) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(runtime)operator(.)ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) keyword(case) ident(PROC)operator(:) keyword(if) operator(()ident(newBlock)operator(.)ident(isEscaped)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(bj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(bj)operator(;) operator(}) keyword(default)operator(:) keyword(throw) ident(bj)operator(;) operator(}) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(ReturnJump) ident(rj)operator(\)) operator({) pre_type(Object) ident(target) operator(=) ident(rj)operator(.)ident(getTarget)operator(()operator(\))operator(;) keyword(if) operator(()ident(target) operator(==) ident(jumpTarget) operator(&&) ident(block)operator(.)ident(type) operator(==) ident(Block)operator(.)ident(Type)operator(.)ident(LAMBDA)operator(\)) keyword(return) operator(()ident(IRubyObject)operator(\)) ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(type) operator(==) ident(Block)operator(.)ident(Type)operator(.)ident(THREAD)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(throw) ident(rj)operator(;) operator(}) keyword(catch) operator(()ident(JumpException)operator(.)ident(RetryJump) ident(rj)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newLocalJumpError)operator(()stringoperator(,) operator(()ident(IRubyObject)operator(\))ident(rj)operator(.)ident(getValue)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(arity)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(block)operator(.)ident(arity)operator(()operator(\))operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyProc) ident(to_proc)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(public) ident(IRubyObject) ident(as)operator(()pre_type(Class) ident(asClass)operator(\)) operator({) directive(final) ident(Ruby) ident(ruby) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(asClass)operator(.)ident(isInterface)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(ruby)operator(.)ident(newTypeError)operator(()ident(asClass)operator(.)ident(getCanonicalName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(MiniJava)operator(.)ident(javaToRuby)operator(()ident(ruby)operator(,) pre_type(Proxy)operator(.)ident(newProxyInstance)operator(()ident(Ruby)operator(.)ident(getClassLoader)operator(()operator(\))operator(,) keyword(new) pre_type(Class)type([]) operator({)ident(asClass)operator(})operator(,) keyword(new) pre_type(InvocationHandler)operator(()operator(\)) operator({) directive(public) pre_type(Object) ident(invoke)operator(()pre_type(Object) ident(proxy)operator(,) pre_type(Method) ident(method)operator(,) pre_type(Object)type([]) ident(args)operator(\)) directive(throws) pre_type(Throwable) operator({) ident(IRubyObject)type([]) ident(rubyArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(args)operator(.)ident(length) operator(+) integer(1)operator(])operator(;) ident(rubyArgs)operator([)integer(0)operator(]) operator(=) ident(RubySymbol)operator(.)ident(newSymbol)operator(()ident(ruby)operator(,) ident(method)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(rubyArgs)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(rubyArgs)operator([)ident(i)operator(]) operator(=) ident(MiniJava)operator(.)ident(javaToRuby)operator(()ident(ruby)operator(,) ident(args)operator([)ident(i) operator(-) integer(1)operator(])operator(\))operator(;) operator(}) keyword(return) ident(MiniJava)operator(.)ident(rubyToJava)operator(()ident(call)operator(()ident(ruby)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(rubyArgs)operator(\))operator(\))operator(;) operator(}) operator(})operator(\))operator(\))operator(;) operator(}) operator(}) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Jan Arne Petersen * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.ext.posix.POSIX)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.BlockCallback)operator(;) keyword(import) include(org.jruby.runtime.CallBlock)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyProcess) operator({) directive(public) directive(static) ident(RubyModule) ident(createProcessModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(process) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setProcess)operator(()ident(process)operator(\))operator(;) comment(// TODO: NOT_ALLOCATABLE_ALLOCATOR is probably ok here. Confirm. JRUBY-415) ident(RubyClass) ident(process_status) operator(=) ident(process)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setProcStatus)operator(()ident(process_status)operator(\))operator(;) ident(RubyModule) ident(process_uid) operator(=) ident(process)operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setProcUID)operator(()ident(process_uid)operator(\))operator(;) ident(RubyModule) ident(process_gid) operator(=) ident(process)operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setProcGID)operator(()ident(process_gid)operator(\))operator(;) ident(RubyModule) ident(process_sys) operator(=) ident(process)operator(.)ident(defineModuleUnder)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(setProcSys)operator(()ident(process_sys)operator(\))operator(;) ident(process)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyProcess)operator(.)ident(class)operator(\))operator(;) ident(process_status)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyStatus)operator(.)ident(class)operator(\))operator(;) ident(process_uid)operator(.)ident(defineAnnotatedMethods)operator(()ident(UserID)operator(.)ident(class)operator(\))operator(;) ident(process_gid)operator(.)ident(defineAnnotatedMethods)operator(()ident(GroupID)operator(.)ident(class)operator(\))operator(;) ident(process_sys)operator(.)ident(defineAnnotatedMethods)operator(()ident(Sys)operator(.)ident(class)operator(\))operator(;) ident(process)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(process)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) ident(process)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\))operator(;) ident(process)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) keyword(return) ident(process)operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(RubyStatus) directive(extends) ident(RubyObject) operator({) directive(private) type(long) ident(status) operator(=) integer(0L)operator(;) directive(private) directive(static) directive(final) type(long) ident(EXIT_SUCCESS) operator(=) integer(0L)operator(;) directive(public) ident(RubyStatus)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(,) type(long) ident(status)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(metaClass)operator(\))operator(;) local_variable(this)operator(.)ident(status) operator(=) ident(status)operator(;) operator(}) directive(public) directive(static) ident(RubyStatus) ident(newProcessStatus)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(status)operator(\)) operator({) keyword(return) keyword(new) ident(RubyStatus)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getProcStatus)operator(()operator(\))operator(,) ident(status)operator(\))operator(;) operator(}) comment(// Bunch of methods still not implemented) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(not_implemented)operator(()operator(\)) operator({) pre_type(String) ident(error) operator(=) string operator(+) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getFrameName)operator(()operator(\)) operator(+) stringoperator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()ident(error)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(not_implemented1)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) pre_type(String) ident(error) operator(=) string operator(+) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getFrameName)operator(()operator(\)) operator(+) stringoperator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()ident(error)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(exitstatus)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(status)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string>)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_rshift)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) type(long) ident(shiftValue) operator(=) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(status) operator(>)operator(>) ident(shiftValue)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EQUALEQUAL)operator(,) stringoperator(,) local_variable(this)operator(.)ident(to_i)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(to_i)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(shiftedValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()pre_type(String)operator(.)ident(valueOf)operator(()ident(shiftedValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) pre_type(String)operator(.)ident(valueOf)operator(()ident(status)operator(\)) operator(+) string)delimiter(")>operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(success_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(status) operator(==) ident(EXIT_SUCCESS)operator(\))operator(;) operator(}) directive(private) type(long) ident(shiftedValue)operator(()operator(\)) operator({) keyword(return) ident(status) operator(<)operator(<) integer(8)operator(;) operator(}) operator(}) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(UserID) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(change_privilege)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(euid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eid)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(euid_set)operator(()ident(self)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(grant_privilege)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(re_exchange)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(switch_rb)operator(()ident(context)operator(,) ident(self)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(re_exchangeable_p)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(uid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sid_available_p)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(switch_rb)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(uid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getuid)operator(()operator(\))operator(;) type(int) ident(euid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(geteuid)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(seteuid)operator(()ident(uid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setuid)operator(()ident(euid)operator(\))operator(;) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(seteuid)operator(()ident(euid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setuid)operator(()ident(uid)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(seteuid)operator(()ident(uid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setuid)operator(()ident(euid)operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(GroupID) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(change_privilege)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(egid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(eid)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(RubyProcess)operator(.)ident(egid_set)operator(()ident(self)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(grant_privilege)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(re_exchange)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(switch_rb)operator(()ident(context)operator(,) ident(self)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(re_exchangeable_p)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(rid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(gid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(sid_available_p)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(switch_rb)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(gid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getgid)operator(()operator(\))operator(;) type(int) ident(egid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getegid)operator(()operator(\))operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setegid)operator(()ident(gid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setgid)operator(()ident(egid)operator(\))operator(;) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setegid)operator(()ident(egid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setgid)operator(()ident(gid)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setegid)operator(()ident(gid)operator(\))operator(;) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setgid)operator(()ident(egid)operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Sys) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getegid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(egid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(geteuid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(euid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getgid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(gid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getuid)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(uid)operator(()ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setegid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(egid_set)operator(()ident(recv)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(seteuid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(euid_set)operator(()ident(recv)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setgid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(gid_set)operator(()ident(recv)operator(,) ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setuid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(uid_set)operator(()ident(recv)operator(,) ident(arg)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(abort)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(abort)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exit_bang)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(exit_bang)operator(()ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(groups)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setrlimit)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpgrp)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpgrp)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(groups_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(waitpid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(pid) operator(=) operator(-)integer(1)operator(;) type(int) ident(flags) operator(=) integer(0)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(pid) operator(=) operator(()type(int)operator(\))ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(flags) operator(=) operator(()type(int)operator(\))ident(args)operator([)integer(1)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) type(int)type([]) ident(status) operator(=) keyword(new) type(int)operator([)integer(1)operator(])operator(;) ident(pid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(waitpid)operator(()ident(pid)operator(,) ident(status)operator(,) ident(flags)operator(\))operator(;) keyword(if) operator(()ident(pid) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoECHILDError)operator(()operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(() stringoperator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(status)operator([)integer(0)operator(])operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(pid)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(wait)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(return) ident(waitpid)operator(()ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) type(int)type([]) ident(status) operator(=) keyword(new) type(int)operator([)integer(1)operator(])operator(;) type(int) ident(pid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(wait)operator(()ident(status)operator(\))operator(;) keyword(if) operator(()ident(pid) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoECHILDError)operator(()operator(\))operator(;) operator(}) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(set)operator(() stringoperator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(status)operator([)integer(0)operator(])operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(pid)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(waitall)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) ident(RubyArray) ident(results) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\))operator(;) type(int)type([]) ident(status) operator(=) keyword(new) type(int)operator([)integer(1)operator(])operator(;) type(int) ident(result) operator(=) ident(posix)operator(.)ident(wait)operator(()ident(status)operator(\))operator(;) keyword(while) operator(()ident(result) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(results)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(newFixnum)operator(()ident(result)operator(\))operator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(status)operator([)integer(0)operator(])operator(\))operator(\))operator(\))operator(;) ident(result) operator(=) ident(posix)operator(.)ident(wait)operator(()ident(status)operator(\))operator(;) operator(}) keyword(return) ident(results)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setsid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setsid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setpgrp)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setpgid)operator(()integer(0)operator(,) integer(0)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(egid_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setegid)operator(()operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(euid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(geteuid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(uid_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setuid)operator(()operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getgid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(maxgroups)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpriority)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) type(int) ident(which) operator(=) operator(()type(int)operator(\))ident(arg1)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(who) operator(=) operator(()type(int)operator(\))ident(arg2)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(result) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpriority)operator(()ident(which)operator(,) ident(who)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(uid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getuid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(waitpid2)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(pid) operator(=) operator(-)integer(1)operator(;) type(int) ident(flags) operator(=) integer(0)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(pid) operator(=) operator(()type(int)operator(\))ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(flags) operator(=) operator(()type(int)operator(\))ident(args)operator([)integer(1)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) type(int)type([]) ident(status) operator(=) keyword(new) type(int)operator([)integer(1)operator(])operator(;) ident(pid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(waitpid)operator(()ident(pid)operator(,) ident(status)operator(,) ident(flags)operator(\))operator(;) keyword(if) operator(()ident(pid) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newErrnoECHILDError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(newFixnum)operator(()ident(pid)operator(\))operator(,) ident(RubyProcess)operator(.)ident(RubyStatus)operator(.)ident(newProcessStatus)operator(()ident(runtime)operator(,) ident(status)operator([)integer(0)operator(])operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(initgroups)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(maxgroups_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(ppid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getppid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(gid_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setgid)operator(()operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(wait2)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(waitpid2)operator(()ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(euid_set)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(seteuid)operator(()operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(3)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setpriority)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(IRubyObject) ident(arg3)operator(\)) operator({) type(int) ident(which) operator(=) operator(()type(int)operator(\))ident(arg1)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(who) operator(=) operator(()type(int)operator(\))ident(arg2)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(prio) operator(=) operator(()type(int)operator(\))ident(arg3)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(result) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setpriority)operator(()ident(which)operator(,) ident(who)operator(,) ident(prio)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(setpgid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) type(int) ident(pid) operator(=) operator(()type(int)operator(\))ident(arg1)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(int) ident(gid) operator(=) operator(()type(int)operator(\))ident(arg2)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(setpgid)operator(()ident(pid)operator(,) ident(gid)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getpgid)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpgid)operator(()operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(getrlimit)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(egid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getegid)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) directive(static) pre_type(String)type([]) ident(signals) operator(=) keyword(new) pre_type(String)type([]) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(;) directive(private) directive(static) type(int) ident(parseSignalString)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(value)operator(\)) operator({) type(int) ident(startIndex) operator(=) integer(0)operator(;) type(boolean) ident(negative) operator(=) ident(value)operator(.)ident(startsWith)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(negative)operator(\)) ident(startIndex)operator(++)operator(;) type(boolean) ident(signalString) operator(=) ident(value)operator(.)ident(startsWith)operator(()stringoperator(,) ident(startIndex)operator(\))operator(;) keyword(if) operator(()ident(signalString)operator(\)) ident(startIndex) operator(+=) integer(3)operator(;) pre_type(String) ident(signalName) operator(=) ident(value)operator(.)ident(substring)operator(()ident(startIndex)operator(\))operator(;) comment(// FIXME: This table will get moved into POSIX library so we can get all actual supported) comment(// signals. This is a quick fix to support basic signals until that happens.) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(signals)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(signals)operator([)ident(i)operator(])operator(.)ident(equals)operator(()ident(signalName)operator(\))operator(\)) keyword(return) ident(negative) operator(?) operator(-)ident(i) operator(:) ident(i)operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(signalName) operator(+) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(kill)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(2)operator(\)) operator({) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(signal)operator(;) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(signal) operator(=) operator(()type(int)operator(\)) operator(()operator(()ident(RubyFixnum)operator(\)) ident(args)operator([)integer(0)operator(])operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) ident(signal) operator(=) ident(parseSignalString)operator(()ident(runtime)operator(,) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(signal) operator(=) ident(parseSignalString)operator(()ident(runtime)operator(,) ident(args)operator([)integer(0)operator(])operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(signal) operator(=) ident(parseSignalString)operator(()ident(runtime)operator(,) ident(args)operator([)integer(0)operator(])operator(.)ident(checkStringType)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) type(boolean) ident(processGroupKill) operator(=) ident(signal) operator(<) integer(0)operator(;) keyword(if) operator(()ident(processGroupKill)operator(\)) ident(signal) operator(=) operator(-)ident(signal)operator(;) ident(POSIX) ident(posix) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) type(int) ident(pid) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(;) comment(// FIXME: It may be possible to killpg on systems which support it. POSIX library) comment(// needs to tell whether a particular method works or not) keyword(if) operator(()ident(pid) operator(==) integer(0)operator(\)) ident(pid) operator(=) ident(runtime)operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpid)operator(()operator(\))operator(;) ident(posix)operator(.)ident(kill)operator(()ident(processGroupKill) operator(?) operator(-)ident(pid) operator(:) ident(pid)operator(,) ident(signal)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(args)operator(.)ident(length) operator(-) integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(detach)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) directive(final) type(int) ident(pid) operator(=) operator(()type(int)operator(\))ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(BlockCallback) ident(callback) operator(=) keyword(new) ident(BlockCallback)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) type(int)type([]) ident(status) operator(=) keyword(new) type(int)operator([)integer(1)operator(])operator(;) type(int) ident(result) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(waitpid)operator(()ident(pid)operator(,) ident(status)operator(,) integer(0)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(result)operator(\))operator(;) operator(}) operator(})operator(;) keyword(return) ident(RubyThread)operator(.)ident(newInstance)operator(() ident(runtime)operator(.)ident(getThread)operator(()operator(\))operator(,) ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(CallBlock)operator(.)ident(newCallClosure)operator(()ident(recv)operator(,) operator(()ident(RubyModule)operator(\))ident(recv)operator(,) ident(Arity)operator(.)ident(NO_ARGUMENTS)operator(,) ident(callback)operator(,) ident(context)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(times)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(double) ident(currentTime) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(/) float(1000.0)operator(;) type(double) ident(startTime) operator(=) ident(runtime)operator(.)ident(getStartTime)operator(()operator(\)) operator(/) float(1000.0)operator(;) ident(RubyFloat) ident(zero) operator(=) ident(runtime)operator(.)ident(newFloat)operator(()float(0.0)operator(\))operator(;) keyword(return) ident(RubyStruct)operator(.)ident(newStruct)operator(()ident(runtime)operator(.)ident(getTmsStruct)operator(()operator(\))operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newFloat)operator(()ident(currentTime) operator(-) ident(startTime)operator(\))operator(,) ident(zero)operator(,) ident(zero)operator(,) ident(zero) operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(pid)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getPosix)operator(()operator(\))operator(.)ident(getpid)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(fork)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(fork)operator(()ident(context)operator(,) ident(recv)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exit)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(RubyKernel)operator(.)ident(exit)operator(()ident(recv)operator(,) ident(args)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001 Ed Sinjiashvili * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * Copyright (C\) 2006 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.BlockCallback)operator(;) keyword(import) include(org.jruby.runtime.CallBlock)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ObjectMarshal)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) keyword(import) include(org.jruby.runtime.component.VariableEntry)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) comment(/** * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyRange) directive(extends) ident(RubyObject) operator({) directive(private) ident(IRubyObject) ident(begin)operator(;) directive(private) ident(IRubyObject) ident(end)operator(;) directive(private) type(boolean) ident(isExclusive)operator(;) directive(public) directive(static) ident(RubyClass) ident(createRangeClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(result) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(RANGE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setRange)operator(()ident(result)operator(\))operator(;) ident(result)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyRange)operator(;) operator(}) operator(})operator(;) ident(result)operator(.)ident(setMarshal)operator(()ident(RANGE_MARSHAL)operator(\))operator(;) ident(result)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) comment(// We override Enumerable#member? since ranges in 1.8.1 are continuous.) comment(// result.defineMethod("member?", callbackFactory.getMethod("include_p", RubyKernel.IRUBY_OBJECT\)\);) comment(// result.defineMethod("===", callbackFactory.getMethod("include_p", RubyKernel.IRUBY_OBJECT\)\);) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyRange)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(static) directive(final) ident(ObjectAllocator) ident(RANGE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyRange)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(private) ident(RubyRange)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(begin) operator(=) ident(end) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyRange) ident(newRange)operator(()ident(Ruby) ident(runtime)operator(,) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(begin)operator(,) ident(IRubyObject) ident(end)operator(,) type(boolean) ident(isExclusive)operator(\)) operator({) ident(RubyRange) ident(range) operator(=) keyword(new) ident(RubyRange)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRange)operator(()operator(\))operator(\))operator(;) ident(range)operator(.)ident(init)operator(()ident(context)operator(,) ident(begin)operator(,) ident(end)operator(,) ident(isExclusive)operator(\))operator(;) keyword(return) ident(range)operator(;) operator(}) directive(public) directive(static) ident(RubyRange) ident(newExclusiveRange)operator(()ident(Ruby) ident(runtime)operator(,) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(begin)operator(,) ident(IRubyObject) ident(end)operator(\)) operator({) ident(RubyRange) ident(range) operator(=) keyword(new) ident(RubyRange)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRange)operator(()operator(\))operator(\))operator(;) ident(range)operator(.)ident(init)operator(()ident(context)operator(,) ident(begin)operator(,) ident(end)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(range)operator(;) operator(}) directive(public) directive(static) ident(RubyRange) ident(newInclusiveRange)operator(()ident(Ruby) ident(runtime)operator(,) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(begin)operator(,) ident(IRubyObject) ident(end)operator(\)) operator({) ident(RubyRange) ident(range) operator(=) keyword(new) ident(RubyRange)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRange)operator(()operator(\))operator(\))operator(;) ident(range)operator(.)ident(init)operator(()ident(context)operator(,) ident(begin)operator(,) ident(end)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) ident(range)operator(;) operator(}) directive(protected) type(void) ident(copySpecialInstanceVariables)operator(()ident(IRubyObject) ident(clone)operator(\)) operator({) ident(RubyRange) ident(range) operator(=) operator(()ident(RubyRange)operator(\))ident(clone)operator(;) ident(range)operator(.)ident(begin) operator(=) ident(begin)operator(;) ident(range)operator(.)ident(end) operator(=) ident(end)operator(;) ident(range)operator(.)ident(isExclusive) operator(=) ident(isExclusive)operator(;) operator(}) directive(final) type(long)type([]) ident(begLen)operator(()type(long) ident(len)operator(,) type(int) ident(err)operator(\))operator({) type(long) ident(beg) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()local_variable(this)operator(.)ident(begin)operator(\))operator(;) type(long) ident(end) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()local_variable(this)operator(.)ident(end)operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(+=) ident(len)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) keyword(if) operator(()ident(err) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()ident(beg) operator(+) string operator(+) operator(()ident(isExclusive) operator(?) string operator(:) stringoperator(\)) operator(+) ident(end) operator(+) stringoperator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) operator(}) keyword(if) operator(()ident(err) operator(==) integer(0) operator(||) ident(err) operator(==) integer(2)operator(\)) operator({) keyword(if) operator(()ident(beg) operator(>) ident(len)operator(\)) operator({) keyword(if) operator(()ident(err) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()ident(beg) operator(+) string operator(+) operator(()ident(isExclusive) operator(?) string operator(:) stringoperator(\)) operator(+) ident(end) operator(+) stringoperator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) keyword(if) operator(()ident(end) operator(>) ident(len)operator(\)) ident(end) operator(=) ident(len)operator(;) operator(}) keyword(if) operator(()ident(end) operator(<) integer(0)operator(\)) ident(end) operator(+=) ident(len)operator(;) keyword(if) operator(()operator(!)ident(isExclusive)operator(\)) ident(end)operator(++)operator(;) ident(len) operator(=) ident(end) operator(-) ident(beg)operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) ident(len) operator(=) integer(0)operator(;) keyword(return) keyword(new) type(long)type([])operator({)ident(beg)operator(,) ident(len)operator(})operator(;) operator(}) directive(private) type(void) ident(init)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(begin)operator(,) ident(IRubyObject) ident(end)operator(,) type(boolean) ident(isExclusive)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(begin) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(end) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) keyword(try) operator({) ident(IRubyObject) ident(result) operator(=) ident(begin)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(end)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(catch) operator(()ident(RaiseException) ident(re)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) local_variable(this)operator(.)ident(begin) operator(=) ident(begin)operator(;) local_variable(this)operator(.)ident(end) operator(=) ident(end)operator(;) local_variable(this)operator(.)ident(isExclusive) operator(=) ident(isExclusive)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(init)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator(.)ident(length) operator(>) integer(2) operator(&&) ident(args)operator([)integer(2)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(first)operator(()operator(\)) operator({) keyword(return) ident(begin)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(last)operator(()operator(\)) operator({) keyword(return) ident(end)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(hash)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) type(long) ident(hash) operator(=) ident(isExclusive) operator(?) integer(1) operator(:) integer(0)operator(;) type(long) ident(h) operator(=) ident(hash)operator(;) type(long) ident(v) operator(=) ident(begin)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(HASH)operator(,) stringoperator(\))operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) ident(hash) operator(^=) ident(v) operator(<)operator(<) integer(1)operator(;) ident(v) operator(=) ident(end)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(HASH)operator(,) stringoperator(\))operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) ident(hash) operator(^=) ident(v) operator(<)operator(<) integer(9)operator(;) ident(hash) operator(^=) ident(h) operator(<)operator(<) integer(24)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(hash)operator(\))operator(;) operator(}) directive(private) directive(static) type(byte)type([]) ident(DOTDOTDOT) operator(=) stringoperator(.)ident(getBytes)operator(()operator(\))operator(;) directive(private) directive(static) type(byte)type([]) ident(DOTDOT) operator(=) stringoperator(.)ident(getBytes)operator(()operator(\))operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(inspect)operator(()ident(context)operator(,) ident(begin)operator(\))operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(str2) operator(=) ident(inspect)operator(()ident(context)operator(,) ident(end)operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(isExclusive) operator(?) ident(DOTDOTDOT) operator(:) ident(DOTDOT)operator(\))operator(;) ident(str)operator(.)ident(concat)operator(()ident(str2)operator(\))operator(;) ident(str)operator(.)ident(infectBy)operator(()ident(str2)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(begin)operator(\))operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(RubyString) ident(str2) operator(=) ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(end)operator(\))operator(;) ident(str)operator(.)ident(cat)operator(()ident(isExclusive) operator(?) ident(DOTDOTDOT) operator(:) ident(DOTDOT)operator(\))operator(;) ident(str)operator(.)ident(concat)operator(()ident(str2)operator(\))operator(;) ident(str)operator(.)ident(infectBy)operator(()ident(str2)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(exclude_end_p)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isExclusive)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyRange)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyRange) ident(otherRange) operator(=) operator(()ident(RubyRange)operator(\)) ident(other)operator(;) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(begin)operator(,) ident(otherRange)operator(.)ident(begin)operator(\)) operator(&&) ident(equalInternal)operator(()ident(context)operator(,) ident(end)operator(,) ident(otherRange)operator(.)ident(end)operator(\)) operator(&&) ident(isExclusive) operator(==) ident(otherRange)operator(.)ident(isExclusive)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyRange)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyRange) ident(otherRange) operator(=) operator(()ident(RubyRange)operator(\))ident(other)operator(;) keyword(if) operator(()ident(eqlInternal)operator(()ident(context)operator(,) ident(begin)operator(,) ident(otherRange)operator(.)ident(begin)operator(\)) operator(&&) ident(eqlInternal)operator(()ident(context)operator(,) ident(end)operator(,) ident(otherRange)operator(.)ident(end)operator(\)) operator(&&) ident(isExclusive) operator(==) ident(otherRange)operator(.)ident(isExclusive)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) directive(abstract) type(class) class(RangeCallBack) operator({) directive(abstract) type(void) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(class) class(StepBlockCallBack) directive(extends) ident(RangeCallBack) directive(implements) ident(BlockCallback) operator({) directive(final) ident(Block) ident(block)operator(;) ident(IRubyObject) ident(iter)operator(;) directive(final) ident(IRubyObject) ident(step)operator(;) ident(StepBlockCallBack)operator(()ident(Block) ident(block)operator(,) ident(IRubyObject) ident(iter)operator(,) ident(IRubyObject) ident(step)operator(\)) operator({) local_variable(this)operator(.)ident(block) operator(=) ident(block)operator(;) local_variable(this)operator(.)ident(iter) operator(=) ident(iter)operator(;) local_variable(this)operator(.)ident(step) operator(=) ident(step)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(originalBlock)operator(\)) operator({) ident(call)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(void) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(iter) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(iter) operator(=) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(iter)operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(-) integer(1)operator(\))operator(;) operator(}) keyword(else) operator({) ident(iter) operator(=) ident(iter)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(iter) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(arg)operator(\))operator(;) ident(iter) operator(=) ident(step)operator(;) operator(}) operator(}) operator(}) directive(private) ident(IRubyObject) ident(rangeLt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(a)operator(,) ident(IRubyObject) ident(b)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(a)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(b)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) pre_constant(null)operator(;) keyword(return) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(a)operator(,) ident(b)operator(\)) operator(<) integer(0) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) pre_constant(null)operator(;) operator(}) directive(private) ident(IRubyObject) ident(rangeLe)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(a)operator(,) ident(IRubyObject) ident(b)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(a)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(b)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) pre_constant(null)operator(;) type(int) ident(c) operator(=) ident(RubyComparable)operator(.)ident(cmpint)operator(()ident(context)operator(,) ident(result)operator(,) ident(a)operator(,) ident(b)operator(\))operator(;) keyword(if) operator(()ident(c) operator(==) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(c) operator(<) integer(0) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) pre_constant(null)operator(;) operator(}) directive(private) type(void) ident(rangeEach)operator(()ident(ThreadContext) ident(context)operator(,) ident(RangeCallBack) ident(callback)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(begin)operator(;) keyword(if) operator(()ident(isExclusive)operator(\)) operator({) keyword(while) operator(()ident(rangeLt)operator(()ident(context)operator(,) ident(v)operator(,) ident(end)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(callback)operator(.)ident(call)operator(()ident(context)operator(,) ident(v)operator(\))operator(;) ident(v) operator(=) ident(v)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(IRubyObject) ident(c)operator(;) keyword(while) operator(()operator(()ident(c) operator(=) ident(rangeLe)operator(()ident(context)operator(,) ident(v)operator(,) ident(end)operator(\))operator(\)) operator(!=) pre_constant(null) operator(&&) ident(c)operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(callback)operator(.)ident(call)operator(()ident(context)operator(,) ident(v)operator(\))operator(;) keyword(if) operator(()ident(c) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\)) keyword(break)operator(;) ident(v) operator(=) ident(v)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) directive(final) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(begin) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(end) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(lim) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(end)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isExclusive)operator(\)) ident(lim)operator(++)operator(;) keyword(for) operator(()type(long) ident(i) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(begin)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) ident(i) operator(<) ident(lim)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(begin) keyword(instanceof) ident(RubyString)operator(\)) operator({) operator(()operator(()ident(RubyString)operator(\)) ident(begin)operator(\))operator(.)ident(upto)operator(()ident(context)operator(,) ident(end)operator(,) ident(isExclusive)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)ident(begin)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(() string operator(+) ident(begin)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) ident(rangeEach)operator(()ident(context)operator(,) keyword(new) ident(RangeCallBack)operator(()operator(\)) operator({) annotation(@Override) type(void) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(arg)operator(\))operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(step)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(IRubyObject) ident(step)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(step) operator(=) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) operator({) ident(step) operator(=) ident(args)operator([)integer(0)operator(])operator(;) operator(}) type(long) ident(unit) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(step)operator(\))operator(;) keyword(if) operator(()ident(unit) operator(<) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(begin) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(end) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) keyword(if) operator(()ident(unit) operator(==) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) type(long) ident(e) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(end)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isExclusive)operator(\)) ident(e)operator(++)operator(;) keyword(for) operator(()type(long) ident(i) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(begin)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) ident(i) operator(<) ident(e)operator(;) ident(i) operator(+=) ident(unit)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(i)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(begin)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(unit) operator(==) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) comment(// rb_iterate((VALUE(*\)_((VALUE\)\)\)str_step, (VALUE\)args, step_i, (VALUE\)iter\);) ident(StepBlockCallBack) ident(callback) operator(=) keyword(new) ident(StepBlockCallBack)operator(()ident(block)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(,) ident(step)operator(\))operator(;) ident(Block) ident(blockCallback) operator(=) ident(CallBlock)operator(.)ident(newCallClosure)operator(()local_variable(this)operator(,) ident(runtime)operator(.)ident(getRange)operator(()operator(\))operator(,) ident(Arity)operator(.)ident(singleArgument)operator(()operator(\))operator(,) ident(callback)operator(,) ident(context)operator(\))operator(;) operator(()operator(()ident(RubyString)operator(\))ident(tmp)operator(\))operator(.)ident(upto)operator(()ident(context)operator(,) ident(end)operator(,) ident(isExclusive)operator(,) ident(blockCallback)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(begin) keyword(instanceof) ident(RubyNumeric)operator(\)) operator({) keyword(if) operator(()ident(equalInternal)operator(()ident(context)operator(,) ident(step)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) directive(final) pre_type(String) ident(method)operator(;) directive(final) type(int) ident(methodIndex)operator(;) keyword(if) operator(()ident(isExclusive)operator(\)) operator({) ident(method) operator(=) stringoperator(;) ident(methodIndex) operator(=) ident(MethodIndex)operator(.)ident(OP_LT)operator(;) operator(}) keyword(else) operator({) ident(method) operator(=) stringoperator(;) ident(methodIndex) operator(=) ident(MethodIndex)operator(.)ident(OP_LE)operator(;) operator(}) ident(IRubyObject) ident(beg) operator(=) ident(begin)operator(;) keyword(while) operator(()ident(beg)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(methodIndex)operator(,) ident(method)operator(,) ident(end)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(beg)operator(\))operator(;) ident(beg) operator(=) ident(beg)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(step)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(unit) operator(==) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(begin)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(() string operator(+) ident(begin)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) comment(// range_each_func(range, step_i, b, e, args\);) ident(rangeEach)operator(()ident(context)operator(,) keyword(new) ident(StepBlockCallBack)operator(()ident(block)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(,) ident(step)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(include_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(rangeLe)operator(()ident(context)operator(,) ident(begin)operator(,) ident(obj)operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(isExclusive)operator(\)) operator({) keyword(if) operator(()ident(rangeLt)operator(()ident(context)operator(,) ident(obj)operator(,) ident(end)operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(rangeLe)operator(()ident(context)operator(,) ident(obj)operator(,) ident(end)operator(\)) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) ident(ObjectMarshal) ident(RANGE_MARSHAL) operator(=) keyword(new) ident(ObjectMarshal)operator(()operator(\)) operator({) directive(public) type(void) ident(marshalTo)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Object) ident(obj)operator(,) ident(RubyClass) ident(type)operator(,) ident(MarshalStream) ident(marshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyRange) ident(range) operator(=) operator(()ident(RubyRange)operator(\))ident(obj)operator(;) ident(marshalStream)operator(.)ident(registerLinkTarget)operator(()ident(range)operator(\))operator(;) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(attrs) operator(=) ident(range)operator(.)ident(getVariableList)operator(()operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(range)operator(.)ident(begin)operator(\))operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(range)operator(.)ident(end)operator(\))operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(range)operator(.)ident(isExclusive) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(\))operator(\))operator(;) ident(marshalStream)operator(.)ident(dumpVariables)operator(()ident(attrs)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(unmarshalFrom)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(,) ident(UnmarshalStream) ident(unmarshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyRange) ident(range) operator(=) operator(()ident(RubyRange)operator(\))ident(type)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(unmarshalStream)operator(.)ident(registerLinkTarget)operator(()ident(range)operator(\))operator(;) ident(unmarshalStream)operator(.)ident(defaultVariablesUnmarshal)operator(()ident(range)operator(\))operator(;) ident(range)operator(.)ident(begin) operator(=) ident(range)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(;) ident(range)operator(.)ident(end) operator(=) ident(range)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(;) ident(range)operator(.)ident(isExclusive) operator(=) ident(range)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) keyword(return) ident(range)operator(;) operator(}) operator(})operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_add)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_cmp)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_div)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_equal_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_expt)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_floor)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_gcd)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_idiv)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_mul)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_negate)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_negative_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_one_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_rshift)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_sub)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_f)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_i)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_r)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_to_s)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_truncate)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_xor)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.f_zero_p)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.i_gcd)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.i_ilog2)operator(;) keyword(import) include(static) include(org.jruby.util.Numeric.ldexp)operator(;) keyword(import) include(org.joni.encoding.specific.ASCIIEncoding)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.Numeric)operator(;) comment(/** * 1.9 rational.c as of revision: 18876 */) annotation(@JRubyClass)operator(()ident(name) operator(=) stringoperator(,) ident(parent) operator(=) stringoperator(,) ident(include) operator(=) stringoperator(\)) directive(public) type(class) class(RubyRational) directive(extends) ident(RubyNumeric) operator({) directive(public) directive(static) ident(RubyClass) ident(createRationalClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(rationalc) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getNumeric)operator(()operator(\))operator(,) ident(RATIONAL_ALLOCATOR)operator(\))operator(;) comment(// because one can Complex.send(:allocate\)) ident(runtime)operator(.)ident(setRational)operator(()ident(rationalc)operator(\))operator(;) ident(rationalc)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(RATIONAL)operator(;) ident(rationalc)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyRational)operator(;) operator(}) operator(})operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(rationalc)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(runtime)operator(.)ident(newSymbol)operator(()stringoperator(\))operator(\))operator(;) ident(rationalc)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyRational)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(rationalc)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(RATIONAL_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyRational)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(})operator(;) comment(/** internal * */) directive(private) ident(RubyRational)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(num)operator(,) ident(IRubyObject) ident(den)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\))ident(clazz)operator(\))operator(;) local_variable(this)operator(.)ident(num) operator(=) ident(num)operator(;) local_variable(this)operator(.)ident(den) operator(=) ident(den)operator(;) operator(}) comment(/** rb_rational_raw * */) directive(static) ident(RubyRational) ident(newRationalRaw)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(x)operator(,) ident(RubyObject) ident(y)operator(\)) operator({) keyword(return) keyword(new) ident(RubyRational)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRational)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** rb_rational_raw1 * */) directive(static) ident(RubyRational) ident(newRationalRaw)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) keyword(new) ident(RubyRational)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRational)operator(()operator(\))operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) comment(/** rb_rational_new1 * */) directive(static) ident(IRubyObject) ident(newRationalCanonicalize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newRationalCanonicalize)operator(()ident(context)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_rational_new * */) directive(private) directive(static) ident(IRubyObject) ident(newRationalCanonicalize)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRational)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_rational_new2 * */) directive(private) directive(static) ident(IRubyObject) ident(newRational)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyRational) operator(&&) ident(y) keyword(instanceof) ident(RubyRational)operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_rational_new1 * */) directive(private) directive(static) ident(IRubyObject) ident(newRational)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyRational)operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** f_rational_new_no_reduce2 * */) directive(private) directive(static) ident(IRubyObject) ident(newRationalNoReduce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyRational) operator(&&) ident(y) keyword(instanceof) ident(RubyRational)operator(;) keyword(return) ident(canonicalizeInternalNoReduce)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_rational_new_no_reduce1 * */) directive(private) directive(static) ident(IRubyObject) ident(newRationalNoReduce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(assert) ident(x) keyword(instanceof) ident(RubyRational)operator(;) keyword(return) ident(canonicalizeInternalNoReduce)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** f_rational_new_bang2 * */) directive(private) directive(static) ident(RubyRational) ident(newRationalBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(assert) operator(!)ident(f_negative_p)operator(()ident(context)operator(,) ident(y)operator(\)) operator(&&) operator(!)operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(y)operator(\))operator(\))operator(;) keyword(return) keyword(new) ident(RubyRational)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) comment(/** f_rational_new_bang1 * */) directive(private) directive(static) ident(RubyRational) ident(newRationalBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newRationalBang)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(num)operator(;) directive(private) ident(IRubyObject) ident(den)operator(;) comment(/** nurat_s_new_bang * */) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(newInstanceBang)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(newInstanceBang)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(num)operator(\)) operator({) keyword(return) ident(newInstanceBang)operator(()ident(context)operator(,) ident(recv)operator(,) ident(num)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstanceBang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(num)operator(,) ident(IRubyObject) ident(den)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(num) keyword(instanceof) ident(RubyInteger)operator(\))operator(\)) ident(num) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(den) keyword(instanceof) ident(RubyInteger)operator(\))operator(\)) ident(den) operator(=) ident(f_to_i)operator(()ident(context)operator(,) ident(den)operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(res) operator(=) ident(f_cmp)operator(()ident(context)operator(,) ident(den)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(\)) operator({) ident(num) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) ident(den) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(den)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) keyword(return) keyword(new) ident(RubyRational)operator(()ident(runtime)operator(,) ident(recv)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_int_check * */) directive(private) directive(static) type(void) ident(intCheck)operator(()ident(IRubyObject) ident(num)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(num) keyword(instanceof) ident(RubyFixnum) operator(\)) operator(&&) operator(!)operator(()ident(num) keyword(instanceof) ident(RubyBignum)operator(\))operator(\)) keyword(throw) ident(num)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) comment(/** nurat_s_canonicalize_internal * */) directive(private) directive(static) ident(IRubyObject) ident(canonicalizeInternal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(num)operator(,) ident(IRubyObject) ident(den)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(res) operator(=) ident(f_cmp)operator(()ident(context)operator(,) ident(den)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(\)) operator({) ident(num) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) ident(den) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(den)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) ident(IRubyObject) ident(gcd) operator(=) ident(f_gcd)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) ident(num) operator(=) ident(f_idiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(gcd)operator(\))operator(;) ident(den) operator(=) ident(f_idiv)operator(()ident(context)operator(,) ident(den)operator(,) ident(gcd)operator(\))operator(;) keyword(if) operator(()ident(f_one_p)operator(()ident(context)operator(,) ident(den)operator(\)) operator(&&) operator(()operator(()ident(RubyModule)operator(\))ident(clazz)operator(\))operator(.)ident(fastHasConstant)operator(()stringoperator(\))operator(\)) keyword(return) ident(num)operator(;) keyword(return) keyword(new) ident(RubyRational)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_s_canonicalize_internal_no_reduce * */) directive(private) directive(static) ident(IRubyObject) ident(canonicalizeInternalNoReduce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(num)operator(,) ident(IRubyObject) ident(den)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(res) operator(=) ident(f_cmp)operator(()ident(context)operator(,) ident(den)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(\)) operator({) ident(num) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) ident(den) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(den)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(f_equal_p)operator(()ident(context)operator(,) ident(den)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\)) operator(&&) operator(()operator(()ident(RubyModule)operator(\))ident(clazz)operator(\))operator(.)ident(fastHasConstant)operator(()stringoperator(\))operator(\)) keyword(return) ident(num)operator(;) keyword(return) keyword(new) ident(RubyRational)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(clazz)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_s_new * */) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(newInstance)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(newInstance)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(num)operator(\)) operator({) ident(intCheck)operator(()ident(num)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(num)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject) ident(num)operator(,) ident(IRubyObject) ident(den)operator(\)) operator({) ident(intCheck)operator(()ident(num)operator(\))operator(;) ident(intCheck)operator(()ident(den)operator(\))operator(;) keyword(return) ident(canonicalizeInternal)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** rb_Rational1 * */) directive(public) directive(static) ident(IRubyObject) ident(newRationalConvert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(\)) operator({) keyword(return) ident(newRationalConvert)operator(()ident(context)operator(,) ident(x)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** rb_Rational/rb_Rational2 * */) directive(public) directive(static) ident(IRubyObject) ident(newRationalConvert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(x)operator(,) ident(IRubyObject) ident(y)operator(\)) operator({) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRational)operator(()operator(\))operator(,) ident(x)operator(,) ident(y)operator(\))operator(;) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(clazz)operator(,) ident(IRubyObject)type([])ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(convert)operator(()ident(context)operator(,) ident(clazz)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) operator(}) comment(/** nurat_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(IRubyObject) ident(nil) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(nil)operator(,) ident(nil)operator(\))operator(;) operator(}) comment(/** nurat_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(\)) operator({) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nurat_s_convert * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(convert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(,) ident(IRubyObject) ident(a2)operator(\)) operator({) keyword(return) ident(convertCommon)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(convertCommon)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(a1)operator(,) ident(IRubyObject) ident(a2)operator(\)) operator({) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(a1Complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(a1)operator(;) keyword(if) operator(()ident(a1Complex)operator(.)ident(getImage)operator(()operator(\)) keyword(instanceof) ident(RubyFloat) operator(||) operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(a1Complex)operator(.)ident(getImage)operator(()operator(\))operator(\))operator(\)) operator({) ident(IRubyObject) ident(s) operator(=) ident(f_to_s)operator(()ident(context)operator(,) ident(a1)operator(\))operator(;) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(s)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) ident(a1) operator(=) ident(a1Complex)operator(.)ident(getReal)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyComplex)operator(\)) operator({) ident(RubyComplex) ident(a2Complex) operator(=) operator(()ident(RubyComplex)operator(\))ident(a2)operator(;) keyword(if) operator(()ident(a2Complex)operator(.)ident(getImage)operator(()operator(\)) keyword(instanceof) ident(RubyFloat) operator(||) operator(!)ident(f_zero_p)operator(()ident(context)operator(,) ident(a2Complex)operator(.)ident(getImage)operator(()operator(\))operator(\))operator(\)) operator({) ident(IRubyObject) ident(s) operator(=) ident(f_to_s)operator(()ident(context)operator(,) ident(a2)operator(\))operator(;) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(s)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) ident(a2) operator(=) ident(a2Complex)operator(.)ident(getReal)operator(()operator(\))operator(;) operator(}) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(IRubyObject) ident(backref) operator(=) ident(frame)operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(backref) operator(!=) pre_constant(null) operator(&&) ident(backref) keyword(instanceof) ident(RubyMatchData)operator(\)) operator(()operator(()ident(RubyMatchData)operator(\))ident(backref)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(a1) operator(=) ident(f_to_r)operator(()ident(context)operator(,) ident(a1)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(a1) operator(=) ident(str_to_r_strict)operator(()ident(context)operator(,) ident(a1)operator(\))operator(;) operator(}) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) ident(a2) operator(=) ident(f_to_r)operator(()ident(context)operator(,) ident(a2)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(a2) operator(=) ident(str_to_r_strict)operator(()ident(context)operator(,) ident(a2)operator(\))operator(;) operator(}) ident(frame)operator(.)ident(setBackRef)operator(()ident(backref)operator(\))operator(;) keyword(if) operator(()ident(a1) keyword(instanceof) ident(RubyRational)operator(\)) operator({) keyword(if) operator(()ident(a2)operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(f_zero_p)operator(()ident(context)operator(,) ident(a2)operator(\))operator(\)) keyword(return) ident(a1)operator(;) keyword(return) ident(f_div)operator(()ident(context)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) keyword(if) operator(()ident(a2) keyword(instanceof) ident(RubyRational)operator(\)) operator({) keyword(return) ident(f_div)operator(()ident(context)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) keyword(return) ident(a2)operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(\)) operator(:) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(,) ident(a1)operator(,) ident(a2)operator(\))operator(;) operator(}) comment(/** nurat_s_induced_from * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(induced_from)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(f_to_r)operator(()ident(context)operator(,) ident(arg)operator(\))operator(;) operator(}) comment(/** nurat_numerator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(numerator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(num)operator(;) operator(}) comment(/** nurat_denominator * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(denominator)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(den)operator(;) operator(}) comment(/** f_imul * */) directive(private) directive(static) ident(IRubyObject) ident(f_imul)operator(()ident(ThreadContext) ident(context)operator(,) type(long) ident(a)operator(,) type(long) ident(b)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(a) operator(==) integer(0) operator(||) ident(b) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(a) operator(==) integer(1)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(b)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(b) operator(==) integer(1)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(a)operator(\))operator(;) operator(}) type(long) ident(c) operator(=) ident(a) operator(*) ident(b)operator(;) keyword(if)operator(()ident(c) operator(/) ident(a) operator(!=) ident(b)operator(\)) operator({) keyword(return) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(runtime)operator(,) ident(a)operator(\))operator(.)ident(op_mul)operator(()ident(context)operator(,) ident(RubyBignum)operator(.)ident(newBignum)operator(()ident(runtime)operator(,) ident(b)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(c)operator(\))operator(;) operator(}) comment(/** f_addsub * */) directive(private) ident(IRubyObject) ident(f_addsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(anum)operator(,) ident(IRubyObject) ident(aden)operator(,) ident(IRubyObject) ident(bnum)operator(,) ident(IRubyObject) ident(bden)operator(,) type(boolean) ident(plus)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(num)operator(,) ident(den)operator(,) ident(g)operator(,) ident(a)operator(,) ident(b)operator(;) keyword(if) operator(()ident(anum) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(aden) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(bnum) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(bden) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(an) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(anum)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(ad) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(aden)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(bn) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(bnum)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(bd) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(bden)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(ig) operator(=) ident(i_gcd)operator(()ident(ad)operator(,) ident(bd)operator(\))operator(;) ident(g) operator(=) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(ig)operator(\))operator(;) ident(a) operator(=) ident(f_imul)operator(()ident(context)operator(,) ident(an)operator(,) ident(bd) operator(/) ident(ig)operator(\))operator(;) ident(b) operator(=) ident(f_imul)operator(()ident(context)operator(,) ident(bn)operator(,) ident(ad) operator(/) ident(ig)operator(\))operator(;) operator(}) keyword(else) operator({) ident(g) operator(=) ident(f_gcd)operator(()ident(context)operator(,) ident(aden)operator(,) ident(bden)operator(\))operator(;) ident(a) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(anum)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(bden)operator(,) ident(g)operator(\))operator(\))operator(;) ident(b) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(bnum)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(aden)operator(,) ident(g)operator(\))operator(\))operator(;) operator(}) ident(IRubyObject) ident(c) operator(=) ident(plus) operator(?) ident(f_add)operator(()ident(context)operator(,) ident(a)operator(,) ident(b)operator(\)) operator(:) ident(f_sub)operator(()ident(context)operator(,) ident(a)operator(,) ident(b)operator(\))operator(;) ident(b) operator(=) ident(f_idiv)operator(()ident(context)operator(,) ident(aden)operator(,) ident(g)operator(\))operator(;) ident(g) operator(=) ident(f_gcd)operator(()ident(context)operator(,) ident(c)operator(,) ident(g)operator(\))operator(;) ident(num) operator(=) ident(f_idiv)operator(()ident(context)operator(,) ident(c)operator(,) ident(g)operator(\))operator(;) ident(a) operator(=) ident(f_idiv)operator(()ident(context)operator(,) ident(bden)operator(,) ident(g)operator(\))operator(;) ident(den) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(a)operator(,) ident(b)operator(\))operator(;) keyword(return) ident(RubyRational)operator(.)ident(newRationalNoReduce)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_add * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_add)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(return) ident(f_addsub)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) pre_constant(true)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_add)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(return) ident(f_addsub)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(otherRational)operator(.)ident(num)operator(,) ident(otherRational)operator(.)ident(den)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_sub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(return) ident(f_addsub)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) pre_constant(false)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_sub)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(return) ident(f_addsub)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(otherRational)operator(.)ident(num)operator(,) ident(otherRational)operator(.)ident(den)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** f_muldiv * */) directive(private) ident(IRubyObject) ident(f_muldiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(anum)operator(,) ident(IRubyObject) ident(aden)operator(,) ident(IRubyObject) ident(bnum)operator(,) ident(IRubyObject) ident(bden)operator(,) type(boolean) ident(mult)operator(\)) operator({) keyword(if) operator(()operator(!)ident(mult)operator(\)) operator({) keyword(if) operator(()ident(f_negative_p)operator(()ident(context)operator(,) ident(bnum)operator(\))operator(\)) operator({) ident(anum) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(anum)operator(\))operator(;) ident(bnum) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(bnum)operator(\))operator(;) operator(}) ident(IRubyObject) ident(tmp) operator(=) ident(bnum)operator(;) ident(bnum) operator(=) ident(bden)operator(;) ident(bden) operator(=) ident(tmp)operator(;) operator(}) directive(final) ident(IRubyObject) ident(num)operator(,) ident(den)operator(;) keyword(if) operator(()ident(anum) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(aden) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(bnum) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(bden) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(an) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(anum)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(ad) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(aden)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(bn) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(bnum)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(bd) operator(=) operator(()operator(()ident(RubyFixnum)operator(\))ident(bden)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) type(long) ident(g1) operator(=) ident(i_gcd)operator(()ident(an)operator(,) ident(bd)operator(\))operator(;) type(long) ident(g2) operator(=) ident(i_gcd)operator(()ident(ad)operator(,) ident(bn)operator(\))operator(;) ident(num) operator(=) ident(f_imul)operator(()ident(context)operator(,) ident(an) operator(/) ident(g1)operator(,) ident(bn) operator(/) ident(g2)operator(\))operator(;) ident(den) operator(=) ident(f_imul)operator(()ident(context)operator(,) ident(ad) operator(/) ident(g2)operator(,) ident(bd) operator(/) ident(g1)operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(g1) operator(=) ident(f_gcd)operator(()ident(context)operator(,) ident(anum)operator(,) ident(bden)operator(\))operator(;) ident(IRubyObject) ident(g2) operator(=) ident(f_gcd)operator(()ident(context)operator(,) ident(aden)operator(,) ident(bnum)operator(\))operator(;) ident(num) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(anum)operator(,) ident(g1)operator(\))operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(bnum)operator(,) ident(g2)operator(\))operator(\))operator(;) ident(den) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(aden)operator(,) ident(g2)operator(\))operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(bden)operator(,) ident(g1)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyRational)operator(.)ident(newRationalNoReduce)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_mul * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(return) ident(f_muldiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) pre_constant(true)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_mul)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(return) ident(f_muldiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(otherRational)operator(.)ident(num)operator(,) ident(otherRational)operator(.)ident(den)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_div * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_div)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) keyword(return) ident(f_muldiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(,) pre_constant(false)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(return) ident(f_muldiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(,) ident(otherRational)operator(.)ident(num)operator(,) ident(otherRational)operator(.)ident(den)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_fdiv * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_fdiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(f_div)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_expt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_expt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(other)operator(\))operator(\)) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyRational)operator(\)) operator({) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(if) operator(()ident(f_one_p)operator(()ident(context)operator(,) ident(otherRational)operator(.)ident(den)operator(\))operator(\)) ident(other) operator(=) ident(otherRational)operator(.)ident(num)operator(;) operator(}) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) directive(final) ident(IRubyObject) ident(tnum)operator(,) ident(tden)operator(;) ident(IRubyObject) ident(res) operator(=) ident(f_cmp)operator(()ident(context)operator(,) ident(other)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\)) operator({) ident(tnum) operator(=) ident(f_expt)operator(()ident(context)operator(,) ident(num)operator(,) ident(other)operator(\))operator(;) ident(tden) operator(=) ident(f_expt)operator(()ident(context)operator(,) ident(den)operator(,) ident(other)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(res) operator(==) ident(RubyFixnum)operator(.)ident(minus_one)operator(()ident(runtime)operator(\))operator(\))operator({) ident(tnum) operator(=) ident(f_expt)operator(()ident(context)operator(,) ident(den)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(;) ident(tden) operator(=) ident(f_expt)operator(()ident(context)operator(,) ident(num)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(tnum) operator(=) ident(tden) operator(=) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(return) ident(RubyRational)operator(.)ident(newRational)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(tnum)operator(,) ident(tden)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) keyword(return) ident(f_expt)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) stringoperator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_cmp * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(if) operator(()ident(den) keyword(instanceof) ident(RubyFixnum) operator(&&) operator(()operator(()ident(RubyFixnum)operator(\))ident(den)operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(==) integer(1)operator(\)) keyword(return) ident(f_cmp)operator(()ident(context)operator(,) ident(num)operator(,) ident(other)operator(\))operator(;) keyword(return) ident(f_cmp)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(RubyRational)operator(.)ident(newRationalBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(other)operator(\))operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_cmp)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) directive(final) ident(IRubyObject) ident(num1)operator(,) ident(num2)operator(;) keyword(if) operator(()ident(num) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(den) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(otherRational)operator(.)ident(num) keyword(instanceof) ident(RubyFixnum) operator(&&) ident(otherRational)operator(.)ident(den) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(num1) operator(=) ident(f_imul)operator(()ident(context)operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(num)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(otherRational)operator(.)ident(den)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) ident(num2) operator(=) ident(f_imul)operator(()ident(context)operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(otherRational)operator(.)ident(num)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(,) operator(()operator(()ident(RubyFixnum)operator(\))ident(den)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(num1) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(num)operator(,) ident(otherRational)operator(.)ident(den)operator(\))operator(;) ident(num2) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(otherRational)operator(.)ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) keyword(return) ident(f_cmp)operator(()ident(context)operator(,) ident(f_sub)operator(()ident(context)operator(,) ident(num1)operator(,) ident(num2)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(coerceBin)operator(()ident(context)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** nurat_equal_p * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(num)operator(\)) operator(&&) ident(f_zero_p)operator(()ident(context)operator(,) ident(den)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(den) keyword(instanceof) ident(RubyFixnum)operator(\)) operator(||) operator(()operator(()ident(RubyFixnum)operator(\))ident(den)operator(\))operator(.)ident(getLongValue)operator(()operator(\)) operator(!=) integer(1)operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(if) operator(()ident(f_equal_p)operator(()ident(context)operator(,) ident(num)operator(,) ident(other)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(f_equal_p)operator(()ident(context)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(,) ident(other)operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(RATIONAL)operator(:) ident(RubyRational) ident(otherRational) operator(=) operator(()ident(RubyRational)operator(\))ident(other)operator(;) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(num)operator(\)) operator(&&) ident(f_zero_p)operator(()ident(context)operator(,) ident(otherRational)operator(.)ident(num)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()ident(f_equal_p)operator(()ident(context)operator(,) ident(num)operator(,) ident(otherRational)operator(.)ident(num)operator(\)) operator(&&) ident(f_equal_p)operator(()ident(context)operator(,) ident(den)operator(,) ident(otherRational)operator(.)ident(den)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(f_equal_p)operator(()ident(context)operator(,) ident(other)operator(,) local_variable(this)operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** nurat_coerce * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_coerce)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(switch) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(index)operator(\)) operator({) keyword(case) ident(ClassIndex)operator(.)ident(FIXNUM)operator(:) keyword(case) ident(ClassIndex)operator(.)ident(BIGNUM)operator(:) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(RubyRational)operator(.)ident(newRationalBang)operator(()ident(context)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(other)operator(\))operator(,) local_variable(this)operator(\))operator(;) keyword(case) ident(ClassIndex)operator(.)ident(FLOAT)operator(:) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(other)operator(,) ident(f_to_f)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(\))operator(;) operator(}) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) string operator(+) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** nurat_idiv * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_idiv)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(f_floor)operator(()ident(context)operator(,) ident(f_div)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) comment(/** nurat_mod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(op_mod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(f_floor)operator(()ident(context)operator(,) ident(f_div)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) keyword(return) ident(f_sub)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(other)operator(,) ident(val)operator(\))operator(\))operator(;) operator(}) comment(/** nurat_divmod * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_divmod)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(f_floor)operator(()ident(context)operator(,) ident(f_div)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(val)operator(,) ident(f_sub)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(other)operator(,) ident(val)operator(\))operator(\))operator(\))operator(;) operator(}) comment(/** nurat_rem * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_rem)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(f_truncate)operator(()ident(context)operator(,) ident(f_div)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) keyword(return) ident(f_sub)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(other)operator(,) ident(val)operator(\))operator(\))operator(;) operator(}) comment(/** nurat_abs * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_abs)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()operator(!)ident(f_negative_p)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(f_negate)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** nurat_floor * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_floor)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_idiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_ceil * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_ceil)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_negate)operator(()ident(context)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(,) ident(den)operator(\))operator(\))operator(;) operator(}) comment(/** nurat_truncate * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(op_truncate)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(f_negative_p)operator(()ident(context)operator(,) ident(num)operator(\))operator(\)) operator({) keyword(return) ident(f_negate)operator(()ident(context)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(,) ident(den)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(f_idiv)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_round * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_round)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(IRubyObject) ident(two) operator(=) ident(RubyFixnum)operator(.)ident(two)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(f_negative_p)operator(()ident(context)operator(,) ident(num)operator(\))operator(\)) operator({) ident(IRubyObject) ident(tnum) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) ident(tnum) operator(=) ident(f_add)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(tnum)operator(,) ident(two)operator(\))operator(,) ident(den)operator(\))operator(;) ident(IRubyObject) ident(tden) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(den)operator(,) ident(two)operator(\))operator(;) keyword(return) ident(f_negate)operator(()ident(context)operator(,) ident(f_idiv)operator(()ident(context)operator(,) ident(tnum)operator(,) ident(tden)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(tnum) operator(=) ident(f_add)operator(()ident(context)operator(,) ident(f_mul)operator(()ident(context)operator(,) ident(num)operator(,) ident(two)operator(\))operator(,) ident(den)operator(\))operator(;) ident(IRubyObject) ident(tden) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(den)operator(,) ident(two)operator(\))operator(;) keyword(return) ident(f_idiv)operator(()ident(context)operator(,) ident(tnum)operator(,) ident(tden)operator(\))operator(;) operator(}) operator(}) comment(/** nurat_to_f * */) directive(private) directive(static) type(long) ident(ML) operator(=) operator(()type(long)operator(\))operator(()pre_type(Math)operator(.)ident(log)operator(()pre_type(Double)operator(.)ident(MAX_VALUE)operator(\)) operator(/) pre_type(Math)operator(.)ident(log)operator(()float(2.0)operator(\)) operator(-) integer(1)operator(\))operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(num)operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(newFloat)operator(()integer(0)operator(\))operator(;) ident(IRubyObject) ident(num) operator(=) local_variable(this)operator(.)ident(num)operator(;) ident(IRubyObject) ident(den) operator(=) local_variable(this)operator(.)ident(den)operator(;) type(boolean) ident(minus) operator(=) pre_constant(false)operator(;) keyword(if) operator(()ident(f_negative_p)operator(()ident(context)operator(,) ident(num)operator(\))operator(\)) operator({) ident(num) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) ident(minus) operator(=) pre_constant(true)operator(;) operator(}) type(long) ident(nl) operator(=) ident(i_ilog2)operator(()ident(context)operator(,) ident(num)operator(\))operator(;) type(long) ident(dl) operator(=) ident(i_ilog2)operator(()ident(context)operator(,) ident(den)operator(\))operator(;) type(long) ident(ne) operator(=) integer(0)operator(;) keyword(if) operator(()ident(nl) operator(>) ident(ML)operator(\)) operator({) ident(ne) operator(=) ident(nl) operator(-) ident(ML)operator(;) ident(num) operator(=) ident(f_rshift)operator(()ident(context)operator(,) ident(num)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(ne)operator(\))operator(\))operator(;) operator(}) type(long) ident(de) operator(=) integer(0)operator(;) keyword(if) operator(()ident(dl) operator(>) ident(ML)operator(\)) operator({) ident(de) operator(=) ident(dl) operator(-) ident(ML)operator(;) ident(den) operator(=) ident(f_rshift)operator(()ident(context)operator(,) ident(den)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(de)operator(\))operator(\))operator(;) operator(}) type(long) ident(e) operator(=) ident(ne) operator(-) ident(de)operator(;) keyword(if) operator(()ident(e) operator(>) integer(1023) operator(||) ident(e) operator(<) operator(-)integer(1022)operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(IRubyWarnings)operator(.)ident(ID)operator(.)ident(FLOAT_OUT_OF_RANGE)operator(,) stringoperator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newFloat)operator(()ident(e) operator(>) integer(0) operator(?) pre_type(Double)operator(.)ident(MAX_VALUE) operator(:) integer(0)operator(\))operator(;) operator(}) type(double) ident(f) operator(=) ident(RubyNumeric)operator(.)ident(num2dbl)operator(()ident(num)operator(\)) operator(/) ident(RubyNumeric)operator(.)ident(num2dbl)operator(()ident(den)operator(\))operator(;) keyword(if) operator(()ident(minus)operator(\)) operator({) ident(f) operator(=) operator(-)ident(f)operator(;) ident(f) operator(=) ident(ldexp)operator(()ident(f)operator(,) ident(e)operator(\))operator(;) operator(}) keyword(if) operator(()pre_type(Double)operator(.)ident(isInfinite)operator(()ident(f)operator(\)) operator(||) pre_type(Double)operator(.)ident(isNaN)operator(()ident(f)operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(IRubyWarnings)operator(.)ident(ID)operator(.)ident(FLOAT_OUT_OF_RANGE)operator(,) stringoperator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFloat)operator(()ident(f)operator(\))operator(;) operator(}) comment(/** nurat_to_r * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/** nurat_to_r * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(hash)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(f_xor)operator(()ident(context)operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_to_s * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_s)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getKernel)operator(()operator(\))operator(,) stringoperator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getKernel)operator(()operator(\))operator(,) stringoperator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_marshal_dump * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(marshal_dump)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(num)operator(,) ident(den)operator(\))operator(;) operator(}) comment(/** nurat_marshal_load * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(marshal_load)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(arg)operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(num) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(>) integer(0) operator(?) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(den) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(>) integer(1) operator(?) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(f_zero_p)operator(()ident(context)operator(,) ident(den)operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newZeroDivisionError)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_gcd * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(gcd)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(intCheck)operator(()ident(other)operator(\))operator(;) keyword(return) ident(f_gcd)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_lcm * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(lcm)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(intCheck)operator(()ident(other)operator(\))operator(;) keyword(return) ident(Numeric)operator(.)ident(f_lcm)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) comment(/** rb_gcdlcm * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(gcdlcm)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(intCheck)operator(()ident(other)operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(f_gcd)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(,) ident(Numeric)operator(.)ident(f_lcm)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(\))operator(;) operator(}) directive(static) ident(RubyArray) ident(str_to_r_internal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ByteList) ident(bytes) operator(=) ident(s)operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(bytes)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(recv)operator(\))operator(;) ident(IRubyObject) ident(m) operator(=) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(RationalPatterns)operator(.)ident(rat_pat)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(s)operator(\))operator(;) keyword(if) operator(()operator(!)ident(m)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(si) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(one)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(IRubyObject) ident(nu) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(two)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(IRubyObject) ident(de) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(three)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(IRubyObject) ident(re) operator(=) ident(m)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(RubyArray) ident(a) operator(=) ident(nu)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(RationalPatterns)operator(.)ident(an_e_pat)operator(\))operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(ifp) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) ident(IRubyObject) ident(exp) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(!=) integer(2) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(;) ident(a) operator(=) ident(ifp)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(RationalPatterns)operator(.)ident(a_dot_pat)operator(\))operator(\))operator(.)ident(convertToArray)operator(()operator(\))operator(;) ident(IRubyObject) ident(ip) operator(=) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) ident(IRubyObject) ident(fp) operator(=) ident(a)operator(.)ident(size)operator(()operator(\)) operator(!=) integer(2) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(;) ident(IRubyObject) ident(v) operator(=) ident(RubyRational)operator(.)ident(newRationalCanonicalize)operator(()ident(context)operator(,) ident(f_to_i)operator(()ident(context)operator(,) ident(ip)operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(fp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(bytes) operator(=) ident(fp)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) type(int) ident(count) operator(=) integer(0)operator(;) type(byte)type([])ident(buf) operator(=) ident(bytes)operator(.)ident(bytes)operator(;) type(int) ident(i) operator(=) ident(bytes)operator(.)ident(begin)operator(;) type(int) ident(end) operator(=) ident(i) operator(+) ident(bytes)operator(.)ident(realSize)operator(;) keyword(while) operator(()ident(i) operator(<) ident(end)operator(\)) keyword(if) operator(()ident(ASCIIEncoding)operator(.)ident(INSTANCE)operator(.)ident(isDigit)operator(()ident(buf)operator([)ident(i)operator(++)operator(])operator(\))operator(\)) ident(count)operator(++)operator(;) ident(IRubyObject) ident(l) operator(=) ident(f_expt)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(10)operator(\))operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) ident(count)operator(\))operator(\))operator(;) ident(v) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(v)operator(,) ident(l)operator(\))operator(;) ident(v) operator(=) ident(f_add)operator(()ident(context)operator(,) ident(v)operator(,) ident(f_to_i)operator(()ident(context)operator(,) ident(fp)operator(\))operator(\))operator(;) ident(v) operator(=) ident(f_div)operator(()ident(context)operator(,) ident(v)operator(,) ident(l)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(exp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(v) operator(=) ident(f_mul)operator(()ident(context)operator(,) ident(v)operator(,) ident(f_expt)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(runtime)operator(,) integer(10)operator(\))operator(,) ident(f_to_i)operator(()ident(context)operator(,) ident(exp)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(si)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(bytes) operator(=) ident(si)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(bytes)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(&&) ident(bytes)operator(.)ident(get)operator(()integer(0)operator(\)) operator(==) stringoperator(\)) ident(v) operator(=) ident(f_negate)operator(()ident(context)operator(,) ident(v)operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(de)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(v) operator(=) ident(f_div)operator(()ident(context)operator(,) ident(v)operator(,) ident(f_to_i)operator(()ident(context)operator(,) ident(de)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(v)operator(,) ident(re)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newArray)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(,) ident(recv)operator(\))operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(str_to_r_strict)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyArray) ident(a) operator(=) ident(str_to_r_internal)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) keyword(if) operator(()ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(a)operator(.)ident(eltInternal)operator(()integer(1)operator(\))operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) ident(IRubyObject) ident(s) operator(=) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(s)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004-2005 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 David Corbin * Copyright (C\) 2006 Nick Sieger * Copyright (C\) 2006 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.ref.SoftReference)operator(;) keyword(import) include(java.util.concurrent.ConcurrentHashMap)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.joni.Matcher)operator(;) keyword(import) include(org.joni.NameEntry)operator(;) keyword(import) include(org.joni.Option)operator(;) keyword(import) include(org.joni.Regex)operator(;) keyword(import) include(org.joni.Region)operator(;) keyword(import) include(org.joni.Syntax)operator(;) keyword(import) include(org.joni.WarnCallback)operator(;) keyword(import) include(org.joni.encoding.Encoding)operator(;) keyword(import) include(org.joni.exception.JOniException)operator(;) keyword(import) include(static) include(org.jruby.anno.FrameField)operator(.)operator(*)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.parser.ReOptions)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.KCode)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) comment(/** * */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyRegexp) directive(extends) ident(RubyObject) directive(implements) ident(ReOptions)operator(,) ident(WarnCallback) operator({) directive(private) ident(KCode) ident(kcode)operator(;) directive(private) ident(Regex) ident(pattern)operator(;) directive(private) ident(ByteList) ident(str)operator(;) directive(private) directive(static) directive(final) type(int) ident(REGEXP_LITERAL_F) operator(=) integer(1) operator(<)operator(<) integer(11)operator(;) directive(private) directive(static) directive(final) type(int) ident(REGEXP_KCODE_DEFAULT) operator(=) integer(1) operator(<)operator(<) integer(12)operator(;) directive(public) type(void) ident(setLiteral)operator(()operator(\)) operator({) ident(flags) operator(|=) ident(REGEXP_LITERAL_F)operator(;) operator(}) directive(public) type(void) ident(clearLiteral)operator(()operator(\)) operator({) ident(flags) operator(&=) operator(~)ident(REGEXP_LITERAL_F)operator(;) operator(}) directive(public) type(boolean) ident(isLiteral)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(REGEXP_LITERAL_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(public) type(void) ident(setKCodeDefault)operator(()operator(\)) operator({) ident(flags) operator(|=) ident(REGEXP_KCODE_DEFAULT)operator(;) operator(}) directive(public) type(void) ident(clearKCodeDefault)operator(()operator(\)) operator({) ident(flags) operator(&=) operator(~)ident(REGEXP_KCODE_DEFAULT)operator(;) operator(}) directive(public) type(boolean) ident(isKCodeDefault)operator(()operator(\)) operator({) keyword(return) operator(()ident(flags) operator(&) ident(REGEXP_KCODE_DEFAULT)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(public) ident(KCode) ident(getKCode)operator(()operator(\)) operator({) keyword(return) ident(kcode)operator(;) operator(}) directive(private) directive(static) pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>) ident(getPatternCache)operator(()operator(\)) operator({) pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>) ident(cache) operator(=) ident(patternCache)operator(.)ident(get)operator(()operator(\))operator(;) keyword(if) operator(()ident(cache) operator(==) pre_constant(null)operator(\)) operator({) ident(cache) operator(=) keyword(new) pre_type(ConcurrentHashMap)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>)operator(()integer(5)operator(\))operator(;) ident(patternCache) operator(=) keyword(new) pre_type(SoftReference)operator(<)pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>)operator(>)operator(()ident(cache)operator(\))operator(;) operator(}) keyword(return) ident(cache)operator(;) operator(}) directive(static) directive(volatile) pre_type(SoftReference)operator(<)pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>)operator(>) ident(patternCache) operator(=) keyword(new) pre_type(SoftReference)operator(<)pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>)operator(>)operator(()pre_constant(null)operator(\))operator(;) directive(public) directive(static) ident(RubyClass) ident(createRegexpClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(regexpClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(REGEXP_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setRegexp)operator(()ident(regexpClass)operator(\))operator(;) ident(regexpClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(REGEXP)operator(;) ident(regexpClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyRegexp)operator(;) operator(}) operator(})operator(;) ident(regexpClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RE_OPTION_IGNORECASE)operator(\))operator(\))operator(;) ident(regexpClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RE_OPTION_EXTENDED)operator(\))operator(\))operator(;) ident(regexpClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(RE_OPTION_MULTILINE)operator(\))operator(\))operator(;) ident(regexpClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyRegexp)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(regexpClass)operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(REGEXP_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyRegexp) ident(instance) operator(=) keyword(new) ident(RubyRegexp)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) comment(/** used by allocator * */) directive(private) ident(RubyRegexp)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) comment(/** default constructor * */) directive(private) ident(RubyRegexp)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRegexp)operator(()operator(\))operator(\))operator(;) operator(}) comment(// used only by the compiler/interpreter (will set the literal flag\)) directive(public) directive(static) ident(RubyRegexp) ident(newRegexp)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(pattern)operator(,) type(int) ident(options)operator(\)) operator({) keyword(return) ident(newRegexp)operator(()ident(runtime)operator(,) ident(ByteList)operator(.)ident(create)operator(()ident(pattern)operator(\))operator(,) ident(options)operator(\))operator(;) operator(}) comment(// used only by the compiler/interpreter (will set the literal flag\)) directive(public) directive(static) ident(RubyRegexp) ident(newRegexp)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(pattern)operator(,) type(int) ident(options)operator(\)) operator({) ident(RubyRegexp) ident(regexp) operator(=) ident(newRegexp)operator(()ident(runtime)operator(,) ident(pattern)operator(,) ident(options)operator(,) pre_constant(false)operator(\))operator(;) ident(regexp)operator(.)ident(setLiteral)operator(()operator(\))operator(;) keyword(return) ident(regexp)operator(;) operator(}) directive(public) directive(static) ident(RubyRegexp) ident(newRegexp)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(pattern)operator(,) type(int) ident(options)operator(,) type(boolean) ident(quote)operator(\)) operator({) ident(RubyRegexp) ident(regexp) operator(=) keyword(new) ident(RubyRegexp)operator(()ident(runtime)operator(\))operator(;) ident(regexp)operator(.)ident(initialize)operator(()ident(pattern)operator(,) ident(options)operator(,) ident(quote)operator(\))operator(;) keyword(return) ident(regexp)operator(;) operator(}) comment(// internal usage) directive(static) ident(RubyRegexp) ident(newRegexp)operator(()ident(Ruby) ident(runtime)operator(,) ident(Regex) ident(regex)operator(\)) operator({) ident(RubyRegexp) ident(regexp) operator(=) keyword(new) ident(RubyRegexp)operator(()ident(runtime)operator(\))operator(;) ident(regexp)operator(.)ident(pattern) operator(=) ident(regex)operator(;) ident(regexp)operator(.)ident(str) operator(=) ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(;) keyword(return) ident(regexp)operator(;) operator(}) directive(public) type(void) ident(warn)operator(()pre_type(String) ident(message)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(MISCELLANEOUS)operator(,) ident(message)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(kcode)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) operator(()operator(!)ident(isKCodeDefault)operator(()operator(\)) operator(&&) ident(kcode) operator(!=) pre_constant(null)operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(kcode)operator(.)ident(name)operator(()operator(\))operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(REGEXP)operator(;) operator(}) directive(public) ident(Regex) ident(getPattern)operator(()operator(\)) operator({) keyword(return) ident(pattern)operator(;) operator(}) directive(private) type(void) ident(check)operator(()operator(\)) operator({) keyword(if) operator(()ident(pattern) operator(==) pre_constant(null) operator(||) ident(str) operator(==) pre_constant(null)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) type(int) ident(hashval) operator(=) operator(()type(int)operator(\))ident(pattern)operator(.)ident(getOptions)operator(()operator(\))operator(;) type(int) ident(len) operator(=) local_variable(this)operator(.)ident(str)operator(.)ident(realSize)operator(;) type(int) ident(p) operator(=) local_variable(this)operator(.)ident(str)operator(.)ident(begin)operator(;) keyword(while) operator(()ident(len)operator(--)operator(>)integer(0)operator(\)) operator({) ident(hashval) operator(=) ident(hashval) operator(*) integer(33) operator(+) ident(str)operator(.)ident(bytes)operator([)ident(p)operator(++)operator(])operator(;) operator(}) ident(hashval) operator(=) ident(hashval) operator(+) operator(()ident(hashval)operator(>)operator(>)integer(5)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(hashval)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if)operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyRegexp)operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyRegexp) ident(otherRegex) operator(=) operator(()ident(RubyRegexp)operator(\))ident(other)operator(;) ident(check)operator(()operator(\))operator(;) ident(otherRegex)operator(.)ident(check)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(str)operator(.)ident(equal)operator(()ident(otherRegex)operator(.)ident(str)operator(\)) operator(&&) ident(kcode) operator(==) ident(otherRegex)operator(.)ident(kcode) operator(&&) ident(pattern)operator(.)ident(getOptions)operator(()operator(\)) operator(==) ident(otherRegex)operator(.)ident(pattern)operator(.)ident(getOptions)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_match2)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(line) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getLastLine)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(line) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(int) ident(start) operator(=) ident(search)operator(()ident(context)operator(,) operator(()ident(RubyString)operator(\))ident(line)operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) keyword(if)operator(()ident(start) operator(<) integer(0)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(start)operator(\))operator(;) operator(}) operator(}) comment(/** rb_reg_eqq * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(eqq)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)operator(()ident(str) keyword(instanceof) ident(RubyString)operator(\))operator(\)) ident(str) operator(=) ident(str)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) type(int) ident(start) operator(=) ident(search)operator(()ident(context)operator(,) operator(()ident(RubyString)operator(\))ident(str)operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) operator(()ident(start) operator(<) integer(0)operator(\)) operator(?) ident(runtime)operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(REGEX_QUOTED) operator(=) integer(1)operator(;) directive(private) type(void) ident(initialize)operator(()ident(ByteList) ident(bytes)operator(,) type(int) ident(options)operator(,) type(boolean) ident(quote)operator(\)) operator({) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) ident(checkFrozen)operator(()operator(\))operator(;) keyword(if) operator(()ident(isLiteral)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) ident(setKCode)operator(()ident(options)operator(\))operator(;) pre_type(Map)operator(<)ident(ByteList)operator(,) ident(Regex)operator(>) ident(cache) operator(=) ident(getPatternCache)operator(()operator(\))operator(;) ident(Regex) ident(pat) operator(=) ident(cache)operator(.)ident(get)operator(()ident(bytes)operator(\))operator(;) keyword(if) operator(()ident(pat) operator(!=) pre_constant(null) operator(&&) ident(pat)operator(.)ident(getEncoding)operator(()operator(\)) operator(==) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\)) operator(&&) ident(pat)operator(.)ident(getOptions)operator(()operator(\)) operator(==) operator(()ident(options) operator(&) hex(0xf)operator(\)) operator(&&) operator(()operator(()ident(pat)operator(.)ident(getUserOptions)operator(()operator(\)) operator(&) ident(REGEX_QUOTED)operator(\)) operator(!=) integer(0)operator(\)) operator(==) ident(quote)operator(\)) operator({) comment(// cache hit) ident(pattern) operator(=) ident(pat)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(quote)operator(\)) ident(bytes) operator(=) ident(quote)operator(()ident(bytes)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getKCode)operator(()operator(\))operator(\))operator(;) ident(makeRegexp)operator(()ident(bytes)operator(,) ident(bytes)operator(.)ident(begin)operator(,) ident(bytes)operator(.)ident(realSize)operator(,) ident(options) operator(&) hex(0xf)operator(,) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(quote)operator(\)) ident(pattern)operator(.)ident(setUserOptions)operator(()ident(REGEX_QUOTED)operator(\))operator(;) ident(cache)operator(.)ident(put)operator(()ident(bytes)operator(,) ident(pattern)operator(\))operator(;) operator(}) ident(str) operator(=) ident(bytes)operator(;) operator(}) directive(private) type(void) ident(makeRegexp)operator(()ident(ByteList) ident(bytes)operator(,) type(int) ident(start)operator(,) type(int) ident(len)operator(,) type(int) ident(flags)operator(,) ident(Encoding) ident(enc)operator(\)) operator({) keyword(try) operator({) ident(pattern) operator(=) keyword(new) ident(Regex)operator(()ident(bytes)operator(.)ident(bytes)operator(,) ident(start)operator(,) ident(start) operator(+) ident(len)operator(,) ident(flags)operator(,) ident(enc)operator(,) ident(Syntax)operator(.)ident(DEFAULT)operator(,) local_variable(this)operator(\))operator(;) operator(}) keyword(catch)operator(()exception(Exception) ident(e)operator(\)) operator({) ident(rb_reg_raise)operator(()ident(bytes)operator(.)ident(bytes)operator(,) ident(start)operator(,) ident(len)operator(,) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(,) ident(flags)operator(\))operator(;) operator(}) operator(}) directive(private) directive(final) type(void) ident(rb_reg_raise)operator(()type(byte)type([]) ident(s)operator(,) type(int) ident(start)operator(,) type(int) ident(len)operator(,) pre_type(String) ident(err)operator(,)type(int) ident(flags)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRegexpError)operator(()ident(err) operator(+) string operator(+) ident(rb_reg_desc)operator(()ident(s)operator(,)ident(start)operator(,) ident(len)operator(,)ident(flags)operator(\))operator(\))operator(;) operator(}) directive(private) directive(final) pre_type(StringBuilder) ident(rb_reg_desc)operator(()type(byte)type([]) ident(s)operator(,) type(int) ident(start)operator(,) type(int) ident(len)operator(,) type(int) ident(flags)operator(\)) operator({) pre_type(StringBuilder) ident(sb) operator(=) keyword(new) pre_type(StringBuilder)operator(()stringoperator(\))operator(;) ident(rb_reg_expr_str)operator(()ident(sb)operator(,) ident(s)operator(,) ident(start)operator(,) ident(len)operator(\))operator(;) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if)operator(()operator(()ident(flags) operator(&) ident(ReOptions)operator(.)ident(RE_OPTION_MULTILINE)operator(\)) operator(!=) integer(0)operator(\)) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if)operator(()operator(()ident(flags) operator(&) ident(ReOptions)operator(.)ident(RE_OPTION_IGNORECASE)operator(\)) operator(!=) integer(0)operator(\)) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if)operator(()operator(()ident(flags) operator(&) ident(ReOptions)operator(.)ident(RE_OPTION_EXTENDED)operator(\)) operator(!=) integer(0)operator(\)) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(kcode) operator(!=) pre_constant(null) operator(&&) operator(!)ident(isKCodeDefault)operator(()operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()ident(kcode)operator(.)ident(name)operator(()operator(\))operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(sb)operator(;) operator(}) directive(private) directive(final) type(void) ident(rb_reg_expr_str)operator(()pre_type(StringBuilder) ident(sb)operator(,) type(byte)type([]) ident(s)operator(,) type(int) ident(start)operator(,) type(int) ident(len)operator(\)) operator({) type(int) ident(p)operator(,)ident(pend)operator(;) type(boolean) ident(need_escape) operator(=) pre_constant(false)operator(;) ident(p) operator(=) ident(start)operator(;) ident(pend) operator(=) ident(start)operator(+)ident(len)operator(;) ident(Encoding) ident(enc) operator(=) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(;) keyword(while)operator(()ident(p)operator(<)ident(pend)operator(\)) operator({) keyword(if)operator(()ident(s)operator([)ident(p)operator(]) operator(==) string operator(||) operator(()operator(!)operator(()string operator(==) ident(s)operator([)ident(p)operator(]) operator(||) operator(()operator(!)pre_type(Character)operator(.)ident(isWhitespace)operator(()ident(s)operator([)ident(p)operator(])operator(\)) operator(&&) operator(!)pre_type(Character)operator(.)ident(isISOControl)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(\))operator(\)) operator(&&) ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(==)integer(1)operator(\))operator(\)) operator({) ident(need_escape) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) operator(}) ident(p) operator(+=) ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(need_escape)operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()keyword(new) ident(ByteList)operator(()ident(s)operator(,)ident(start)operator(,)ident(len)operator(,)pre_constant(false)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(p) operator(=) integer(0)operator(;) keyword(while)operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) keyword(if)operator(()ident(s)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) type(int) ident(n) operator(=) ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(+)integer(1)operator(])operator(\)) operator(+) integer(1)operator(;) ident(sb)operator(.)ident(append)operator(()keyword(new) ident(ByteList)operator(()ident(s)operator(,)ident(p)operator(,)ident(n)operator(,)pre_constant(false)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(p) operator(+=) ident(n)operator(;) keyword(continue)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(s)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(!=)integer(1)operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()keyword(new) ident(ByteList)operator(()ident(s)operator(,)ident(p)operator(,)ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(,)pre_constant(false)operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(p) operator(+=) ident(enc)operator(.)ident(length)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(;) keyword(continue)operator(;) operator(}) keyword(else) keyword(if)operator(()operator(()string operator(==) ident(s)operator([)ident(p)operator(]) operator(||) operator(()operator(!)pre_type(Character)operator(.)ident(isWhitespace)operator(()ident(s)operator([)ident(p)operator(])operator(\)) operator(&&) operator(!)pre_type(Character)operator(.)ident(isISOControl)operator(()ident(s)operator([)ident(p)operator(])operator(\))operator(\))operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()operator(()type(char)operator(\))operator(()ident(s)operator([)ident(p)operator(])operator(&)hex(0xFF)operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if)operator(()operator(!)pre_type(Character)operator(.)ident(isWhitespace)operator(()operator(()type(char)operator(\))operator(()ident(s)operator([)ident(p)operator(])operator(&)hex(0xFF)operator(\))operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(sb)operator(.)ident(append)operator(()pre_type(Integer)operator(.)ident(toString)operator(()operator(()type(int)operator(\))operator(()ident(s)operator([)ident(p)operator(])operator(&)oct(0377)operator(\))operator(,)integer(8)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(sb)operator(.)ident(append)operator(()operator(()type(char)operator(\))operator(()ident(s)operator([)ident(p)operator(])operator(&)hex(0xFF)operator(\))operator(\))operator(;) operator(}) ident(p)operator(++)operator(;) operator(}) operator(}) operator(}) comment(/** rb_reg_init_copy */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(re)operator(\)) operator({) keyword(if)operator(()local_variable(this) operator(==) ident(re)operator(\)) keyword(return) local_variable(this)operator(;) ident(checkFrozen)operator(()operator(\))operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(re)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyRegexp) ident(regexp) operator(=) operator(()ident(RubyRegexp)operator(\))ident(re)operator(;) ident(regexp)operator(.)ident(check)operator(()operator(\))operator(;) ident(initialize)operator(()ident(regexp)operator(.)ident(str)operator(,) ident(regexp)operator(.)ident(getOptions)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_set_kcode */) directive(private) type(int) ident(getKcode)operator(()operator(\)) operator({) keyword(if)operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(NONE)operator(\)) operator({) keyword(return) integer(16)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(EUC)operator(\)) operator({) keyword(return) integer(32)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(SJIS)operator(\)) operator({) keyword(return) integer(48)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(UTF8)operator(\)) operator({) keyword(return) integer(64)operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) comment(/** */) directive(private) type(void) ident(setKCode)operator(()type(int) ident(options)operator(\)) operator({) ident(clearKCodeDefault)operator(()operator(\))operator(;) keyword(switch)operator(()ident(options) operator(&) operator(~)hex(0xf)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(default)operator(:) ident(setKCodeDefault)operator(()operator(\))operator(;) ident(kcode) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getKCode)operator(()operator(\))operator(;) keyword(break)operator(;) keyword(case) integer(16)operator(:) ident(kcode) operator(=) ident(KCode)operator(.)ident(NONE)operator(;) keyword(break)operator(;) keyword(case) integer(32)operator(:) ident(kcode) operator(=) ident(KCode)operator(.)ident(EUC)operator(;) keyword(break)operator(;) keyword(case) integer(48)operator(:) ident(kcode) operator(=) ident(KCode)operator(.)ident(SJIS)operator(;) keyword(break)operator(;) keyword(case) integer(64)operator(:) ident(kcode) operator(=) ident(KCode)operator(.)ident(UTF8)operator(;) keyword(break)operator(;) operator(}) operator(}) comment(/** rb_reg_options */) directive(private) type(int) ident(getOptions)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) type(int) ident(options) operator(=) operator(()type(int)operator(\))operator(()ident(pattern)operator(.)ident(getOptions)operator(()operator(\)) operator(&) operator(()ident(RE_OPTION_IGNORECASE)operator(|)ident(RE_OPTION_MULTILINE)operator(|)ident(RE_OPTION_EXTENDED)operator(\))operator(\))operator(;) keyword(if)operator(()operator(!)ident(isKCodeDefault)operator(()operator(\))operator(\)) operator({) ident(options) operator(|=) ident(getKcode)operator(()operator(\))operator(;) operator(}) keyword(return) ident(options)operator(;) operator(}) comment(/** rb_reg_initialize_m */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(3)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize_m)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ByteList) ident(bytes)operator(;) type(int) ident(regexFlags) operator(=) integer(0)operator(;) keyword(if)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) keyword(if)operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(REGEXP_IGNORED_FLAGS)operator(,) string operator(+) operator(()ident(args)operator(.)ident(length) operator(==) integer(3) operator(?) string operator(:) stringoperator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyRegexp) ident(regexp) operator(=) operator(()ident(RubyRegexp)operator(\))ident(args)operator([)integer(0)operator(])operator(;) ident(regexp)operator(.)ident(check)operator(()operator(\))operator(;) ident(regexFlags) operator(=) operator(()type(int)operator(\))ident(regexp)operator(.)ident(pattern)operator(.)ident(getOptions)operator(()operator(\)) operator(&) hex(0xF)operator(;) keyword(if) operator(()operator(!)ident(regexp)operator(.)ident(isKCodeDefault)operator(()operator(\)) operator(&&) ident(regexp)operator(.)ident(kcode) operator(!=) pre_constant(null) operator(&&) ident(regexp)operator(.)ident(kcode) operator(!=) ident(KCode)operator(.)ident(NIL)operator(\)) operator({) keyword(if) operator(()ident(regexp)operator(.)ident(kcode) operator(==) ident(KCode)operator(.)ident(NONE)operator(\)) operator({) ident(regexFlags) operator(|=) integer(16)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(regexp)operator(.)ident(kcode) operator(==) ident(KCode)operator(.)ident(EUC)operator(\)) operator({) ident(regexFlags) operator(|=) integer(32)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(regexp)operator(.)ident(kcode) operator(==) ident(KCode)operator(.)ident(SJIS)operator(\)) operator({) ident(regexFlags) operator(|=) integer(48)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(regexp)operator(.)ident(kcode) operator(==) ident(KCode)operator(.)ident(UTF8)operator(\)) operator({) ident(regexFlags) operator(|=) integer(64)operator(;) operator(}) operator(}) ident(bytes) operator(=) ident(regexp)operator(.)ident(str)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>=) integer(2)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(regexFlags) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(1)operator(])operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(regexFlags) operator(=) ident(RE_OPTION_IGNORECASE)operator(;) operator(}) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(3) operator(&&) operator(!)ident(args)operator([)integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(ByteList) ident(kcodeBytes) operator(=) ident(args)operator([)integer(2)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) type(char) ident(first) operator(=) ident(kcodeBytes)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0) operator(?) ident(kcodeBytes)operator(.)ident(charAt)operator(()integer(0)operator(\)) operator(:) integer(0)operator(;) ident(regexFlags) operator(&=) operator(~)hex(0x70)operator(;) keyword(switch) operator(()ident(first)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(regexFlags) operator(|=) integer(16)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(regexFlags) operator(|=) integer(32)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(regexFlags) operator(|=) integer(48)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(regexFlags) operator(|=) integer(64)operator(;) keyword(break)operator(;) keyword(default)operator(:) keyword(break)operator(;) operator(}) operator(}) ident(bytes) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) ident(initialize)operator(()ident(bytes)operator(,) ident(regexFlags)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyRegexp) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyRegexp) ident(re) operator(=) operator(()ident(RubyRegexp)operator(\)) ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(re)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(re)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(options)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getOptions)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_reg_search */) directive(public) type(int) ident(search)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyString) ident(str)operator(,) type(int) ident(pos)operator(,) type(boolean) ident(reverse)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentRubyFrame)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>) ident(value)operator(.)ident(realSize) operator(||) ident(pos) operator(<) integer(0)operator(\)) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) operator(-)integer(1)operator(;) operator(}) keyword(return) ident(performSearch)operator(()ident(reverse)operator(,) ident(pos)operator(,) ident(value)operator(,) ident(frame)operator(,) ident(runtime)operator(,) ident(context)operator(,) ident(str)operator(\))operator(;) operator(}) directive(private) type(int) ident(performSearch)operator(()type(boolean) ident(reverse)operator(,) type(int) ident(pos)operator(,) ident(ByteList) ident(value)operator(,) pre_type(Frame) ident(frame)operator(,) ident(Ruby) ident(runtime)operator(,) ident(ThreadContext) ident(context)operator(,) ident(RubyString) ident(str)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) type(int) ident(realSize) operator(=) ident(value)operator(.)ident(realSize)operator(;) type(int) ident(begin) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(range) operator(=) ident(reverse) operator(?) operator(-)ident(pos) operator(:) ident(realSize) operator(-) ident(pos)operator(;) pre_type(Matcher) ident(matcher) operator(=) ident(pattern)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(begin)operator(,) ident(begin) operator(+) ident(realSize)operator(\))operator(;) type(int) ident(result) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(begin) operator(+) ident(pos)operator(,) ident(begin) operator(+) ident(pos) operator(+) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(;) keyword(if) operator(()ident(result) operator(<) integer(0)operator(\)) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) ident(updateBackRef)operator(()ident(context)operator(,) ident(str)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(final) ident(RubyMatchData) ident(updateBackRef)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyString) ident(str)operator(,) pre_type(Frame) ident(frame)operator(,) pre_type(Matcher) ident(matcher)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(backref) operator(=) ident(frame)operator(.)ident(getBackRef)operator(()operator(\))operator(;) directive(final) ident(RubyMatchData) ident(match)operator(;) keyword(if) operator(()ident(backref) operator(==) pre_constant(null) operator(||) ident(backref)operator(.)ident(isNil)operator(()operator(\)) operator(||) operator(()operator(()ident(RubyMatchData)operator(\))ident(backref)operator(\))operator(.)ident(used)operator(()operator(\))operator(\)) operator({) ident(match) operator(=) keyword(new) ident(RubyMatchData)operator(()ident(runtime)operator(\))operator(;) operator(}) keyword(else) operator({) ident(match) operator(=) operator(()ident(RubyMatchData)operator(\))ident(backref)operator(;) ident(match)operator(.)ident(setTaint)operator(()ident(runtime)operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(3)operator(\))operator(;) operator(}) ident(match)operator(.)ident(regs) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) comment(// lazy, null when no groups defined) ident(match)operator(.)ident(begin) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) ident(match)operator(.)ident(end) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) ident(match)operator(.)ident(str) operator(=) operator(()ident(RubyString)operator(\))ident(str)operator(.)ident(strDup)operator(()ident(runtime)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(match)operator(.)ident(pattern) operator(=) ident(pattern)operator(;) ident(frame)operator(.)ident(setBackRef)operator(()ident(match)operator(\))operator(;) ident(match)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) ident(match)operator(.)ident(infectBy)operator(()ident(str)operator(\))operator(;) keyword(return) ident(match)operator(;) operator(}) comment(/** rb_reg_match * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_match)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) type(int) ident(start)operator(;) keyword(if)operator(()ident(str)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) ident(start) operator(=) ident(search)operator(()ident(context)operator(,) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) keyword(if) operator(()ident(start) operator(<) integer(0)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(start)operator(\))operator(;) operator(}) comment(/** rb_reg_match_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(reads) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(match_m)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) keyword(if) operator(()ident(op_match)operator(()ident(context)operator(,) ident(str)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(IRubyObject) ident(result) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(result) keyword(instanceof) ident(RubyMatchData)operator(\)) operator({) operator(()operator(()ident(RubyMatchData)operator(\))ident(result)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(public) ident(RubyString) ident(regsub)operator(()ident(RubyString) ident(str)operator(,) ident(RubyString) ident(src)operator(,) pre_type(Matcher) ident(matcher)operator(\)) operator({) pre_type(Region) ident(regs) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) type(int) ident(mbeg) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) type(int) ident(mend) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) type(int) ident(p)operator(,)ident(s)operator(,)ident(e)operator(;) ident(p) operator(=) ident(s) operator(=) integer(0)operator(;) type(int) ident(no) operator(=) operator(-)integer(1)operator(;) ident(ByteList) ident(bs) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(ByteList) ident(srcbs) operator(=) ident(src)operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(e) operator(=) ident(bs)operator(.)ident(length)operator(()operator(\))operator(;) ident(RubyString) ident(val) operator(=) pre_constant(null)operator(;) ident(Encoding) ident(enc) operator(=) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(;) type(int) ident(beg)operator(,) ident(end)operator(;) keyword(while)operator(()ident(s) operator(<) ident(e)operator(\)) operator({) type(int) ident(ss) operator(=) ident(s)operator(;) type(char) ident(c) operator(=) ident(bs)operator(.)ident(charAt)operator(()ident(s)operator(++)operator(\))operator(;) keyword(if)operator(()ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\)) operator(!=) integer(1)operator(\)) operator({) ident(s) operator(+=) ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\)) operator(-) integer(1)operator(;) keyword(continue)operator(;) operator(}) keyword(if) operator(()ident(c) operator(!=) string operator(||) ident(s) operator(==) ident(e)operator(\)) keyword(continue)operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) ident(val) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(ss) operator(-) ident(p)operator(\))operator(\))operator(;) ident(val)operator(.)ident(cat)operator(()ident(bs)operator(.)ident(bytes)operator(,) ident(bs)operator(.)ident(begin) operator(+) ident(p)operator(,) ident(ss) operator(-) ident(p)operator(\))operator(;) ident(c) operator(=) ident(bs)operator(.)ident(charAt)operator(()ident(s)operator(++)operator(\))operator(;) ident(p) operator(=) ident(s)operator(;) keyword(switch)operator(()ident(c)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(no) operator(=) ident(c) operator(-) stringoperator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(no) operator(=) integer(0)operator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(beg) operator(=) ident(regs) operator(==) pre_constant(null) operator(?) ident(mbeg) operator(:) ident(regs)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) ident(val)operator(.)ident(cat)operator(()ident(srcbs)operator(.)ident(bytes)operator(,) ident(srcbs)operator(.)ident(begin)operator(,) ident(beg)operator(\))operator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) ident(end) operator(=) ident(regs) operator(==) pre_constant(null) operator(?) ident(mend) operator(:) ident(regs)operator(.)ident(end)operator([)integer(0)operator(])operator(;) ident(val)operator(.)ident(cat)operator(()ident(srcbs)operator(.)ident(bytes)operator(,) ident(srcbs)operator(.)ident(begin) operator(+) ident(end)operator(,) ident(src)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(-) ident(end)operator(\))operator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(mbeg) operator(==) operator(-)integer(1)operator(\)) operator({) ident(no) operator(=) integer(0)operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(else) operator({) ident(no) operator(=) ident(regs)operator(.)ident(numRegs)operator(-)integer(1)operator(;) keyword(while)operator(()ident(regs)operator(.)ident(beg)operator([)ident(no)operator(]) operator(==) operator(-)integer(1) operator(&&) ident(no) operator(>) integer(0)operator(\)) ident(no)operator(--)operator(;) keyword(if) operator(()ident(no) operator(==) integer(0)operator(\)) keyword(continue)operator(;) operator(}) keyword(break)operator(;) keyword(case) stringoperator(:) ident(val)operator(.)ident(cat)operator(()ident(bs)operator(.)ident(bytes)operator(,) ident(s) operator(-) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(continue)operator(;) keyword(default)operator(:) ident(val)operator(.)ident(cat)operator(()ident(bs)operator(.)ident(bytes)operator(,) ident(s) operator(-) integer(2)operator(,) integer(2)operator(\))operator(;) keyword(continue)operator(;) operator(}) keyword(if) operator(()ident(regs) operator(!=) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(no) operator(>=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(no) operator(>=) ident(regs)operator(.)ident(numRegs) operator(||) ident(regs)operator(.)ident(beg)operator([)ident(no)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(continue)operator(;) ident(val)operator(.)ident(cat)operator(()ident(srcbs)operator(.)ident(bytes)operator(,) ident(srcbs)operator(.)ident(begin) operator(+) ident(regs)operator(.)ident(beg)operator([)ident(no)operator(])operator(,) ident(regs)operator(.)ident(end)operator([)ident(no)operator(]) operator(-) ident(regs)operator(.)ident(beg)operator([)ident(no)operator(])operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(no) operator(!=) integer(0) operator(||) ident(mbeg) operator(==) operator(-)integer(1)operator(\)) keyword(continue)operator(;) ident(val)operator(.)ident(cat)operator(()ident(srcbs)operator(.)ident(bytes)operator(,) ident(srcbs)operator(.)ident(begin) operator(+) ident(mbeg)operator(,) ident(mend) operator(-) ident(mbeg)operator(\))operator(;) operator(}) operator(}) keyword(if)operator(()ident(p) operator(<) ident(e)operator(\)) operator({) keyword(if)operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) ident(val) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(bs)operator(.)ident(makeShared)operator(()ident(p)operator(,) ident(e)operator(-)ident(p)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(val)operator(.)ident(cat)operator(()ident(bs)operator(.)ident(bytes)operator(,) ident(bs)operator(.)ident(begin) operator(+) ident(p)operator(,) ident(e) operator(-) ident(p)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) keyword(return) ident(str)operator(;) keyword(return) ident(val)operator(;) operator(}) directive(final) type(int) ident(adjustStartPos)operator(()ident(RubyString) ident(str)operator(,) type(int) ident(pos)operator(,) type(boolean) ident(reverse)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(return) ident(pattern)operator(.)ident(adjustStartPosition)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(value)operator(.)ident(realSize)operator(,) ident(pos)operator(,) ident(reverse)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(casefold_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(()ident(pattern)operator(.)ident(getOptions)operator(()operator(\)) operator(&) ident(RE_OPTION_IGNORECASE)operator(\)) operator(!=) integer(0)operator(\))operator(;) operator(}) comment(/** rb_reg_source * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(source)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(check)operator(()operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(runtime)operator(,) local_variable(this)operator(.)ident(str)operator(\))operator(;) keyword(if)operator(()ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(str)operator(.)ident(taint)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(str)operator(;) operator(}) directive(final) type(int) ident(length)operator(()operator(\)) operator({) keyword(return) ident(str)operator(.)ident(realSize)operator(;) operator(}) comment(/** rb_reg_inspect * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(ByteList)operator(.)ident(create)operator(()ident(rb_reg_desc)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(str)operator(.)ident(begin)operator(,) ident(str)operator(.)ident(realSize)operator(,) ident(pattern)operator(.)ident(getOptions)operator(()operator(\))operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) directive(private) directive(final) directive(static) type(int) ident(EMBEDDABLE) operator(=) ident(RE_OPTION_MULTILINE)operator(|)ident(RE_OPTION_IGNORECASE)operator(|)ident(RE_OPTION_EXTENDED)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) ident(RubyString) ident(ss) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(check)operator(()operator(\))operator(;) type(int) ident(options) operator(=) ident(pattern)operator(.)ident(getOptions)operator(()operator(\))operator(;) type(int) ident(ptr) operator(=) ident(str)operator(.)ident(begin)operator(;) type(int) ident(len) operator(=) ident(str)operator(.)ident(realSize)operator(;) type(byte)type([]) ident(bytes) operator(=) ident(str)operator(.)ident(bytes)operator(;) ident(again)operator(:) keyword(do) operator({) keyword(if) operator(()ident(len) operator(>=) integer(4) operator(&&) ident(bytes)operator([)ident(ptr)operator(]) operator(==) string operator(&&) ident(bytes)operator([)ident(ptr) operator(+) integer(1)operator(]) operator(==) stringoperator(\)) operator({) type(boolean) ident(err) operator(=) pre_constant(true)operator(;) ident(ptr) operator(+=) integer(2)operator(;) keyword(if) operator(()operator(()ident(len) operator(-=) integer(2)operator(\)) operator(>) integer(0)operator(\)) operator({) keyword(do) operator({) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(|=) ident(RE_OPTION_MULTILINE)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(|=) ident(RE_OPTION_IGNORECASE)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(|=) ident(RE_OPTION_EXTENDED)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) ident(ptr)operator(++)operator(;) operator(}) keyword(while)operator(()operator(--)ident(len) operator(>) integer(0)operator(\))operator(;) operator(}) keyword(if) operator(()ident(len) operator(>) integer(1) operator(&&) ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) operator(++)ident(ptr)operator(;) operator(--)ident(len)operator(;) keyword(do) operator({) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(&=) operator(~)ident(RE_OPTION_MULTILINE)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(&=) operator(~)ident(RE_OPTION_IGNORECASE)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) ident(options) operator(&=) operator(~)ident(RE_OPTION_EXTENDED)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) ident(ptr)operator(++)operator(;) operator(}) keyword(while)operator(()operator(--)ident(len) operator(>) integer(0)operator(\))operator(;) operator(}) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) stringoperator(\)) operator({) operator(--)ident(len)operator(;) operator(++)ident(ptr)operator(;) keyword(continue) ident(again)operator(;) operator(}) keyword(if) operator(()ident(bytes)operator([)ident(ptr)operator(]) operator(==) string operator(&&) ident(bytes)operator([)ident(ptr) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) stringoperator(\)) operator({) keyword(try) operator({) keyword(new) ident(Regex)operator(()ident(bytes)operator(,) operator(++)ident(ptr)operator(,) ident(ptr) operator(+) operator(()ident(len)operator(-=)integer(2)operator(\)) operator(,)pre_type(Option)operator(.)ident(DEFAULT)operator(,) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(,) ident(Syntax)operator(.)ident(DEFAULT)operator(\))operator(;) ident(err) operator(=) pre_constant(false)operator(;) operator(}) keyword(catch) operator(()ident(JOniException) ident(e)operator(\)) operator({) ident(err) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(if) operator(()ident(err)operator(\)) operator({) ident(options) operator(=) operator(()type(int)operator(\))ident(pattern)operator(.)ident(getOptions)operator(()operator(\))operator(;) ident(ptr) operator(=) ident(str)operator(.)ident(begin)operator(;) ident(len) operator(=) ident(str)operator(.)ident(realSize)operator(;) operator(}) operator(}) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_MULTILINE)operator(\)) operator(!=)integer(0) operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_IGNORECASE)operator(\)) operator(!=)integer(0) operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_EXTENDED)operator(\)) operator(!=)integer(0) operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(EMBEDDABLE)operator(\)) operator(!=) ident(EMBEDDABLE)operator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_MULTILINE)operator(\)) operator(==) integer(0)operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_IGNORECASE)operator(\)) operator(==) integer(0)operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) keyword(if) operator(()operator(()ident(options) operator(&) ident(RE_OPTION_EXTENDED)operator(\)) operator(==) integer(0)operator(\)) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) operator(}) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(rb_reg_expr_str)operator(()ident(ss)operator(,) ident(ptr)operator(,) ident(len)operator(\))operator(;) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(ss)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(ss)operator(;) operator(}) keyword(while)operator(()pre_constant(true)operator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(rb_reg_expr_str)operator(()ident(RubyString) ident(ss)operator(,) type(int) ident(s)operator(,) type(int) ident(len)operator(\)) operator({) type(int) ident(p) operator(=) ident(s)operator(;) type(int) ident(pend) operator(=) ident(p) operator(+) ident(len)operator(;) type(boolean) ident(need_escape) operator(=) pre_constant(false)operator(;) ident(Encoding) ident(enc) operator(=) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(;) keyword(while) operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) keyword(if) operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(==) string operator(||) operator(()operator(!)ident(enc)operator(.)ident(isPrint)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(&) hex(0xff)operator(\)) operator(&&) ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(])operator(\)) operator(==) integer(1)operator(\))operator(\)) operator({) ident(need_escape) operator(=) pre_constant(true)operator(;) keyword(break)operator(;) operator(}) ident(p) operator(+=) ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(need_escape)operator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(s)operator(,) ident(len)operator(\))operator(;) operator(}) keyword(else) operator({) ident(p) operator(=) ident(s)operator(;) keyword(while) operator(()ident(p)operator(<)ident(pend)operator(\)) operator({) keyword(if) operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) type(int) ident(n) operator(=) ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(+)integer(1)operator(])operator(\)) operator(+) integer(1)operator(;) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(p)operator(,) ident(n)operator(\))operator(;) ident(p) operator(+=) ident(n)operator(;) keyword(continue)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(p)operator(,) integer(1)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(])operator(\)) operator(!=) integer(1)operator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(p)operator(,) ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(])operator(\))operator(\))operator(;) ident(p) operator(+=) ident(enc)operator(.)ident(length)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(])operator(\))operator(;) keyword(continue)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(enc)operator(.)ident(isPrint)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(&) hex(0xff)operator(\))operator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,)ident(p)operator(,)integer(1)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)ident(enc)operator(.)ident(isSpace)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(&) hex(0xff)operator(\))operator(\)) operator({) ident(ss)operator(.)ident(cat)operator(()ident(ByteList)operator(.)ident(create)operator(()pre_type(Integer)operator(.)ident(toString)operator(()ident(str)operator(.)ident(bytes)operator([)ident(p)operator(]) operator(&) oct(0377)operator(,) integer(8)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(ss)operator(.)ident(cat)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(p)operator(,) integer(1)operator(\))operator(;) operator(}) ident(p)operator(++)operator(;) operator(}) operator(}) operator(}) comment(/** rb_reg_s_quote * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyString) ident(quote)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(kcode) operator(=) ident(args)operator(.)ident(length) operator(==) integer(2) operator(?) ident(args)operator([)integer(1)operator(]) operator(:) pre_constant(null)operator(;) ident(IRubyObject) ident(str) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(KCode) ident(code) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getKCode)operator(()operator(\))operator(;) keyword(if) operator(()ident(kcode) operator(!=) pre_constant(null) operator(&&) operator(!)ident(kcode)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(code) operator(=) ident(KCode)operator(.)ident(create)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(kcode)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) ident(RubyString) ident(src) operator(=) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(RubyString) ident(dst) operator(=) ident(RubyString)operator(.)ident(newString)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(quote)operator(()ident(src)operator(.)ident(getByteList)operator(()operator(\))operator(,) ident(code)operator(\))operator(\))operator(;) ident(dst)operator(.)ident(infectBy)operator(()ident(src)operator(\))operator(;) keyword(return) ident(dst)operator(;) operator(}) comment(/** rb_reg_quote * */) directive(public) directive(static) ident(ByteList) ident(quote)operator(()ident(ByteList) ident(str)operator(,) ident(KCode) ident(kcode)operator(\)) operator({) ident(ByteList) ident(bs) operator(=) ident(str)operator(;) type(int) ident(tix) operator(=) integer(0)operator(;) type(int) ident(s) operator(=) ident(bs)operator(.)ident(begin)operator(;) type(char) ident(c)operator(;) type(int) ident(send) operator(=) ident(s)operator(+)ident(bs)operator(.)ident(length)operator(()operator(\))operator(;) ident(Encoding) ident(enc) operator(=) ident(kcode)operator(.)ident(getEncoding)operator(()operator(\))operator(;) ident(meta_found)operator(:) keyword(do) operator({) keyword(for)operator(()operator(;) ident(s)operator(<)ident(send)operator(;) ident(s)operator(++)operator(\)) operator({) ident(c) operator(=) operator(()type(char)operator(\))operator(()ident(bs)operator(.)ident(bytes)operator([)ident(s)operator(])operator(&)hex(0xFF)operator(\))operator(;) keyword(if)operator(()ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\)) operator(!=) integer(1)operator(\)) operator({) type(int) ident(n) operator(=) ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\))operator(;) keyword(while)operator(()ident(n)operator(--) operator(>) integer(0) operator(&&) ident(s) operator(<) ident(send)operator(\)) operator({) ident(s)operator(++)operator(;) operator(}) ident(s)operator(--)operator(;) keyword(continue)operator(;) operator(}) keyword(switch) operator(()ident(c)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(break) ident(meta_found)operator(;) operator(}) operator(}) keyword(return) ident(bs)operator(;) operator(}) keyword(while)operator(()pre_constant(false)operator(\))operator(;) ident(ByteList) ident(b1) operator(=) keyword(new) ident(ByteList)operator(()ident(send)operator(*)integer(2)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(bs)operator(.)ident(bytes)operator(,)ident(bs)operator(.)ident(begin)operator(,)ident(b1)operator(.)ident(bytes)operator(,)ident(b1)operator(.)ident(begin)operator(,)ident(s)operator(-)ident(bs)operator(.)ident(begin)operator(\))operator(;) ident(tix) operator(+=) operator(()ident(s)operator(-)ident(bs)operator(.)ident(begin)operator(\))operator(;) keyword(for)operator(()operator(;) ident(s)operator(<)ident(send)operator(;) ident(s)operator(++)operator(\)) operator({) ident(c) operator(=) operator(()type(char)operator(\))operator(()ident(bs)operator(.)ident(bytes)operator([)ident(s)operator(])operator(&)hex(0xFF)operator(\))operator(;) keyword(if)operator(()ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\)) operator(!=) integer(1)operator(\)) operator({) type(int) ident(n) operator(=) ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\))operator(;) keyword(while)operator(()ident(n)operator(--) operator(>) integer(0) operator(&&) ident(s) operator(<) ident(send)operator(\)) operator({) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) ident(bs)operator(.)ident(bytes)operator([)ident(s)operator(++)operator(])operator(;) operator(}) ident(s)operator(--)operator(;) keyword(continue)operator(;) operator(}) keyword(switch)operator(()ident(c)operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(break)operator(;) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(continue)operator(;) keyword(case) stringoperator(:) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) stringoperator(;) keyword(continue)operator(;) operator(}) ident(b1)operator(.)ident(bytes)operator([)ident(tix)operator(++)operator(]) operator(=) operator(()type(byte)operator(\))ident(c)operator(;) operator(}) ident(b1)operator(.)ident(realSize) operator(=) ident(tix)operator(;) keyword(return) ident(b1)operator(;) operator(}) comment(/** rb_reg_nth_match * */) directive(public) directive(static) ident(IRubyObject) ident(nth_match)operator(()type(int) ident(nth)operator(,) ident(IRubyObject) ident(match)operator(\)) operator({) keyword(if) operator(()ident(match)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(match)operator(;) ident(RubyMatchData) ident(m) operator(=) operator(()ident(RubyMatchData)operator(\))ident(match)operator(;) type(int) ident(start)operator(,) ident(end)operator(;) keyword(if) operator(()ident(m)operator(.)ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(nth) operator(>=) integer(1)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(nth) operator(<) integer(0) operator(&&) operator(++)ident(nth) operator(<=) integer(0)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(start) operator(=) ident(m)operator(.)ident(begin)operator(;) ident(end) operator(=) ident(m)operator(.)ident(end)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(nth) operator(>=) ident(m)operator(.)ident(regs)operator(.)ident(numRegs)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(nth) operator(<) integer(0) operator(&&) operator(()ident(nth)operator(+=)ident(m)operator(.)ident(regs)operator(.)ident(numRegs)operator(\)) operator(<=) integer(0)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(start) operator(=) ident(m)operator(.)ident(regs)operator(.)ident(beg)operator([)ident(nth)operator(])operator(;) ident(end) operator(=) ident(m)operator(.)ident(regs)operator(.)ident(end)operator([)ident(nth)operator(])operator(;) operator(}) keyword(if) operator(()ident(start) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(m)operator(.)ident(str)operator(.)ident(makeShared)operator(()ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(start)operator(,) ident(end) operator(-) ident(start)operator(\))operator(;) ident(str)operator(.)ident(infectBy)operator(()ident(match)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_reg_last_match * */) directive(public) directive(static) ident(IRubyObject) ident(last_match)operator(()ident(IRubyObject) ident(match)operator(\)) operator({) keyword(return) ident(nth_match)operator(()integer(0)operator(,) ident(match)operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) directive(static) ident(IRubyObject) ident(last_match_s)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(last_match_s)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(last_match_s)operator(()ident(context)operator(,) ident(recv)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_reg_s_last_match / match_getter * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(last_match_s)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(IRubyObject) ident(match) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(match) keyword(instanceof) ident(RubyMatchData)operator(\)) operator(()operator(()ident(RubyMatchData)operator(\))ident(match)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) keyword(return) ident(match)operator(;) operator(}) comment(/** rb_reg_s_last_match * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(last_match_s)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(nth)operator(\)) operator({) ident(IRubyObject) ident(match) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(match)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(match)operator(;) keyword(return) ident(nth_match)operator(()operator(()operator(()ident(RubyMatchData)operator(\))ident(match)operator(\))operator(.)ident(backrefNumber)operator(()ident(nth)operator(\))operator(,) ident(match)operator(\))operator(;) operator(}) comment(/** rb_reg_match_pre * */) directive(public) directive(static) ident(IRubyObject) ident(match_pre)operator(()ident(IRubyObject) ident(match)operator(\)) operator({) keyword(if) operator(()ident(match)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(match)operator(;) ident(RubyMatchData) ident(m) operator(=) operator(()ident(RubyMatchData)operator(\))ident(match)operator(;) type(int) ident(beg) operator(=) ident(m)operator(.)ident(regs) operator(==) pre_constant(null) operator(?) ident(m)operator(.)ident(begin) operator(:) ident(m)operator(.)ident(regs)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) keyword(if)operator(()ident(beg) operator(==) operator(-)integer(1)operator(\)) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(RubyString) ident(str) operator(=) ident(m)operator(.)ident(str)operator(.)ident(makeShared)operator(()ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(0)operator(,) ident(beg)operator(\))operator(;) ident(str)operator(.)ident(infectBy)operator(()ident(match)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_reg_match_post * */) directive(public) directive(static) ident(IRubyObject) ident(match_post)operator(()ident(IRubyObject) ident(match)operator(\)) operator({) keyword(if) operator(()ident(match)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(match)operator(;) ident(RubyMatchData) ident(m) operator(=) operator(()ident(RubyMatchData)operator(\))ident(match)operator(;) type(int) ident(end)operator(;) keyword(if) operator(()ident(m)operator(.)ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(m)operator(.)ident(begin) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(end) operator(=) ident(m)operator(.)ident(end)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(m)operator(.)ident(regs)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(end) operator(=) ident(m)operator(.)ident(regs)operator(.)ident(end)operator([)integer(0)operator(])operator(;) operator(}) ident(RubyString) ident(str) operator(=) ident(m)operator(.)ident(str)operator(.)ident(makeShared)operator(()ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(end)operator(,) ident(m)operator(.)ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(-) ident(end)operator(\))operator(;) ident(str)operator(.)ident(infectBy)operator(()ident(match)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_reg_match_last * */) directive(public) directive(static) ident(IRubyObject) ident(match_last)operator(()ident(IRubyObject) ident(match)operator(\)) operator({) keyword(if) operator(()ident(match)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(match)operator(;) ident(RubyMatchData) ident(m) operator(=) operator(()ident(RubyMatchData)operator(\))ident(match)operator(;) keyword(if) operator(()ident(m)operator(.)ident(regs) operator(==) pre_constant(null) operator(||) ident(m)operator(.)ident(regs)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(i)operator(;) keyword(for) operator(()ident(i)operator(=)ident(m)operator(.)ident(regs)operator(.)ident(numRegs)operator(-)integer(1)operator(;) ident(m)operator(.)ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(==)operator(-)integer(1) operator(&&) ident(i)operator(>)integer(0)operator(;) ident(i)operator(--)operator(\))operator(;) keyword(if) operator(()ident(i) operator(==) integer(0)operator(\)) keyword(return) ident(match)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(nth_match)operator(()ident(i)operator(,)ident(match)operator(\))operator(;) operator(}) comment(/** rb_reg_s_union * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(union)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(newRegexp)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(ByteList)operator(.)ident(create)operator(()stringoperator(\))operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(IRubyObject) ident(v) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRegexp)operator(()operator(\))operator(,) integer(0)operator(,) stringoperator(\))operator(;) keyword(if)operator(()operator(!)ident(v)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(v)operator(;) operator(}) keyword(else) operator({) comment(// newInstance here) keyword(return) ident(newRegexp)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(quote)operator(()ident(recv)operator(,)ident(args)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(KCode) ident(kcode) operator(=) pre_constant(null)operator(;) ident(IRubyObject) ident(kcode_re) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(RubyString) ident(source) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()operator(\))operator(;) ident(IRubyObject)type([]) ident(_args) operator(=) keyword(new) ident(IRubyObject)operator([)integer(3)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()integer(0) operator(<) ident(i)operator(\)) operator({) ident(source)operator(.)ident(cat)operator(()operator(()type(byte)operator(\))stringoperator(\))operator(;) operator(}) ident(IRubyObject) ident(v) operator(=) ident(TypeConverter)operator(.)ident(convertToTypeWithCheck)operator(()ident(args)operator([)ident(i)operator(])operator(,) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getRegexp)operator(()operator(\))operator(,) integer(0)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(v)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)operator(()operator(()ident(RubyRegexp)operator(\))ident(v)operator(\))operator(.)ident(isKCodeDefault)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(kcode) operator(==) pre_constant(null)operator(\)) operator({) ident(kcode_re) operator(=) ident(v)operator(;) ident(kcode) operator(=) operator(()operator(()ident(RubyRegexp)operator(\))ident(v)operator(\))operator(.)ident(kcode)operator(;) operator(}) keyword(else) keyword(if) operator(()operator(()operator(()ident(RubyRegexp)operator(\))ident(v)operator(\))operator(.)ident(kcode) operator(!=) ident(kcode)operator(\)) operator({) ident(IRubyObject) ident(str1) operator(=) ident(kcode_re)operator(.)ident(inspect)operator(()operator(\))operator(;) ident(IRubyObject) ident(str2) operator(=) ident(v)operator(.)ident(inspect)operator(()operator(\))operator(;) keyword(throw) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(str1) operator(+) string operator(+) ident(str2)operator(\))operator(;) operator(}) operator(}) ident(v) operator(=) operator(()operator(()ident(RubyRegexp)operator(\))ident(v)operator(\))operator(.)ident(to_s)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(v) operator(=) ident(quote)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(args)operator([)ident(i)operator(])operator(})operator(\))operator(;) operator(}) ident(source)operator(.)ident(append)operator(()ident(v)operator(\))operator(;) operator(}) ident(_args)operator([)integer(0)operator(]) operator(=) ident(source)operator(;) ident(_args)operator([)integer(1)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(kcode) operator(==) pre_constant(null)operator(\)) operator({) ident(_args)operator([)integer(2)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(NONE)operator(\)) operator({) ident(_args)operator([)integer(2)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(EUC)operator(\)) operator({) ident(_args)operator([)integer(2)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(SJIS)operator(\)) operator({) ident(_args)operator([)integer(2)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(kcode) operator(==) ident(KCode)operator(.)ident(UTF8)operator(\)) operator({) ident(_args)operator([)integer(2)operator(]) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(_args)operator(\))operator(;) operator(}) operator(}) comment(/** rb_reg_names * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(names)operator(()operator(\)) operator({) keyword(if) operator(()ident(pattern)operator(.)ident(numberOfNames)operator(()operator(\)) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newEmptyArray)operator(()operator(\))operator(;) ident(RubyArray) ident(ary) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(pattern)operator(.)ident(numberOfNames)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()pre_type(Iterator)operator(<)ident(NameEntry)operator(>) ident(i) operator(=) ident(pattern)operator(.)ident(namedBackrefIterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(NameEntry) ident(e) operator(=) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) ident(ary)operator(.)ident(append)operator(()ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(e)operator(.)ident(name)operator(,) ident(e)operator(.)ident(nameP)operator(,) ident(e)operator(.)ident(nameEnd) operator(-) ident(e)operator(.)ident(nameP)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(ary)operator(;) operator(}) comment(/** rb_reg_named_captures * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(named_captures)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyHash) ident(hash) operator(=) ident(RubyHash)operator(.)ident(newHash)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(pattern)operator(.)ident(numberOfNames)operator(()operator(\)) operator(==) integer(0)operator(\)) keyword(return) ident(hash)operator(;) keyword(for) operator(()pre_type(Iterator)operator(<)ident(NameEntry)operator(>) ident(i) operator(=) ident(pattern)operator(.)ident(namedBackrefIterator)operator(()operator(\))operator(;) ident(i)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(NameEntry) ident(e) operator(=) ident(i)operator(.)ident(next)operator(()operator(\))operator(;) type(int)type([])ident(backrefs) operator(=) ident(e)operator(.)ident(getBackRefs)operator(()operator(\))operator(;) ident(RubyArray) ident(ary) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(backrefs)operator(.)ident(length)operator(\))operator(;) keyword(for) operator(()type(int) ident(backref) operator(:) ident(backrefs)operator(\)) ident(ary)operator(.)ident(append)operator(()ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(backref)operator(\))operator(\))operator(;) ident(hash)operator(.)ident(fastASet)operator(()ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(e)operator(.)ident(name)operator(,) ident(e)operator(.)ident(nameP)operator(,) ident(e)operator(.)ident(nameEnd) operator(-) ident(e)operator(.)ident(nameP)operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(,) ident(ary)operator(\))operator(;) operator(}) keyword(return) ident(hash)operator(;) operator(}) directive(public) directive(static) ident(RubyRegexp) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(RubyRegexp) ident(result) operator(=) ident(newRegexp)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(,) ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyRegexp) ident(regexp)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(regexp)operator(\))operator(;) ident(output)operator(.)ident(writeString)operator(()keyword(new) pre_type(String)operator(()ident(regexp)operator(.)ident(str)operator(.)ident(bytes)operator(,)ident(regexp)operator(.)ident(str)operator(.)ident(begin)operator(,)ident(regexp)operator(.)ident(str)operator(.)ident(realSize)operator(\))operator(\))operator(;) ident(output)operator(.)ident(writeInt)operator(()ident(regexp)operator(.)ident(pattern)operator(.)ident(getOptions)operator(()operator(\)) operator(&) ident(EMBEDDABLE)operator(\))operator(;) operator(}) operator(}) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * * @author nicksieger */) directive(public) type(interface) class(RubyRuntimeAdapter) operator({) ident(IRubyObject) ident(eval)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(script)operator(\))operator(;) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.CallType)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.SignalFacade)operator(;) keyword(import) include(org.jruby.util.NoFunctionalitySignalFacade)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubySignal) operator({) directive(private) directive(final) directive(static) ident(SignalFacade) ident(SIGNALS) operator(=) ident(getSignalFacade)operator(()operator(\))operator(;) directive(private) directive(final) directive(static) ident(SignalFacade) ident(getSignalFacade)operator(()operator(\)) operator({) keyword(try) operator({) pre_type(Class) ident(realFacadeClass) operator(=) pre_type(Class)operator(.)ident(forName)operator(()stringoperator(\))operator(;) keyword(return) operator(()ident(SignalFacade)operator(\))ident(realFacadeClass)operator(.)ident(newInstance)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()pre_type(Throwable) ident(e)operator(\)) operator({) keyword(return) keyword(new) ident(NoFunctionalitySignalFacade)operator(()operator(\))operator(;) operator(}) operator(}) comment(// NOTE: The indicies here match exactly the signal values; do not reorder) directive(public) directive(static) directive(final) pre_type(String)type([]) ident(NAMES) operator(=) operator({) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(;) directive(public) directive(static) type(void) ident(createSignal)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(mSignal) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(mSignal)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubySignal)operator(.)ident(class)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(trap)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getLoadService)operator(()operator(\))operator(.)ident(require)operator(()stringoperator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(,) stringoperator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(list)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyHash) ident(names) operator(=) ident(RubyHash)operator(.)ident(newHash)operator(()ident(runtime)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(NAMES)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(names)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(NAMES)operator([)ident(i)operator(])operator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(\))operator(;) operator(}) comment(// IOT is also 6) ident(names)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(6)operator(\))operator(\))operator(;) comment(// CLD is also 20) ident(names)operator(.)ident(op_aset)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()integer(20)operator(\))operator(\))operator(;) keyword(return) ident(names)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(3)operator(,)ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(__jtrap_kernel)operator(()directive(final) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(,) ident(IRubyObject) ident(arg3)operator(\)) operator({) keyword(return) ident(SIGNALS)operator(.)ident(trap)operator(()ident(recv)operator(,) ident(arg1)operator(,) ident(arg2)operator(,) ident(arg3)operator(\))operator(;) operator(}) operator(})comment(// RubySignal) comment(/* **** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2002 Benoit Cerrina * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2006 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2004 David Corbin * Copyright (C\) 2005 Tim Azzopardi * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2007 Nick Sieger * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(static) include(org.jruby.anno.FrameField.BACKREF)operator(;) keyword(import) include(static) include(org.jruby.anno.FrameField.LASTLINE)operator(;) keyword(import) include(java.io.UnsupportedEncodingException)operator(;) keyword(import) include(java.util.Locale)operator(;) keyword(import) include(org.joni.Matcher)operator(;) keyword(import) include(org.joni.Option)operator(;) keyword(import) include(org.joni.Regex)operator(;) keyword(import) include(org.joni.Region)operator(;) keyword(import) include(org.joni.encoding.Encoding)operator(;) keyword(import) include(org.joni.encoding.specific.ASCIIEncoding)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.java.MiniJava)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.Numeric)operator(;) keyword(import) include(org.jruby.util.Pack)operator(;) keyword(import) include(org.jruby.util.Sprintf)operator(;) keyword(import) include(org.jruby.util.string.JavaCrypt)operator(;) comment(/** * Implementation of Ruby String class * * Concurrency: no synchronization is required among readers, but * all users must synchronize externally with writers. * */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) type(class) class(RubyString) directive(extends) ident(RubyObject) operator({) directive(private) directive(static) directive(final) ident(ASCIIEncoding) ident(ASCII) operator(=) ident(ASCIIEncoding)operator(.)ident(INSTANCE)operator(;) comment(// string doesn't share any resources) directive(private) directive(static) directive(final) type(int) ident(SHARE_LEVEL_NONE) operator(=) integer(0)operator(;) comment(// string has it's own ByteList, but it's pointing to a shared buffer (byte[]\)) directive(private) directive(static) directive(final) type(int) ident(SHARE_LEVEL_BUFFER) operator(=) integer(1)operator(;) comment(// string doesn't have it's own ByteList (values\)) directive(private) directive(static) directive(final) type(int) ident(SHARE_LEVEL_BYTELIST) operator(=) integer(2)operator(;) directive(private) directive(volatile) type(int) ident(shareLevel) operator(=) ident(SHARE_LEVEL_NONE)operator(;) directive(private) ident(ByteList) ident(value)operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(STRING_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createStringClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(stringClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(STRING_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setString)operator(()ident(stringClass)operator(\))operator(;) ident(stringClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(STRING)operator(;) ident(stringClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) annotation(@Override) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubyString)operator(;) operator(}) operator(})operator(;) ident(stringClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getComparable)operator(()operator(\))operator(\))operator(;) ident(stringClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(stringClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyString)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(stringClass)operator(;) operator(}) comment(/** short circuit for String key comparison * */) annotation(@Override) directive(public) directive(final) type(boolean) ident(eql)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other)operator(.)ident(getMetaClass)operator(()operator(\)) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getString)operator(()operator(\))operator(\)) keyword(return) ident(value)operator(.)ident(equal)operator(()operator(()operator(()ident(RubyString)operator(\))ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) keyword(return) local_variable(super)operator(.)ident(eql)operator(()ident(other)operator(\))operator(;) operator(}) directive(private) ident(RubyString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(CharSequence) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) keyword(assert) ident(value) operator(!=) pre_constant(null)operator(;) local_variable(this)operator(.)ident(value) operator(=) keyword(new) ident(ByteList)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(value)operator(\))operator(,) pre_constant(false)operator(\))operator(;) operator(}) directive(private) ident(RubyString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) type(byte)type([]) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) keyword(assert) ident(value) operator(!=) pre_constant(null)operator(;) local_variable(this)operator(.)ident(value) operator(=) keyword(new) ident(ByteList)operator(()ident(value)operator(\))operator(;) operator(}) directive(private) ident(RubyString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) ident(ByteList) ident(value)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) keyword(assert) ident(value) operator(!=) pre_constant(null)operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) directive(private) ident(RubyString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) ident(ByteList) ident(value)operator(,) type(boolean) ident(objectSpace)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) ident(objectSpace)operator(\))operator(;) keyword(assert) ident(value) operator(!=) pre_constant(null)operator(;) local_variable(this)operator(.)ident(value) operator(=) ident(value)operator(;) operator(}) comment(/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */) directive(public) ident(RubyString) ident(newString)operator(()pre_type(CharSequence) ident(s)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getType)operator(()operator(\))operator(,) ident(s)operator(\))operator(;) operator(}) comment(/** Create a new String which uses the same Ruby runtime and the same * class like this String. * * This method should be used to satisfy RCR #38. * @deprecated */) directive(public) ident(RubyString) ident(newString)operator(()ident(ByteList) ident(s)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(s)operator(\))operator(;) operator(}) comment(// Methods of the String class (rb_str_*\):) comment(/** rb_str_new2 * */) directive(public) directive(static) ident(RubyString) ident(newString)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(CharSequence) ident(str)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(str)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newEmptyString)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(newEmptyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newEmptyString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(metaClass)operator(\)) operator({) ident(RubyString) ident(empty) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(metaClass)operator(,) ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(\))operator(;) ident(empty)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) keyword(return) ident(empty)operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newUnicodeString)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(str)operator(\)) operator({) keyword(try) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(str)operator(.)ident(getBytes)operator(()stringoperator(\))operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(UnsupportedEncodingException) ident(uee)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(str)operator(\))operator(;) operator(}) operator(}) annotation(@Deprecated) directive(public) directive(static) ident(RubyString) ident(newString)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(clazz)operator(,) pre_type(CharSequence) ident(str)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(clazz)operator(,) ident(str)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newString)operator(()ident(Ruby) ident(runtime)operator(,) type(byte)type([]) ident(bytes)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(bytes)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newString)operator(()ident(Ruby) ident(runtime)operator(,) type(byte)type([]) ident(bytes)operator(,) type(int) ident(start)operator(,) type(int) ident(length)operator(\)) operator({) type(byte)type([]) ident(copy) operator(=) keyword(new) type(byte)operator([)ident(length)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(bytes)operator(,) ident(start)operator(,) ident(copy)operator(,) integer(0)operator(,) ident(length)operator(\))operator(;) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(copy)operator(,) pre_constant(false)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newString)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(bytes)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(bytes)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newStringLight)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(bytes)operator(\)) operator({) keyword(return) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(bytes)operator(,) pre_constant(false)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newStringShared)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyString) ident(orig)operator(\)) operator({) ident(orig)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) ident(RubyString) ident(str) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(orig)operator(.)ident(value)operator(\))operator(;) ident(str)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) keyword(return) ident(str)operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newStringShared)operator(()ident(Ruby) ident(runtime)operator(,) ident(ByteList) ident(bytes)operator(\)) operator({) keyword(return) ident(newStringShared)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) ident(bytes)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newStringShared)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(clazz)operator(,) ident(ByteList) ident(bytes)operator(\)) operator({) ident(RubyString) ident(str) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(clazz)operator(,) ident(bytes)operator(\))operator(;) ident(str)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) keyword(return) ident(str)operator(;) operator(}) directive(public) directive(static) ident(RubyString) ident(newStringShared)operator(()ident(Ruby) ident(runtime)operator(,) type(byte)type([]) ident(bytes)operator(,) type(int) ident(start)operator(,) type(int) ident(length)operator(\)) operator({) ident(RubyString) ident(str) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(bytes)operator(,) ident(start)operator(,) ident(length)operator(,) pre_constant(false)operator(\))operator(\))operator(;) ident(str)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BUFFER)operator(;) keyword(return) ident(str)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(STRING)operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) pre_type(String)operator(.)ident(class)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyString) ident(convertToString)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) pre_type(String) ident(toString)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_dup * */) annotation(@Deprecated) directive(public) directive(final) ident(RubyString) ident(strDup)operator(()operator(\)) operator({) keyword(return) ident(strDup)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(final) ident(RubyString) ident(strDup)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) ident(strDup)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Deprecated) directive(final) ident(RubyString) ident(strDup)operator(()ident(RubyClass) ident(clazz)operator(\)) operator({) keyword(return) ident(strDup)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) operator(}) directive(final) ident(RubyString) ident(strDup)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(clazz)operator(\)) operator({) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) ident(RubyString) ident(dup) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(clazz)operator(,) ident(value)operator(\))operator(;) ident(dup)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) ident(dup)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(dup)operator(;) operator(}) directive(public) directive(final) ident(RubyString) ident(makeShared)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(index)operator(,) type(int) ident(len)operator(\)) operator({) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(s)operator(;) operator(}) keyword(if) operator(()ident(shareLevel) operator(==) ident(SHARE_LEVEL_NONE)operator(\)) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BUFFER)operator(;) ident(RubyString) ident(shared) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(value)operator(.)ident(makeShared)operator(()ident(index)operator(,) ident(len)operator(\))operator(\))operator(;) ident(shared)operator(.)ident(shareLevel) operator(=) ident(SHARE_LEVEL_BUFFER)operator(;) ident(shared)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(shared)operator(;) operator(}) directive(final) type(void) ident(modifyCheck)operator(()operator(\)) operator({) keyword(if) operator(()operator(()ident(flags) operator(&) ident(FROZEN_F)operator(\)) operator(!=) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newFrozenError)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(private) directive(final) type(void) ident(modifyCheck)operator(()type(byte)type([]) ident(b)operator(,) type(int) ident(len)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(bytes) operator(!=) ident(b) operator(||) ident(value)operator(.)ident(realSize) operator(!=) ident(len)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(()stringoperator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(frozenCheck)operator(()operator(\)) operator({) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(()stringoperator(\))operator(;) operator(}) comment(/** rb_str_modify * */) directive(public) directive(final) type(void) ident(modify)operator(()operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if) operator(()ident(shareLevel) operator(!=) ident(SHARE_LEVEL_NONE)operator(\)) operator({) keyword(if) operator(()ident(shareLevel) operator(==) ident(SHARE_LEVEL_BYTELIST)operator(\)) operator({) ident(value) operator(=) ident(value)operator(.)ident(dup)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(value)operator(.)ident(unshare)operator(()operator(\))operator(;) operator(}) ident(shareLevel) operator(=) ident(SHARE_LEVEL_NONE)operator(;) operator(}) ident(value)operator(.)ident(invalidate)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_modify (with length bytes ensured\) * */) directive(public) directive(final) type(void) ident(modify)operator(()type(int) ident(length)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if) operator(()ident(shareLevel) operator(!=) ident(SHARE_LEVEL_NONE)operator(\)) operator({) keyword(if) operator(()ident(shareLevel) operator(==) ident(SHARE_LEVEL_BYTELIST)operator(\)) operator({) ident(value) operator(=) ident(value)operator(.)ident(dup)operator(()ident(length)operator(\))operator(;) operator(}) keyword(else) operator({) ident(value)operator(.)ident(unshare)operator(()ident(length)operator(\))operator(;) operator(}) ident(shareLevel) operator(=) ident(SHARE_LEVEL_NONE)operator(;) operator(}) keyword(else) operator({) ident(value)operator(.)ident(ensure)operator(()ident(length)operator(\))operator(;) operator(}) ident(value)operator(.)ident(invalidate)operator(()operator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(view)operator(()ident(ByteList) ident(bytes)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) ident(value) operator(=) ident(bytes)operator(;) ident(shareLevel) operator(=) ident(SHARE_LEVEL_NONE)operator(;) operator(}) directive(private) directive(final) type(void) ident(view)operator(()type(byte)type([])ident(bytes)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) ident(value)operator(.)ident(replace)operator(()ident(bytes)operator(\))operator(;) ident(shareLevel) operator(=) ident(SHARE_LEVEL_NONE)operator(;) ident(value)operator(.)ident(invalidate)operator(()operator(\))operator(;) operator(}) directive(private) directive(final) type(void) ident(view)operator(()type(int) ident(index)operator(,) type(int) ident(len)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(if) operator(()ident(shareLevel) operator(!=) ident(SHARE_LEVEL_NONE)operator(\)) operator({) keyword(if) operator(()ident(shareLevel) operator(==) ident(SHARE_LEVEL_BYTELIST)operator(\)) operator({) comment(// if len == 0 then shared empty) ident(value) operator(=) ident(value)operator(.)ident(makeShared)operator(()ident(index)operator(,) ident(len)operator(\))operator(;) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BUFFER)operator(;) operator(}) keyword(else) operator({) ident(value)operator(.)ident(view)operator(()ident(index)operator(,) ident(len)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(value)operator(.)ident(view)operator(()ident(index)operator(,) ident(len)operator(\))operator(;) comment(// FIXME this below is temporary, but its much safer for COW (it prevents not shared Strings with begin != 0\)) comment(// this allows now e.g.: ByteList#set not to be begin aware) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BUFFER)operator(;) operator(}) ident(value)operator(.)ident(invalidate)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) pre_type(String) ident(bytesToString)operator(()type(byte)type([]) ident(bytes)operator(,) type(int) ident(beg)operator(,) type(int) ident(len)operator(\)) operator({) keyword(return) keyword(new) pre_type(String)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(bytes)operator(,) ident(beg)operator(,) ident(len)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) pre_type(String) ident(byteListToString)operator(()ident(ByteList) ident(bytes)operator(\)) operator({) keyword(return) ident(bytesToString)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) pre_type(String) ident(bytesToString)operator(()type(byte)type([]) ident(bytes)operator(\)) operator({) keyword(return) ident(bytesToString)operator(()ident(bytes)operator(,) integer(0)operator(,) ident(bytes)operator(.)ident(length)operator(\))operator(;) operator(}) directive(public) directive(static) type(byte)type([]) ident(stringToBytes)operator(()pre_type(String) ident(string)operator(\)) operator({) keyword(return) ident(ByteList)operator(.)ident(plain)operator(()ident(string)operator(\))operator(;) operator(}) directive(public) directive(static) type(boolean) ident(isDigit)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(;) operator(}) directive(public) directive(static) type(boolean) ident(isUpper)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(;) operator(}) directive(public) directive(static) type(boolean) ident(isLower)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(;) operator(}) directive(public) directive(static) type(boolean) ident(isLetter)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(isUpper)operator(()ident(c)operator(\)) operator(||) ident(isLower)operator(()ident(c)operator(\))operator(;) operator(}) directive(public) directive(static) type(boolean) ident(isAlnum)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(isUpper)operator(()ident(c)operator(\)) operator(||) ident(isLower)operator(()ident(c)operator(\)) operator(||) ident(isDigit)operator(()ident(c)operator(\))operator(;) operator(}) directive(public) directive(static) type(boolean) ident(isPrint)operator(()type(int) ident(c)operator(\)) operator({) keyword(return) ident(c) operator(>=) hex(0x20) operator(&&) ident(c) operator(<=) hex(0x7E)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyString) ident(asString)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(checkStringType)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(\)) operator({) keyword(return) ident(strDup)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/* rb_str_cmp_m */) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(op_cmp)operator(()operator(()ident(RubyString)operator(\))ident(other)operator(\))operator(\))operator(;) operator(}) comment(// deal with case when "other" is not a string) keyword(if) operator(()ident(other)operator(.)ident(respondsTo)operator(()stringoperator(\)) operator(&&) ident(other)operator(.)ident(respondsTo)operator(()string)delimiter(")>operator(\))operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(result) keyword(instanceof) ident(RubyNumeric)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyNumeric)operator(\)) ident(result)operator(\))operator(.)ident(op_uminus)operator(()ident(context)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)ident(other)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EQUALEQUAL)operator(,) stringoperator(,) local_variable(this)operator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(value)operator(.)ident(equal)operator(()operator(()operator(()ident(RubyString)operator(\))ident(other)operator(\))operator(.)ident(value)operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(other)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ByteList) ident(result) operator(=) keyword(new) ident(ByteList)operator(()ident(value)operator(.)ident(realSize) operator(+) ident(str)operator(.)ident(value)operator(.)ident(realSize)operator(\))operator(;) ident(result)operator(.)ident(realSize) operator(=) ident(value)operator(.)ident(realSize) operator(+) ident(str)operator(.)ident(value)operator(.)ident(realSize)operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(result)operator(.)ident(bytes)operator(,) integer(0)operator(,) ident(value)operator(.)ident(realSize)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(str)operator(.)ident(value)operator(.)ident(bytes)operator(,) ident(str)operator(.)ident(value)operator(.)ident(begin)operator(,) ident(result)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(realSize)operator(,) ident(str)operator(.)ident(value)operator(.)ident(realSize)operator(\))operator(;) ident(RubyString) ident(resultStr) operator(=) ident(newString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(result)operator(\))operator(;) keyword(if) operator(()ident(isTaint)operator(()operator(\)) operator(||) ident(str)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(resultStr)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) ident(resultStr)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_mul)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyInteger) ident(otherInteger) operator(=) operator(()ident(RubyInteger)operator(\)) ident(other)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) type(long) ident(len) operator(=) ident(otherInteger)operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) comment(// we limit to int because ByteBuffer can only allocate int sizes) keyword(if) operator(()ident(len) operator(>) integer(0) operator(&&) pre_type(Integer)operator(.)ident(MAX_VALUE) operator(/) ident(len) operator(<) ident(value)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(ByteList) ident(newBytes) operator(=) keyword(new) ident(ByteList)operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(*) operator(()type(int)operator(\))ident(len)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(newBytes)operator(.)ident(append)operator(()ident(value)operator(\))operator(;) operator(}) ident(RubyString) ident(newString) operator(=) keyword(new) ident(RubyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(newBytes)operator(\))operator(;) ident(newString)operator(.)ident(setTaint)operator(()ident(isTaint)operator(()operator(\))operator(\))operator(;) keyword(return) ident(newString)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_format)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) directive(final) ident(RubyString) ident(s)operator(;) ident(IRubyObject) ident(tmp) operator(=) ident(arg)operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(tmp) operator(=) ident(arg)operator(;) operator(}) comment(// FIXME: Should we make this work with platform's locale,) comment(// or continue hardcoding US?) ident(s) operator(=) ident(Sprintf)operator(.)ident(sprintf)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) pre_type(Locale)operator(.)ident(US)operator(,) ident(value)operator(,) ident(tmp)operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(s)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(hashCode)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(hashCode)operator(()operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) pre_constant(true)operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(RubyString) ident(string) operator(=) operator(()ident(RubyString)operator(\)) ident(other)operator(;) keyword(if) operator(()ident(string)operator(.)ident(value)operator(.)ident(equal)operator(()ident(value)operator(\))operator(\)) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) comment(/** rb_obj_as_string * */) directive(public) directive(static) ident(RubyString) ident(objAsString)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubyString)operator(\)) keyword(return) operator(()ident(RubyString)operator(\)) ident(obj)operator(;) ident(IRubyObject) ident(str) operator(=) ident(obj)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(str) keyword(instanceof) ident(RubyString)operator(\))operator(\)) keyword(return) operator(()ident(RubyString)operator(\)) ident(obj)operator(.)ident(anyToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(obj)operator(.)ident(isTaint)operator(()operator(\))operator(\)) ident(str)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) keyword(return) operator(()ident(RubyString)operator(\)) ident(str)operator(;) operator(}) comment(/** rb_str_cmp * */) directive(public) type(int) ident(op_cmp)operator(()ident(RubyString) ident(other)operator(\)) operator({) keyword(return) ident(value)operator(.)ident(cmp)operator(()ident(other)operator(.)ident(value)operator(\))operator(;) operator(}) comment(/** rb_to_id * */) annotation(@Override) directive(public) pre_type(String) ident(asJavaString)operator(()operator(\)) operator({) comment(// TODO: This used to intern; but it didn't appear to change anything) comment(// turning that off, and it's unclear if it was needed. Plus, we intern) comment(// ) keyword(return) ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(doClone)operator(()operator(\))operator({) keyword(return) ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(dup)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(RubyString) ident(cat)operator(()type(byte)type([]) ident(str)operator(\)) operator({) ident(modify)operator(()ident(value)operator(.)ident(realSize) operator(+) ident(str)operator(.)ident(length)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(str)operator(,) integer(0)operator(,) ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) ident(str)operator(.)ident(length)operator(\))operator(;) ident(value)operator(.)ident(realSize) operator(+=) ident(str)operator(.)ident(length)operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(public) ident(RubyString) ident(cat)operator(()type(byte)type([]) ident(str)operator(,) type(int) ident(beg)operator(,) type(int) ident(len)operator(\)) operator({) ident(modify)operator(()ident(value)operator(.)ident(realSize) operator(+) ident(len)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(str)operator(,) ident(beg)operator(,) ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) ident(len)operator(\))operator(;) ident(value)operator(.)ident(realSize) operator(+=) ident(len)operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(public) ident(RubyString) ident(cat)operator(()ident(ByteList) ident(str)operator(\)) operator({) ident(modify)operator(()ident(value)operator(.)ident(realSize) operator(+) ident(str)operator(.)ident(realSize)operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(str)operator(.)ident(bytes)operator(,) ident(str)operator(.)ident(begin)operator(,) ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) ident(str)operator(.)ident(realSize)operator(\))operator(;) ident(value)operator(.)ident(realSize) operator(+=) ident(str)operator(.)ident(realSize)operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(public) ident(RubyString) ident(cat)operator(()type(byte) ident(ch)operator(\)) operator({) ident(modify)operator(()ident(value)operator(.)ident(realSize) operator(+) integer(1)operator(\))operator(;) ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(]) operator(=) ident(ch)operator(;) ident(value)operator(.)ident(realSize)operator(++)operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_replace_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyString) ident(replace)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) local_variable(this)operator(;) ident(modifyCheck)operator(()operator(\))operator(;) ident(RubyString) ident(otherStr) operator(=) ident(stringValue)operator(()ident(other)operator(\))operator(;) ident(otherStr)operator(.)ident(shareLevel) operator(=) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) ident(value) operator(=) ident(otherStr)operator(.)ident(value)operator(;) ident(infectBy)operator(()ident(other)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(reverse)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(<=) integer(1)operator(\)) keyword(return) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(ByteList) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()ident(value)operator(.)ident(length)operator(()operator(\))operator(+)integer(2)operator(\))operator(;) ident(buf)operator(.)ident(realSize) operator(=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) type(int) ident(src) operator(=) ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(;) type(int) ident(dst) operator(=) integer(0)operator(;) keyword(while) operator(()ident(src) operator(>=) integer(0)operator(\)) ident(buf)operator(.)ident(set)operator(()ident(dst)operator(++)operator(,) ident(value)operator(.)ident(get)operator(()ident(src)operator(--)operator(\))operator(\))operator(;) ident(RubyString) ident(rev) operator(=) keyword(new) ident(RubyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(buf)operator(\))operator(;) ident(rev)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(rev)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(reverse_bang)operator(()operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(>) integer(1)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(/) integer(2)operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) type(byte) ident(b) operator(=) operator(()type(byte)operator(\)) ident(value)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) ident(value)operator(.)ident(set)operator(()ident(i)operator(,) ident(value)operator(.)ident(get)operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) ident(i) operator(-) integer(1)operator(\))operator(\))operator(;) ident(value)operator(.)ident(set)operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) ident(i) operator(-) integer(1)operator(,) ident(b)operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_s_new * */) directive(public) directive(static) ident(RubyString) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(newString) operator(=) ident(newStringShared)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(\))operator(;) ident(newString)operator(.)ident(setMetaClass)operator(()operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(;) ident(newString)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(newString)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with zero or one arguments */) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) local_variable(this)operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(initialize)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) ident(replace)operator(()ident(arg0)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(casecmp)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) type(int) ident(compare) operator(=) ident(value)operator(.)ident(caseInsensitiveCmp)operator(()ident(stringValue)operator(()ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(compare)operator(\))operator(;) operator(}) comment(/** rb_str_match * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_match)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyRegexp)operator(\)) keyword(return) operator(()operator(()ident(RubyRegexp)operator(\)) ident(other)operator(\))operator(.)ident(op_match)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(other)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** rb_str_match2 * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) operator({)ident(LASTLINE)operator(,) ident(BACKREF)operator(})operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_match2)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(,) integer(0)operator(,) pre_constant(false)operator(\))operator(.)ident(op_match2)operator(()ident(context)operator(\))operator(;) operator(}) comment(/** * String#match(pattern\) * * rb_str_match_m * * @param pattern Regexp or String */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(match)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(pattern)operator(\)) operator({) keyword(return) ident(getPattern)operator(()ident(pattern)operator(,) pre_constant(false)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** rb_str_capitalize * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(capitalize)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(capitalize_bang)operator(()ident(context)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_capitalize_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(capitalize_bang)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte)type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) type(int) ident(c) operator(=) ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(;) keyword(if) operator(()ident(ASCII)operator(.)ident(isLower)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToUpper)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) keyword(while) operator(()operator(++)ident(s) operator(<) ident(send)operator(\)) operator({) ident(c) operator(=) operator(()type(char)operator(\))operator(()ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(\))operator(;) keyword(if) operator(()ident(ASCII)operator(.)ident(isUpper)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToLower)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(op_cmp)operator(()operator(()ident(RubyString)operator(\)) ident(other)operator(\)) operator(>=) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_ge)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(op_cmp)operator(()operator(()ident(RubyString)operator(\)) ident(other)operator(\)) operator(>) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_gt)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(op_cmp)operator(()operator(()ident(RubyString)operator(\)) ident(other)operator(\)) operator(<=) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_le)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(op_cmp)operator(()operator(()ident(RubyString)operator(\)) ident(other)operator(\)) operator(<) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_lt)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(str_eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyString)operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(RubyString) ident(otherString) operator(=) operator(()ident(RubyString)operator(\))ident(other)operator(;) keyword(return) ident(value)operator(.)ident(equal)operator(()ident(otherString)operator(.)ident(value)operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_upcase * */) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(upcase)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(upcase_bang)operator(()ident(context)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_upcase_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(upcase_bang)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte) type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) type(int) ident(c) operator(=) ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(;) keyword(if) operator(()ident(ASCII)operator(.)ident(isLower)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToUpper)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) ident(s)operator(++)operator(;) operator(}) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_downcase * */) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(downcase)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(downcase_bang)operator(()ident(context)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_downcase_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(downcase_bang)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte) type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) type(int) ident(c) operator(=) ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(;) keyword(if) operator(()ident(ASCII)operator(.)ident(isUpper)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToLower)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) ident(s)operator(++)operator(;) operator(}) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_swapcase * */) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(swapcase)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(swapcase_bang)operator(()ident(context)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_swapcase_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(swapcase_bang)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte)type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) type(int) ident(c) operator(=) ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(;) keyword(if) operator(()ident(ASCII)operator(.)ident(isUpper)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToLower)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(ASCII)operator(.)ident(isLower)operator(()ident(c)operator(\))operator(\)) operator({) ident(buf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))ident(ASCIIEncoding)operator(.)ident(asciiToUpper)operator(()ident(c)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) ident(s)operator(++)operator(;) operator(}) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_dump * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(dump)operator(()operator(\)) operator({) ident(RubyString) ident(s) operator(=) keyword(new) ident(RubyString)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(inspectIntoByteList)operator(()pre_constant(true)operator(\))operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(s)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(insert)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(indexArg)operator(,) ident(IRubyObject) ident(stringArg)operator(\)) operator({) comment(// MRI behavior: first check for ability to convert to String...) ident(RubyString) ident(s) operator(=) operator(()ident(RubyString)operator(\))ident(stringArg)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ByteList) ident(insert) operator(=) ident(s)operator(.)ident(value)operator(;) comment(// ... and then the index) type(int) ident(index) operator(=) operator(()type(int)operator(\)) ident(indexArg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(index) operator(<) integer(0)operator(\)) ident(index) operator(+=) ident(value)operator(.)ident(length)operator(()operator(\)) operator(+) integer(1)operator(;) keyword(if) operator(()ident(index) operator(<) integer(0) operator(||) ident(index) operator(>) ident(value)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(index) operator(+) stringoperator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) ident(value)operator(.)ident(unsafeReplace)operator(()ident(index)operator(,) integer(0)operator(,) ident(insert)operator(\))operator(;) local_variable(this)operator(.)ident(infectBy)operator(()ident(s)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_inspect * */) annotation(@JRubyMethod) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(inspectIntoByteList)operator(()pre_constant(false)operator(\))operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(s)operator(;) operator(}) directive(private) ident(ByteList) ident(inspectIntoByteList)operator(()type(boolean) ident(ignoreKCode)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(Encoding) ident(enc) operator(=) ident(runtime)operator(.)ident(getKCode)operator(()operator(\))operator(.)ident(getEncoding)operator(()operator(\))operator(;) directive(final) type(int) ident(length) operator(=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) ident(ByteList) ident(sb) operator(=) keyword(new) ident(ByteList)operator(()ident(length) operator(+) integer(2) operator(+) ident(length) operator(/) integer(100)operator(\))operator(;) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) type(int) ident(c) operator(=) ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(&) hex(0xFF)operator(;) keyword(if) operator(()operator(!)ident(ignoreKCode)operator(\)) operator({) type(int) ident(seqLength) operator(=) ident(enc)operator(.)ident(length)operator(()operator(()type(byte)operator(\))ident(c)operator(\))operator(;) keyword(if) operator(()ident(seqLength) operator(>) integer(1) operator(&&) operator(()ident(i) operator(+) ident(seqLength) operator(-)integer(1) operator(<) ident(length)operator(\))operator(\)) operator({) comment(// don't escape multi-byte characters, leave them as bytes) ident(sb)operator(.)ident(append)operator(()ident(value)operator(,) ident(i)operator(,) ident(seqLength)operator(\))operator(;) ident(i) operator(+=) ident(seqLength) operator(-) integer(1)operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(if) operator(()ident(isAlnum)operator(()ident(c)operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()operator(()type(char)operator(\))ident(c)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) string operator(||) ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()operator(()type(char)operator(\))ident(c)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) string operator(&&) ident(isEVStr)operator(()ident(i)operator(,) ident(length)operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()operator(()type(char)operator(\))ident(c)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(isPrint)operator(()ident(c)operator(\))operator(\)) operator({) ident(sb)operator(.)ident(append)operator(()operator(()type(char)operator(\))ident(c)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(c) operator(==) stringoperator(\)) operator({) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(sb)operator(.)ident(append)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(Sprintf)operator(.)ident(sprintf)operator(()ident(runtime)operator(,)stringoperator(,)ident(c)operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) ident(sb)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(return) ident(sb)operator(;) operator(}) directive(private) type(boolean) ident(isEVStr)operator(()type(int) ident(i)operator(,) type(int) ident(length)operator(\)) operator({) keyword(if) operator(()ident(i)operator(+)integer(1) operator(>=) ident(length)operator(\)) keyword(return) pre_constant(false)operator(;) type(int) ident(c) operator(=) ident(value)operator(.)ident(get)operator(()ident(i)operator(+)integer(1)operator(\)) operator(&) hex(0xFF)operator(;) keyword(return) ident(c) operator(==) string operator(||) ident(c) operator(==) string operator(||) ident(c) operator(==) stringoperator(;) operator(}) comment(/** rb_str_length * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyFixnum) ident(length)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_str_empty * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(empty_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(isEmpty)operator(()operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(public) type(boolean) ident(isEmpty)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(;) operator(}) comment(/** rb_str_append * */) directive(public) ident(RubyString) ident(append)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(infectBy)operator(()ident(other)operator(\))operator(;) keyword(return) ident(cat)operator(()ident(stringValue)operator(()ident(other)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) comment(/** rb_str_concat * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyString) ident(concat)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(long) ident(value) operator(=) operator(()operator(()ident(RubyFixnum)operator(\)) ident(other)operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(value) operator(>=) integer(0) operator(&&) ident(value) operator(<) integer(256)operator(\)) keyword(return) ident(cat)operator(()operator(()type(byte)operator(\)) ident(value)operator(\))operator(;) operator(}) keyword(return) ident(append)operator(()ident(other)operator(\))operator(;) operator(}) comment(/** rb_str_crypt * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(crypt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) ident(ByteList) ident(salt) operator(=) ident(stringValue)operator(()ident(other)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(salt)operator(.)ident(realSize) operator(<) integer(2)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string=2 bytes\))delimiter(")>operator(\))operator(;) operator(}) ident(salt) operator(=) ident(salt)operator(.)ident(makeShared)operator(()integer(0)operator(,) integer(2)operator(\))operator(;) ident(RubyString) ident(s) operator(=) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(JavaCrypt)operator(.)ident(crypt)operator(()ident(salt)operator(,) local_variable(this)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) ident(s)operator(.)ident(infectBy)operator(()ident(other)operator(\))operator(;) keyword(return) ident(s)operator(;) operator(}) comment(/* RubyString aka rb_string_value */) directive(public) directive(static) ident(RubyString) ident(stringValue)operator(()ident(IRubyObject) ident(object)operator(\)) operator({) keyword(return) operator(()ident(RubyString)operator(\)) operator(()ident(object) keyword(instanceof) ident(RubyString) operator(?) ident(object) operator(:) ident(object)operator(.)ident(convertToString)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two args. */) directive(public) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_sub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_sub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(sub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(sub_bang)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two arguments. */) directive(public) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(sub_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(sub_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_sub_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(RubyRegexp) ident(rubyRegex) operator(=) ident(getPattern)operator(()ident(arg0)operator(,) pre_constant(true)operator(\))operator(;) ident(Regex) ident(regex) operator(=) ident(rubyRegex)operator(.)ident(getPattern)operator(()operator(\))operator(;) keyword(return) ident(subBangCommon)operator(()ident(regex)operator(,) ident(context)operator(,) pre_constant(true)operator(,) ident(rubyRegex)operator(,) ident(block)operator(,) pre_constant(null)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/** rb_str_sub_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(sub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(repl) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(RubyRegexp) ident(rubyRegex) operator(=) ident(getPattern)operator(()ident(arg0)operator(,) pre_constant(true)operator(\))operator(;) ident(Regex) ident(regex) operator(=) ident(rubyRegex)operator(.)ident(getPattern)operator(()operator(\))operator(;) keyword(return) ident(subBangCommon)operator(()ident(regex)operator(,) ident(context)operator(,) pre_constant(false)operator(,) ident(rubyRegex)operator(,) ident(block)operator(,) ident(repl)operator(,) ident(repl)operator(.)ident(isTaint)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(subBangCommon)operator(()ident(Regex) ident(regex)operator(,) ident(ThreadContext) ident(context)operator(,) directive(final) type(boolean) ident(iter)operator(,) ident(RubyRegexp) ident(rubyRegex)operator(,) ident(Block) ident(block)operator(,) ident(RubyString) ident(repl)operator(,) type(boolean) ident(tainted)operator(\)) operator({) type(int) ident(range) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) pre_type(Matcher) ident(matcher) operator(=) ident(regex)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(range)operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(;) keyword(if) operator(()ident(matcher)operator(.)ident(search)operator(()ident(value)operator(.)ident(begin)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(iter)operator(\)) operator({) type(byte)type([]) ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(size) operator(=) ident(value)operator(.)ident(realSize)operator(;) ident(RubyMatchData) ident(match) operator(=) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) ident(match)operator(.)ident(use)operator(()operator(\))operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(repl) operator(=) ident(objAsString)operator(()ident(context)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(substr)operator(()ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(,) ident(matcher)operator(.)ident(getEnd)operator(()operator(\)) operator(-) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) ident(repl) operator(=) ident(objAsString)operator(()ident(context)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(substr)operator(()ident(region)operator(.)ident(beg)operator([)integer(0)operator(])operator(,) ident(region)operator(.)ident(end)operator([)integer(0)operator(]) operator(-) ident(region)operator(.)ident(beg)operator([)integer(0)operator(])operator(\))operator(\))operator(\))operator(;) operator(}) ident(modifyCheck)operator(()ident(bytes)operator(,) ident(size)operator(\))operator(;) ident(frozenCheck)operator(()operator(\))operator(;) ident(frame)operator(.)ident(setBackRef)operator(()ident(match)operator(\))operator(;) operator(}) keyword(else) operator({) ident(repl) operator(=) ident(rubyRegex)operator(.)ident(regsub)operator(()ident(repl)operator(,) local_variable(this)operator(,) ident(matcher)operator(\))operator(;) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) operator(}) directive(final) type(int) ident(beg)operator(;) directive(final) type(int) ident(plen)operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(beg) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) ident(plen) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\)) operator(-) ident(beg)operator(;) operator(}) keyword(else) operator({) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) ident(beg) operator(=) ident(region)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) ident(plen) operator(=) ident(region)operator(.)ident(end)operator([)integer(0)operator(]) operator(-) ident(beg)operator(;) operator(}) ident(ByteList) ident(replValue) operator(=) ident(repl)operator(.)ident(value)operator(;) keyword(if) operator(()ident(replValue)operator(.)ident(realSize) operator(>) ident(plen)operator(\)) operator({) ident(modify)operator(()ident(value)operator(.)ident(realSize) operator(+) ident(replValue)operator(.)ident(realSize) operator(-) ident(plen)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modify)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(repl)operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(tainted) operator(=) pre_constant(true)operator(;) operator(}) keyword(if) operator(()ident(replValue)operator(.)ident(realSize) operator(!=) ident(plen)operator(\)) operator({) type(int) ident(src) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(beg) operator(+) ident(plen)operator(;) type(int) ident(dst) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(beg) operator(+) ident(replValue)operator(.)ident(realSize)operator(;) type(int) ident(length) operator(=) ident(value)operator(.)ident(realSize) operator(-) ident(beg) operator(-) ident(plen)operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(src)operator(,) ident(value)operator(.)ident(bytes)operator(,) ident(dst)operator(,) ident(length)operator(\))operator(;) operator(}) pre_type(System)operator(.)ident(arraycopy)operator(()ident(replValue)operator(.)ident(bytes)operator(,) ident(replValue)operator(.)ident(begin)operator(,) ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(beg)operator(,) ident(replValue)operator(.)ident(realSize)operator(\))operator(;) ident(value)operator(.)ident(realSize) operator(+=) ident(replValue)operator(.)ident(realSize) operator(-) ident(plen)operator(;) keyword(if) operator(()ident(tainted)operator(\)) operator({) ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) keyword(else) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two arguments. */) directive(public) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_gsub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** rb_str_gsub * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(,) pre_constant(false)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two arguments. */) directive(public) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(gsub_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(gsub_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(block)operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_gsub_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(block)operator(,) pre_constant(true)operator(\))operator(;) operator(}) comment(/** rb_str_gsub_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(gsub_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(gsub)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(block)operator(,) pre_constant(true)operator(\))operator(;) operator(}) directive(private) directive(final) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(Block) ident(block)operator(,) directive(final) type(boolean) ident(bang)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(RubyRegexp) ident(rubyRegex) operator(=) ident(getPattern)operator(()ident(arg0)operator(,) pre_constant(true)operator(\))operator(;) ident(Regex) ident(regex) operator(=) ident(rubyRegex)operator(.)ident(getPattern)operator(()operator(\))operator(;) keyword(return) ident(gsubCommon)operator(()ident(regex)operator(,) ident(context)operator(,) ident(bang)operator(,) pre_constant(true)operator(,) ident(rubyRegex)operator(,) ident(block)operator(,) pre_constant(null)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(private) directive(final) ident(IRubyObject) ident(gsub)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(Block) ident(block)operator(,) directive(final) type(boolean) ident(bang)operator(\)) operator({) ident(IRubyObject) ident(repl) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(RubyRegexp) ident(rubyRegex) operator(=) ident(getPattern)operator(()ident(arg0)operator(,) pre_constant(true)operator(\))operator(;) ident(Regex) ident(regex) operator(=) ident(rubyRegex)operator(.)ident(getPattern)operator(()operator(\))operator(;) keyword(return) ident(gsubCommon)operator(()ident(regex)operator(,) ident(context)operator(,) ident(bang)operator(,) pre_constant(false)operator(,) ident(rubyRegex)operator(,) ident(block)operator(,) ident(repl)operator(,) ident(repl)operator(.)ident(isTaint)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(gsubCommon)operator(()ident(Regex) ident(regex)operator(,) ident(ThreadContext) ident(context)operator(,) directive(final) type(boolean) ident(bang)operator(,) directive(final) type(boolean) ident(iter)operator(,) ident(RubyRegexp) ident(rubyRegex)operator(,) ident(Block) ident(block)operator(,) ident(IRubyObject) ident(repl)operator(,) type(boolean) ident(tainted)operator(\)) operator({) type(int) ident(begin) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(range) operator(=) ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) pre_type(Matcher) ident(matcher) operator(=) ident(regex)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(begin)operator(,) ident(range)operator(\))operator(;) type(int) ident(beg) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(begin)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(return) ident(bang) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) comment(/* bang: true, no match, no substitution */) operator(}) type(int) ident(blen) operator(=) ident(value)operator(.)ident(realSize) operator(+) integer(30)operator(;) comment(/* len + margin */) ident(ByteList) ident(dest) operator(=) keyword(new) ident(ByteList)operator(()ident(blen)operator(\))operator(;) ident(dest)operator(.)ident(realSize) operator(=) ident(blen)operator(;) type(int) ident(buf) operator(=) integer(0)operator(;) type(int) ident(bp) operator(=) integer(0)operator(;) type(int) ident(cp) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(offset) operator(=) integer(0)operator(;) ident(RubyString) ident(val)operator(;) ident(RubyMatchData) ident(match) operator(=) pre_constant(null)operator(;) keyword(while) operator(()ident(beg) operator(>=) integer(0)operator(\)) operator({) directive(final) type(int) ident(begz)operator(;) directive(final) type(int) ident(endz)operator(;) keyword(if) operator(()ident(iter)operator(\)) operator({) type(byte)type([]) ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(size) operator(=) ident(value)operator(.)ident(realSize)operator(;) ident(match) operator(=) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) ident(match)operator(.)ident(use)operator(()operator(\))operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(begz) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) ident(endz) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) ident(val) operator(=) ident(objAsString)operator(()ident(context)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(substr)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(begz)operator(,) ident(endz) operator(-) ident(begz)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) ident(begz) operator(=) ident(region)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) ident(endz) operator(=) ident(region)operator(.)ident(end)operator([)integer(0)operator(])operator(;) ident(val) operator(=) ident(objAsString)operator(()ident(context)operator(,) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(substr)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(begz)operator(,) ident(endz) operator(-) ident(begz)operator(\))operator(\))operator(\))operator(;) operator(}) ident(modifyCheck)operator(()ident(bytes)operator(,) ident(size)operator(\))operator(;) keyword(if) operator(()ident(bang)operator(\)) operator({) ident(frozenCheck)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(val) operator(=) ident(rubyRegex)operator(.)ident(regsub)operator(()operator(()ident(RubyString)operator(\)) ident(repl)operator(,) local_variable(this)operator(,) ident(matcher)operator(\))operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(begz) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) ident(endz) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) ident(begz) operator(=) ident(region)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) ident(endz) operator(=) ident(region)operator(.)ident(end)operator([)integer(0)operator(])operator(;) operator(}) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(tainted) operator(=) pre_constant(true)operator(;) operator(}) ident(ByteList) ident(vbuf) operator(=) ident(val)operator(.)ident(value)operator(;) type(int) ident(len) operator(=) operator(()ident(bp) operator(-) ident(buf)operator(\)) operator(+) operator(()ident(beg) operator(-) ident(offset)operator(\)) operator(+) ident(vbuf)operator(.)ident(realSize) operator(+) integer(3)operator(;) keyword(if) operator(()ident(blen) operator(<) ident(len)operator(\)) operator({) keyword(while) operator(()ident(blen) operator(<) ident(len)operator(\)) operator({) ident(blen) operator(<)operator(<=) integer(1)operator(;) operator(}) ident(len) operator(=) ident(bp) operator(-) ident(buf)operator(;) ident(dest)operator(.)ident(realloc)operator(()ident(blen)operator(\))operator(;) ident(dest)operator(.)ident(realSize) operator(=) ident(blen)operator(;) ident(bp) operator(=) ident(buf) operator(+) ident(len)operator(;) operator(}) ident(len) operator(=) ident(beg) operator(-) ident(offset)operator(;) comment(/* copy pre-match substr */) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(cp)operator(,) ident(dest)operator(.)ident(bytes)operator(,) ident(bp)operator(,) ident(len)operator(\))operator(;) ident(bp) operator(+=) ident(len)operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(vbuf)operator(.)ident(bytes)operator(,) ident(vbuf)operator(.)ident(begin)operator(,) ident(dest)operator(.)ident(bytes)operator(,) ident(bp)operator(,) ident(vbuf)operator(.)ident(realSize)operator(\))operator(;) ident(bp) operator(+=) ident(vbuf)operator(.)ident(realSize)operator(;) ident(offset) operator(=) ident(endz)operator(;) keyword(if) operator(()ident(begz) operator(==) ident(endz)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(<=) ident(endz)operator(\)) operator({) keyword(break)operator(;) operator(}) ident(len) operator(=) ident(regex)operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(begin) operator(+) ident(endz)operator(])operator(\))operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(begin) operator(+) ident(endz)operator(,) ident(dest)operator(.)ident(bytes)operator(,) ident(bp)operator(,) ident(len)operator(\))operator(;) ident(bp) operator(+=) ident(len)operator(;) ident(offset) operator(=) ident(endz) operator(+) ident(len)operator(;) operator(}) ident(cp) operator(=) ident(begin) operator(+) ident(offset)operator(;) keyword(if) operator(()ident(offset) operator(>) ident(value)operator(.)ident(realSize)operator(\)) operator({) keyword(break)operator(;) operator(}) ident(beg) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(cp)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) ident(offset)operator(\)) operator({) type(int) ident(len) operator(=) ident(bp) operator(-) ident(buf)operator(;) keyword(if) operator(()ident(blen) operator(-) ident(len) operator(<) ident(value)operator(.)ident(realSize) operator(-) ident(offset)operator(\)) operator({) ident(blen) operator(=) ident(len) operator(+) ident(value)operator(.)ident(realSize) operator(-) ident(offset)operator(;) ident(dest)operator(.)ident(realloc)operator(()ident(blen)operator(\))operator(;) ident(bp) operator(=) ident(buf) operator(+) ident(len)operator(;) operator(}) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(cp)operator(,) ident(dest)operator(.)ident(bytes)operator(,) ident(bp)operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(offset)operator(\))operator(;) ident(bp) operator(+=) ident(value)operator(.)ident(realSize) operator(-) ident(offset)operator(;) operator(}) keyword(if) operator(()ident(match) operator(!=) pre_constant(null)operator(\)) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(match)operator(\))operator(;) operator(}) keyword(else) operator({) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) operator(}) ident(dest)operator(.)ident(realSize) operator(=) ident(bp) operator(-) ident(buf)operator(;) keyword(if) operator(()ident(bang)operator(\)) operator({) ident(view)operator(()ident(dest)operator(\))operator(;) keyword(if) operator(()ident(tainted)operator(\)) operator({) ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) keyword(else) operator({) ident(RubyString) ident(destStr) operator(=) keyword(new) ident(RubyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(dest)operator(\))operator(;) ident(destStr)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(tainted)operator(\)) operator({) ident(destStr)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(destStr)operator(;) operator(}) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two args. */) directive(public) ident(IRubyObject) ident(index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(index)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(index)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_index_m * */) annotation(@JRubyMethod)operator(()ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(indexCommon)operator(()integer(0)operator(,) ident(arg0)operator(,) ident(context)operator(\))operator(;) operator(}) comment(/** rb_str_index_m * */) annotation(@JRubyMethod)operator(()ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(index)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) type(int) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) operator({) ident(pos) operator(+=) ident(value)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(indexCommon)operator(()ident(pos)operator(,) ident(arg0)operator(,) ident(context)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(indexCommon)operator(()type(int) ident(pos)operator(,) ident(IRubyObject) ident(sub)operator(,) ident(ThreadContext) ident(context)operator(\)) directive(throws) ident(RaiseException) operator({) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(RubyRegexp) ident(regSub) operator(=) operator(()ident(RubyRegexp)operator(\)) ident(sub)operator(;) ident(pos) operator(=) ident(regSub)operator(.)ident(adjustStartPos)operator(()local_variable(this)operator(,) ident(pos)operator(,) pre_constant(false)operator(\))operator(;) ident(pos) operator(=) ident(regSub)operator(.)ident(search)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(pos)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(int) ident(c_int) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(sub)operator(\))operator(;) keyword(if) operator(()ident(c_int) operator(<) hex(0x00) operator(||) ident(c_int) operator(>) hex(0xFF)operator(\)) operator({) comment(// out of byte range) comment(// there will be no match for sure) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(byte) ident(c) operator(=) operator(()type(byte)operator(\)) ident(c_int)operator(;) type(byte)type([]) ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(end) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) ident(pos) operator(+=) ident(value)operator(.)ident(begin)operator(;) keyword(for) operator(()operator(;) ident(pos) operator(<) ident(end)operator(;) ident(pos)operator(++)operator(\)) operator({) keyword(if) operator(()ident(bytes)operator([)ident(pos)operator(]) operator(==) ident(c)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos) operator(-) ident(value)operator(.)ident(begin)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(pos) operator(=) ident(strIndex)operator(()operator(()ident(RubyString)operator(\)) ident(sub)operator(,) ident(pos)operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(sub)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(sub)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(pos) operator(=) ident(strIndex)operator(()operator(()ident(RubyString)operator(\)) ident(tmp)operator(,) ident(pos)operator(\))operator(;) operator(}) keyword(return) ident(pos) operator(==) operator(-)integer(1) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(\))operator(;) operator(}) directive(private) type(int) ident(strIndex)operator(()ident(RubyString) ident(sub)operator(,) type(int) ident(offset)operator(\)) operator({) keyword(if) operator(()ident(offset) operator(<) integer(0)operator(\)) operator({) ident(offset) operator(+=) ident(value)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(offset) operator(<) integer(0)operator(\)) keyword(return) operator(-)integer(1)operator(;) operator(}) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(-) ident(offset) operator(<) ident(sub)operator(.)ident(value)operator(.)ident(realSize)operator(\)) keyword(return) operator(-)integer(1)operator(;) keyword(if) operator(()ident(sub)operator(.)ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(offset)operator(;) keyword(return) ident(value)operator(.)ident(indexOf)operator(()ident(sub)operator(.)ident(value)operator(,) ident(offset)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two arguments. */) directive(public) ident(IRubyObject) ident(rindex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(rindex)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(rindex)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_rindex_m * */) annotation(@JRubyMethod)operator(()ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(rindex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(rindexCommon)operator(()ident(arg0)operator(,) ident(value)operator(.)ident(realSize)operator(,) ident(context)operator(\))operator(;) operator(}) comment(/** rb_str_rindex_m * */) annotation(@JRubyMethod)operator(()ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(rindex)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) type(int) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) operator({) ident(pos) operator(+=) ident(value)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(pos) operator(>) ident(value)operator(.)ident(realSize)operator(\)) ident(pos) operator(=) ident(value)operator(.)ident(realSize)operator(;) keyword(return) ident(rindexCommon)operator(()ident(arg0)operator(,) ident(pos)operator(,) ident(context)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(rindexCommon)operator(()directive(final) ident(IRubyObject) ident(sub)operator(,) type(int) ident(pos)operator(,) ident(ThreadContext) ident(context)operator(\)) directive(throws) ident(RaiseException) operator({) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(RubyRegexp) ident(regSub) operator(=) operator(()ident(RubyRegexp)operator(\)) ident(sub)operator(;) keyword(if) operator(()ident(regSub)operator(.)ident(length)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) ident(pos) operator(=) ident(regSub)operator(.)ident(adjustStartPos)operator(()local_variable(this)operator(,) ident(pos)operator(,) pre_constant(true)operator(\))operator(;) ident(pos) operator(=) ident(regSub)operator(.)ident(search)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(pos)operator(,) pre_constant(true)operator(\))operator(;) operator(}) keyword(if) operator(()ident(pos) operator(>=) integer(0)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(\))operator(;) operator(}) operator(}) keyword(else) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(pos) operator(=) ident(strRindex)operator(()operator(()ident(RubyString)operator(\)) ident(sub)operator(,) ident(pos)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(sub) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(int) ident(c_int) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(sub)operator(\))operator(;) keyword(if) operator(()ident(c_int) operator(<) hex(0x00) operator(||) ident(c_int) operator(>) hex(0xFF)operator(\)) operator({) comment(// out of byte range) comment(// there will be no match for sure) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(byte) ident(c) operator(=) operator(()type(byte)operator(\)) ident(c_int)operator(;) type(byte)type([]) ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(pbeg) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(p) operator(=) ident(pbeg) operator(+) ident(pos)operator(;) keyword(if) operator(()ident(pos) operator(==) ident(value)operator(.)ident(realSize)operator(\)) operator({) keyword(if) operator(()ident(pos) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(--)ident(p)operator(;) operator(}) keyword(while) operator(()ident(pbeg) operator(<=) ident(p)operator(\)) operator({) keyword(if) operator(()ident(bytes)operator([)ident(p)operator(]) operator(==) ident(c)operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(p) operator(-) ident(value)operator(.)ident(begin)operator(\))operator(;) operator(}) ident(p)operator(--)operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(sub)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(sub)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(pos) operator(=) ident(strRindex)operator(()operator(()ident(RubyString)operator(\)) ident(tmp)operator(,) ident(pos)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) integer(0)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) type(int) ident(strRindex)operator(()ident(RubyString) ident(sub)operator(,) type(int) ident(pos)operator(\)) operator({) type(int) ident(subLength) operator(=) ident(sub)operator(.)ident(value)operator(.)ident(realSize)operator(;) comment(/* substring longer than string */) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(<) ident(subLength)operator(\)) keyword(return) operator(-)integer(1)operator(;) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(-) ident(pos) operator(<) ident(subLength)operator(\)) ident(pos) operator(=) ident(value)operator(.)ident(realSize) operator(-) ident(subLength)operator(;) keyword(return) ident(value)operator(.)ident(lastIndexOf)operator(()ident(sub)operator(.)ident(value)operator(,) ident(pos)operator(\))operator(;) operator(}) comment(/* rb_str_substr */) directive(public) ident(IRubyObject) ident(substr)operator(()type(int) ident(beg)operator(,) type(int) ident(len)operator(\)) operator({) keyword(return) ident(substr)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(beg)operator(,) ident(len)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(substr)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(beg)operator(,) type(int) ident(len)operator(\)) operator({) type(int) ident(length) operator(=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0) operator(||) ident(beg) operator(>) ident(length)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) operator({) ident(beg) operator(+=) ident(length)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(int) ident(end) operator(=) pre_type(Math)operator(.)ident(min)operator(()ident(length)operator(,) ident(beg) operator(+) ident(len)operator(\))operator(;) keyword(return) ident(makeShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(beg)operator(,) ident(end) operator(-) ident(beg)operator(\))operator(;) operator(}) comment(/* rb_str_replace */) directive(public) ident(IRubyObject) ident(replace)operator(()type(int) ident(beg)operator(,) type(int) ident(len)operator(,) ident(RubyString) ident(replaceWith)operator(\)) operator({) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>=) ident(value)operator(.)ident(length)operator(()operator(\))operator(\)) ident(len) operator(=) ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) ident(beg)operator(;) ident(modify)operator(()operator(\))operator(;) ident(value)operator(.)ident(unsafeReplace)operator(()ident(beg)operator(,)ident(len)operator(,)ident(replaceWith)operator(.)ident(value)operator(\))operator(;) keyword(return) ident(infectBy)operator(()ident(replaceWith)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the versions with one or two args */) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(op_aref)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(op_aref)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_aref, rb_str_aref_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) keyword(if) operator(()ident(arg1) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) keyword(if)operator(()operator(()operator(()ident(RubyRegexp)operator(\))ident(arg1)operator(\))operator(.)ident(search)operator(()ident(context)operator(,) local_variable(this)operator(,) integer(0)operator(,) pre_constant(false)operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg2)operator(\))operator(,) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(substr)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(\))operator(,) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg2)operator(\))operator(\))operator(;) operator(}) comment(/** rb_str_aref, rb_str_aref_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) keyword(if)operator(()operator(()operator(()ident(RubyRegexp)operator(\))ident(arg)operator(\))operator(.)ident(search)operator(()ident(context)operator(,) local_variable(this)operator(,) integer(0)operator(,) pre_constant(false)operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(return) ident(RubyRegexp)operator(.)ident(nth_match)operator(()integer(0)operator(,) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(value)operator(.)ident(indexOf)operator(()ident(stringValue)operator(()ident(arg)operator(\))operator(.)ident(value)operator(\)) operator(!=) operator(-)integer(1) operator(?) ident(arg) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyRange)operator(\)) operator({) type(long)type([]) ident(begLen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(arg)operator(\))operator(.)ident(begLen)operator(()ident(value)operator(.)ident(length)operator(()operator(\))operator(,) integer(0)operator(\))operator(;) keyword(return) ident(begLen) operator(==) pre_constant(null) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(substr)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()type(int)operator(\)) ident(begLen)operator([)integer(0)operator(])operator(,) operator(()type(int)operator(\)) ident(begLen)operator([)integer(1)operator(])operator(\))operator(;) operator(}) type(int) ident(idx) operator(=) operator(()type(int)operator(\)) ident(arg)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0)operator(\)) ident(idx) operator(+=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0) operator(||) ident(idx) operator(>=) ident(value)operator(.)ident(length)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(get)operator(()ident(idx)operator(\)) operator(&) hex(0xFF)operator(\))operator(;) operator(}) comment(/** * rb_str_subpat_set * */) directive(private) type(void) ident(subpatSet)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyRegexp) ident(regexp)operator(,) type(int) ident(nth)operator(,) ident(IRubyObject) ident(repl)operator(\)) operator({) ident(RubyMatchData) ident(match)operator(;) type(int) ident(start)operator(,) ident(end)operator(,) ident(len)operator(;) keyword(if) operator(()ident(regexp)operator(.)ident(search)operator(()ident(context)operator(,) local_variable(this)operator(,) integer(0)operator(,) pre_constant(false)operator(\)) operator(<) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) ident(match) operator(=) operator(()ident(RubyMatchData)operator(\))ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(match)operator(.)ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()ident(nth) operator(>=) integer(1)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) keyword(if) operator(()ident(nth) operator(<) integer(0)operator(\)) operator({) keyword(if)operator(()operator(-)ident(nth) operator(>=) integer(1)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) ident(nth) operator(+=) integer(1)operator(;) operator(}) ident(start) operator(=) ident(match)operator(.)ident(begin)operator(;) keyword(if)operator(()ident(start) operator(==) operator(-)integer(1)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) ident(end) operator(=) ident(match)operator(.)ident(end)operator(;) operator(}) keyword(else) operator({) keyword(if)operator(()ident(nth) operator(>=) ident(match)operator(.)ident(regs)operator(.)ident(numRegs)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) keyword(if)operator(()ident(nth) operator(<) integer(0)operator(\)) operator({) keyword(if)operator(()operator(-)ident(nth) operator(>=) ident(match)operator(.)ident(regs)operator(.)ident(numRegs)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) ident(nth) operator(+=) ident(match)operator(.)ident(regs)operator(.)ident(numRegs)operator(;) operator(}) ident(start) operator(=) ident(match)operator(.)ident(regs)operator(.)ident(beg)operator([)ident(nth)operator(])operator(;) keyword(if)operator(()ident(start) operator(==) operator(-)integer(1)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(nth) operator(+) stringoperator(\))operator(;) ident(end) operator(=) ident(match)operator(.)ident(regs)operator(.)ident(end)operator([)ident(nth)operator(])operator(;) operator(}) ident(len) operator(=) ident(end) operator(-) ident(start)operator(;) ident(replace)operator(()ident(start)operator(,) ident(len)operator(,) ident(stringValue)operator(()ident(repl)operator(\))operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with two or three args. */) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(2)operator(:) keyword(return) ident(op_aset)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(case) integer(3)operator(:) keyword(return) ident(op_aset)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(2)operator(,) integer(3)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_aset, rb_str_aset_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyFixnum) operator(||) ident(arg0)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) comment(// FIXME: RubyNumeric or RubyInteger instead?) type(int) ident(idx) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0)operator(\)) ident(idx) operator(+=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0) operator(||) ident(idx) operator(>=) ident(value)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(arg1) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) ident(value)operator(.)ident(set)operator(()ident(idx)operator(,) operator(()type(byte)operator(\)) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(replace)operator(()ident(idx)operator(,) integer(1)operator(,) ident(stringValue)operator(()ident(arg1)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(arg1)operator(;) operator(}) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(RubyString) ident(repl) operator(=) ident(stringValue)operator(()ident(arg1)operator(\))operator(;) ident(subpatSet)operator(()ident(context)operator(,) operator(()ident(RubyRegexp)operator(\)) ident(arg0)operator(,) integer(0)operator(,) ident(repl)operator(\))operator(;) keyword(return) ident(repl)operator(;) operator(}) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(RubyString) ident(orig) operator(=) operator(()ident(RubyString)operator(\))ident(arg0)operator(;) type(int) ident(beg) operator(=) ident(value)operator(.)ident(indexOf)operator(()ident(orig)operator(.)ident(value)operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) ident(replace)operator(()ident(beg)operator(,) ident(orig)operator(.)ident(value)operator(.)ident(length)operator(()operator(\))operator(,) ident(stringValue)operator(()ident(arg1)operator(\))operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRange)operator(\)) operator({) type(long)type([]) ident(begLen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(arg0)operator(\))operator(.)ident(begLen)operator(()ident(value)operator(.)ident(realSize)operator(,) integer(2)operator(\))operator(;) ident(replace)operator(()operator(()type(int)operator(\)) ident(begLen)operator([)integer(0)operator(])operator(,) operator(()type(int)operator(\)) ident(begLen)operator([)integer(1)operator(])operator(,) ident(stringValue)operator(()ident(arg1)operator(\))operator(\))operator(;) keyword(return) ident(arg1)operator(;) operator(}) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) comment(/** rb_str_aset, rb_str_aset_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) keyword(if) operator(()ident(arg0) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) ident(RubyString) ident(repl) operator(=) ident(stringValue)operator(()ident(arg2)operator(\))operator(;) type(int) ident(nth) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(\))operator(;) ident(subpatSet)operator(()ident(context)operator(,) operator(()ident(RubyRegexp)operator(\)) ident(arg0)operator(,) ident(nth)operator(,) ident(repl)operator(\))operator(;) keyword(return) ident(repl)operator(;) operator(}) ident(RubyString) ident(repl) operator(=) ident(stringValue)operator(()ident(arg2)operator(\))operator(;) type(int) ident(beg) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg0)operator(\))operator(;) type(int) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) type(int) ident(strLen) operator(=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0)operator(\)) ident(beg) operator(+=) ident(strLen)operator(;) keyword(if) operator(()ident(beg) operator(<) integer(0) operator(||) operator(()ident(beg) operator(>) integer(0) operator(&&) ident(beg) operator(>) ident(strLen)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(strLen)operator(\)) ident(len) operator(=) ident(strLen) operator(-) ident(beg)operator(;) ident(replace)operator(()ident(beg)operator(,) ident(len)operator(,) ident(repl)operator(\))operator(;) keyword(return) ident(repl)operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound as a Ruby method. * @deprecated Use the versions with one or two args. */) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(slice_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(slice_bang)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_slice_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(op_aref)operator(()ident(context)operator(,) ident(arg0)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(result)operator(;) ident(op_aset)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** rb_str_slice_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(slice_bang)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(op_aref)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(result)operator(;) ident(op_aset)operator(()ident(context)operator(,) ident(arg0)operator(,) ident(arg1)operator(,) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(succ)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(succ_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(succ_bang)operator(()operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) type(boolean) ident(alnumSeen) operator(=) pre_constant(false)operator(;) type(int) ident(pos) operator(=) operator(-)integer(1)operator(;) type(int) ident(c) operator(=) integer(0)operator(;) type(int) ident(n) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) ident(c) operator(=) ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(&) hex(0xFF)operator(;) keyword(if) operator(()ident(isAlnum)operator(()ident(c)operator(\))operator(\)) operator({) ident(alnumSeen) operator(=) pre_constant(true)operator(;) keyword(if) operator(()operator(()ident(isDigit)operator(()ident(c)operator(\)) operator(&&) ident(c) operator(<) stringoperator(\)) operator(||) operator(()ident(isLower)operator(()ident(c)operator(\)) operator(&&) ident(c) operator(<) stringoperator(\)) operator(||) operator(()ident(isUpper)operator(()ident(c)operator(\)) operator(&&) ident(c) operator(<) stringoperator(\))operator(\)) operator({) ident(value)operator(.)ident(set)operator(()ident(i)operator(,) operator(()type(byte)operator(\))operator(()ident(c) operator(+) integer(1)operator(\))operator(\))operator(;) ident(pos) operator(=) operator(-)integer(1)operator(;) keyword(break)operator(;) operator(}) ident(pos) operator(=) ident(i)operator(;) ident(n) operator(=) ident(isDigit)operator(()ident(c)operator(\)) operator(?) string operator(:) operator(()ident(isLower)operator(()ident(c)operator(\)) operator(?) string operator(:) stringoperator(\))operator(;) ident(value)operator(.)ident(set)operator(()ident(i)operator(,) operator(()type(byte)operator(\))operator(()ident(isDigit)operator(()ident(c)operator(\)) operator(?) string operator(:) operator(()ident(isLower)operator(()ident(c)operator(\)) operator(?) string operator(:) stringoperator(\))operator(\))operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(alnumSeen)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) ident(value)operator(.)ident(length)operator(()operator(\)) operator(-) integer(1)operator(;) ident(i) operator(>=) integer(0)operator(;) ident(i)operator(--)operator(\)) operator({) ident(c) operator(=) ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(&) hex(0xFF)operator(;) keyword(if) operator(()ident(c) operator(<) hex(0xff)operator(\)) operator({) ident(value)operator(.)ident(set)operator(()ident(i)operator(,) operator(()type(byte)operator(\))operator(()ident(c) operator(+) integer(1)operator(\))operator(\))operator(;) ident(pos) operator(=) operator(-)integer(1)operator(;) keyword(break)operator(;) operator(}) ident(pos) operator(=) ident(i)operator(;) ident(n) operator(=) stringoperator(;) ident(value)operator(.)ident(set)operator(()ident(i)operator(,) integer(0)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(pos) operator(>) operator(-)integer(1)operator(\)) operator({) comment(// This represents left most digit in a set of incremented) comment(// values? Therefore leftmost numeric must be '1' and not '0') comment(// 999 -> 1000, not 999 -> 0000. whereas chars should be) comment(// zzz -> aaaa and non-alnum byte values should be "\\377" -> "\\001\\000") ident(value)operator(.)ident(insert)operator(()ident(pos)operator(,) operator(()type(byte)operator(\)) ident(n)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_upto_m * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(upto)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(upto)operator(()ident(context)operator(,) ident(str)operator(,) pre_constant(false)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/* rb_str_upto */) directive(public) ident(IRubyObject) ident(upto)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(,) type(boolean) ident(excl)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyString) ident(end) operator(=) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(;) type(int) ident(n) operator(=) ident(value)operator(.)ident(cmp)operator(()ident(end)operator(.)ident(value)operator(\))operator(;) keyword(if) operator(()ident(n) operator(>) integer(0) operator(||) operator(()ident(excl) operator(&&) ident(n) operator(==) integer(0)operator(\))operator(\)) keyword(return) local_variable(this)operator(;) ident(IRubyObject) ident(afterEnd) operator(=) ident(end)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(RubyString) ident(current) operator(=) local_variable(this)operator(;) keyword(while) operator(()operator(!)ident(current)operator(.)ident(op_equal)operator(()ident(context)operator(,) ident(afterEnd)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(current)operator(\))operator(;) keyword(if) operator(()operator(!)ident(excl) operator(&&) ident(current)operator(.)ident(op_equal)operator(()ident(context)operator(,) ident(end)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(break)operator(;) ident(current) operator(=) ident(current)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(excl) operator(&&) ident(current)operator(.)ident(op_equal)operator(()ident(context)operator(,) ident(end)operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) keyword(break)operator(;) keyword(if) operator(()ident(current)operator(.)ident(value)operator(.)ident(realSize) operator(>) ident(end)operator(.)ident(value)operator(.)ident(realSize) operator(||) ident(current)operator(.)ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(break)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_include * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(include_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) type(int) ident(c) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(obj)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(==) operator(()type(byte)operator(\))ident(c)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) ident(ByteList) ident(str) operator(=) ident(stringValue)operator(()ident(obj)operator(\))operator(.)ident(value)operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(value)operator(.)ident(indexOf)operator(()ident(str)operator(\)) operator(!=) operator(-)integer(1)operator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound as a Ruby method. * @deprecated Use the versions with zero or one args. */) directive(public) ident(IRubyObject) ident(to_i)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(to_i)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(to_i)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_to_i * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_i)operator(()operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) integer(10)operator(\))operator(;) operator(}) comment(/** rb_str_to_i * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_i)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) type(long) ident(base) operator(=) ident(arg0)operator(.)ident(convertToInteger)operator(()operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(return) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) operator(()type(int)operator(\)) ident(base)operator(\))operator(;) operator(}) comment(/** rb_str_oct * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(oct)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(isEmpty)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) type(int) ident(base) operator(=) integer(8)operator(;) type(int) ident(ix) operator(=) ident(value)operator(.)ident(begin)operator(;) keyword(while)operator(()ident(ix) operator(<) ident(value)operator(.)ident(begin)operator(+)ident(value)operator(.)ident(realSize) operator(&&) ident(ASCII)operator(.)ident(isSpace)operator(()ident(value)operator(.)ident(bytes)operator([)ident(ix)operator(]) operator(&) hex(0xff)operator(\))operator(\)) operator({) ident(ix)operator(++)operator(;) operator(}) type(int) ident(pos) operator(=) operator(()ident(value)operator(.)ident(bytes)operator([)ident(ix)operator(]) operator(==) string operator(||) ident(value)operator(.)ident(bytes)operator([)ident(ix)operator(]) operator(==) stringoperator(\)) operator(?) ident(ix)operator(+)integer(1) operator(:) ident(ix)operator(;) keyword(if)operator(()operator(()ident(pos)operator(+)integer(1)operator(\)) operator(<) ident(value)operator(.)ident(begin)operator(+)ident(value)operator(.)ident(realSize) operator(&&) ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(]) operator(==) stringoperator(\)) operator({) keyword(if)operator(()ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) string operator(||) ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) stringoperator(\)) operator({) ident(base) operator(=) integer(16)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) string operator(||) ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) stringoperator(\)) operator({) ident(base) operator(=) integer(2)operator(;) operator(}) keyword(else) keyword(if)operator(()ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) string operator(||) ident(value)operator(.)ident(bytes)operator([)ident(pos)operator(+)integer(1)operator(]) operator(==) stringoperator(\)) operator({) ident(base) operator(=) integer(10)operator(;) operator(}) operator(}) keyword(return) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) ident(base)operator(\))operator(;) operator(}) comment(/** rb_str_hex * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(hex)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(,) integer(16)operator(\))operator(;) operator(}) comment(/** rb_str_to_f * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_f)operator(()operator(\)) operator({) keyword(return) ident(RubyNumeric)operator(.)ident(str2fnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(\))operator(;) operator(}) comment(/** * Variable arity version for compatibility. Not bound to a Ruby method. * @deprecated Use the versions with zero, one, or two args. */) directive(public) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(split)operator(()ident(context)operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(split)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(split)operator(()ident(context)operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_split_m * */) annotation(@JRubyMethod)operator(()ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) ident(split)operator(()ident(context)operator(,) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) comment(/** rb_str_split_m * */) annotation(@JRubyMethod)operator(()ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(splitCommon)operator(()ident(arg0)operator(,) pre_constant(false)operator(,) integer(0)operator(,) integer(0)operator(,) ident(context)operator(\))operator(;) operator(}) comment(/** rb_str_split_m * */) annotation(@JRubyMethod)operator(()ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) directive(final) type(int) ident(lim) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg1)operator(\))operator(;) keyword(if) operator(()ident(lim) operator(<=) integer(0)operator(\)) operator({) keyword(return) ident(splitCommon)operator(()ident(arg0)operator(,) pre_constant(false)operator(,) ident(lim)operator(,) integer(1)operator(,) ident(context)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(lim) operator(==) integer(1)operator(\)) keyword(return) ident(value)operator(.)ident(realSize) operator(==) integer(0) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(splitCommon)operator(()ident(arg0)operator(,) pre_constant(true)operator(,) ident(lim)operator(,) integer(1)operator(,) ident(context)operator(\))operator(;) operator(}) operator(}) directive(private) ident(RubyArray) ident(splitCommon)operator(()ident(IRubyObject) ident(spat)operator(,) directive(final) type(boolean) ident(limit)operator(,) directive(final) type(int) ident(lim)operator(,) directive(final) type(int) ident(i)operator(,) ident(ThreadContext) ident(context)operator(\)) operator({) directive(final) ident(RubyArray) ident(result)operator(;) keyword(if) operator(()ident(spat)operator(.)ident(isNil)operator(()operator(\)) operator(&&) operator(()ident(spat) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(result) operator(=) ident(awkSplit)operator(()ident(limit)operator(,) ident(lim)operator(,) ident(i)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(spat) keyword(instanceof) ident(RubyString) operator(&&) operator(()operator(()ident(RubyString)operator(\)) ident(spat)operator(\))operator(.)ident(value)operator(.)ident(realSize) operator(==) integer(1)operator(\)) operator({) ident(RubyString) ident(strSpat) operator(=) operator(()ident(RubyString)operator(\)) ident(spat)operator(;) keyword(if) operator(()ident(strSpat)operator(.)ident(value)operator(.)ident(bytes)operator([)ident(strSpat)operator(.)ident(value)operator(.)ident(begin)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(result) operator(=) ident(awkSplit)operator(()ident(limit)operator(,) ident(lim)operator(,) ident(i)operator(\))operator(;) operator(}) keyword(else) operator({) ident(result) operator(=) ident(split)operator(()ident(context)operator(,) ident(spat)operator(,) ident(limit)operator(,) ident(lim)operator(,) ident(i)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(result) operator(=) ident(split)operator(()ident(context)operator(,) ident(spat)operator(,) ident(limit)operator(,) ident(lim)operator(,) ident(i)operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()operator(!)ident(limit) operator(&&) ident(lim) operator(==) integer(0)operator(\)) operator({) keyword(while) operator(()ident(result)operator(.)ident(size)operator(()operator(\)) operator(>) integer(0) operator(&&) operator(()operator(()ident(RubyString)operator(\)) ident(result)operator(.)ident(eltInternal)operator(()ident(result)operator(.)ident(size)operator(()operator(\)) operator(-) integer(1)operator(\))operator(\))operator(.)ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(result)operator(.)ident(pop)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) ident(RubyArray) ident(split)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(pat)operator(,) type(boolean) ident(limit)operator(,) type(int) ident(lim)operator(,) type(int) ident(i)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(Regex) ident(regex) operator(=) ident(getPattern)operator(()ident(pat)operator(,) pre_constant(true)operator(\))operator(.)ident(getPattern)operator(()operator(\))operator(;) type(int) ident(beg)operator(,) ident(end)operator(,) ident(start)operator(;) type(int) ident(begin) operator(=) ident(value)operator(.)ident(begin)operator(;) ident(start) operator(=) ident(begin)operator(;) ident(beg) operator(=) integer(0)operator(;) type(int) ident(range) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) directive(final) pre_type(Matcher) ident(matcher) operator(=) ident(regex)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(range)operator(\))operator(;) type(boolean) ident(lastNull) operator(=) pre_constant(false)operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) comment(// shorter path, no captures defined, no region will be returned ) keyword(while) operator(()operator(()ident(end) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(start)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(start) operator(==) ident(end) operator(+) ident(begin) operator(&&) ident(matcher)operator(.)ident(getBegin)operator(()operator(\)) operator(==) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(lastNull)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(runtime)operator(,) ident(beg)operator(,) ident(regex)operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(begin) operator(+) ident(beg)operator(])operator(\))operator(\))operator(\))operator(;) ident(beg) operator(=) ident(start) operator(-) ident(begin)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(start) operator(==) ident(range)operator(\)) operator({) ident(start)operator(++)operator(;) operator(}) keyword(else) operator({) ident(start) operator(+=) ident(regex)operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(start)operator(])operator(\))operator(;) operator(}) ident(lastNull) operator(=) pre_constant(true)operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(beg)operator(,) ident(end) operator(-) ident(beg)operator(\))operator(\))operator(;) ident(beg) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) ident(start) operator(=) ident(begin) operator(+) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) operator(}) ident(lastNull) operator(=) pre_constant(false)operator(;) keyword(if) operator(()ident(limit) operator(&&) ident(lim) operator(<=) operator(++)ident(i)operator(\)) keyword(break)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(while) operator(()operator(()ident(end) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(start)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(\)) operator(>=) integer(0)operator(\)) operator({) directive(final) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) keyword(if) operator(()ident(start) operator(==) ident(end) operator(+) ident(begin) operator(&&) ident(region)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) ident(region)operator(.)ident(end)operator([)integer(0)operator(])operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator(;) keyword(break)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(lastNull)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(beg)operator(,) ident(regex)operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(begin) operator(+) ident(beg)operator(])operator(\))operator(\))operator(\))operator(;) ident(beg) operator(=) ident(start) operator(-) ident(begin)operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(start) operator(==) ident(range)operator(\)) operator({) ident(start)operator(++)operator(;) operator(}) keyword(else) operator({) ident(start) operator(+=) ident(regex)operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(start)operator(])operator(\))operator(;) operator(}) ident(lastNull) operator(=) pre_constant(true)operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(beg)operator(,) ident(end) operator(-) ident(beg)operator(\))operator(\))operator(;) ident(beg) operator(=) ident(start) operator(=) ident(region)operator(.)ident(end)operator([)integer(0)operator(])operator(;) ident(start) operator(+=) ident(begin)operator(;) operator(}) ident(lastNull) operator(=) pre_constant(false)operator(;) keyword(for) operator(()type(int) ident(idx)operator(=)integer(1)operator(;) ident(idx)operator(<)ident(region)operator(.)ident(numRegs)operator(;) ident(idx)operator(++)operator(\)) operator({) keyword(if) operator(()ident(region)operator(.)ident(beg)operator([)ident(idx)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(continue)operator(;) keyword(if) operator(()ident(region)operator(.)ident(beg)operator([)ident(idx)operator(]) operator(==) ident(region)operator(.)ident(end)operator([)ident(idx)operator(])operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(region)operator(.)ident(beg)operator([)ident(idx)operator(])operator(,) ident(region)operator(.)ident(end)operator([)ident(idx)operator(]) operator(-) ident(region)operator(.)ident(beg)operator([)ident(idx)operator(])operator(\))operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()ident(limit) operator(&&) ident(lim) operator(<=) operator(++)ident(i)operator(\)) keyword(break)operator(;) operator(}) operator(}) comment(// only this case affects backrefs ) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) integer(0) operator(&&) operator(()ident(limit) operator(||) ident(value)operator(.)ident(realSize) operator(>) ident(beg) operator(||) ident(lim) operator(<) integer(0)operator(\))operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) ident(beg)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(beg)operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(beg)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) ident(RubyArray) ident(awkSplit)operator(()type(boolean) ident(limit)operator(,) type(int) ident(lim)operator(,) type(int) ident(i)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyArray) ident(result) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) type(byte)type([])ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(p) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(endp) operator(=) ident(p) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(boolean) ident(skip) operator(=) pre_constant(true)operator(;) type(int) ident(end)operator(,) ident(beg) operator(=) integer(0)operator(;) keyword(for) operator(()ident(end) operator(=) ident(beg) operator(=) integer(0)operator(;) ident(p) operator(<) ident(endp)operator(;) ident(p)operator(++)operator(\)) operator({) keyword(if) operator(()ident(skip)operator(\)) operator({) keyword(if) operator(()ident(ASCII)operator(.)ident(isSpace)operator(()ident(bytes)operator([)ident(p)operator(]) operator(&) hex(0xff)operator(\))operator(\)) operator({) ident(beg)operator(++)operator(;) operator(}) keyword(else) operator({) ident(end) operator(=) ident(beg) operator(+) integer(1)operator(;) ident(skip) operator(=) pre_constant(false)operator(;) keyword(if) operator(()ident(limit) operator(&&) ident(lim) operator(<=) ident(i)operator(\)) keyword(break)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(if) operator(()ident(ASCII)operator(.)ident(isSpace)operator(()ident(bytes)operator([)ident(p)operator(]) operator(&) hex(0xff)operator(\))operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(makeShared)operator(()ident(runtime)operator(,) ident(beg)operator(,) ident(end) operator(-) ident(beg)operator(\))operator(\))operator(;) ident(skip) operator(=) pre_constant(true)operator(;) ident(beg) operator(=) ident(end) operator(+) integer(1)operator(;) keyword(if) operator(()ident(limit)operator(\)) ident(i)operator(++)operator(;) operator(}) keyword(else) operator({) ident(end)operator(++)operator(;) operator(}) operator(}) operator(}) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) integer(0) operator(&&) operator(()ident(limit) operator(||) ident(value)operator(.)ident(realSize) operator(>) ident(beg) operator(||) ident(lim) operator(<) integer(0)operator(\))operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) ident(beg)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(newEmptyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(makeShared)operator(()ident(runtime)operator(,) ident(beg)operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(beg)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) comment(/** get_pat * */) directive(private) directive(final) ident(RubyRegexp) ident(getPattern)operator(()ident(IRubyObject) ident(obj)operator(,) type(boolean) ident(quote)operator(\)) operator({) keyword(if) operator(()ident(obj) keyword(instanceof) ident(RubyRegexp)operator(\)) operator({) keyword(return) operator(()ident(RubyRegexp)operator(\))ident(obj)operator(;) operator(}) keyword(else) keyword(if) operator(()operator(!)operator(()ident(obj) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) ident(IRubyObject) ident(val) operator(=) ident(obj)operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()ident(val)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(obj)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(obj) operator(=) ident(val)operator(;) operator(}) keyword(return) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(()operator(()ident(RubyString)operator(\))ident(obj)operator(\))operator(.)ident(value)operator(,) integer(0)operator(,) ident(quote)operator(\))operator(;) operator(}) comment(/** rb_str_scan * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(\)) directive(public) ident(IRubyObject) ident(scan)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getPreviousFrame)operator(()operator(\))operator(;) directive(final) ident(RubyRegexp) ident(rubyRegex) operator(=) ident(getPattern)operator(()ident(arg)operator(,) pre_constant(true)operator(\))operator(;) directive(final) ident(Regex) ident(regex) operator(=) ident(rubyRegex)operator(.)ident(getPattern)operator(()operator(\))operator(;) type(int) ident(range) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) directive(final) pre_type(Matcher) ident(matcher) operator(=) ident(regex)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(range)operator(\))operator(;) ident(matcher)operator(.)ident(value) operator(=) integer(0)operator(;) comment(// implicit start argument to scanOnce(NG\)) ident(IRubyObject) ident(result)operator(;) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) ident(RubyArray) ident(ary) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(while) operator(()operator(()ident(result) operator(=) ident(scanOnceNG)operator(()ident(rubyRegex)operator(,) ident(matcher)operator(,) ident(range)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) ident(ary)operator(.)ident(append)operator(()ident(result)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(while) operator(()operator(()ident(result) operator(=) ident(scanOnce)operator(()ident(rubyRegex)operator(,) ident(matcher)operator(,) ident(range)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) ident(ary)operator(.)ident(append)operator(()ident(result)operator(\))operator(;) operator(}) keyword(if) operator(()ident(ary)operator(.)ident(size)operator(()operator(\)) operator(>) integer(0)operator(\)) operator({) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) operator(}) keyword(else) operator({) ident(frame)operator(.)ident(setBackRef)operator(()ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(ary)operator(;) operator(}) keyword(else) operator({) type(byte)type([])ident(bytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(size) operator(=) ident(value)operator(.)ident(realSize)operator(;) ident(RubyMatchData) ident(match) operator(=) pre_constant(null)operator(;) keyword(if) operator(()ident(regex)operator(.)ident(numberOfCaptures)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(while) operator(()operator(()ident(result) operator(=) ident(scanOnceNG)operator(()ident(rubyRegex)operator(,) ident(matcher)operator(,) ident(range)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(match) operator(=) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) ident(match)operator(.)ident(use)operator(()operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(result)operator(\))operator(;) ident(modifyCheck)operator(()ident(bytes)operator(,) ident(size)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(while) operator(()operator(()ident(result) operator(=) ident(scanOnce)operator(()ident(rubyRegex)operator(,) ident(matcher)operator(,) ident(range)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) ident(match) operator(=) ident(rubyRegex)operator(.)ident(updateBackRef)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(frame)operator(,) ident(matcher)operator(\))operator(;) ident(match)operator(.)ident(use)operator(()operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(result)operator(\))operator(;) ident(modifyCheck)operator(()ident(bytes)operator(,) ident(size)operator(\))operator(;) operator(}) operator(}) ident(frame)operator(.)ident(setBackRef)operator(()ident(match) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(match)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) operator(}) comment(/** * rb_enc_check */) annotation(@SuppressWarnings)operator(()stringoperator(\)) directive(private) ident(Encoding) ident(encodingCheck)operator(()ident(RubyRegexp) ident(pattern)operator(\)) operator({) comment(// For 1.9 compatibility, should check encoding compat between string and pattern) keyword(return) ident(pattern)operator(.)ident(getKCode)operator(()operator(\))operator(.)ident(getEncoding)operator(()operator(\))operator(;) operator(}) comment(// no group version) directive(private) ident(IRubyObject) ident(scanOnceNG)operator(()ident(RubyRegexp) ident(regex)operator(,) pre_type(Matcher) ident(matcher)operator(,) type(int) ident(range)operator(\)) operator({) keyword(if) operator(()ident(matcher)operator(.)ident(search)operator(()ident(matcher)operator(.)ident(value) operator(+) ident(value)operator(.)ident(begin)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\)) operator(>=) integer(0)operator(\)) operator({) type(int) ident(end) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) keyword(if) operator(()ident(matcher)operator(.)ident(getBegin)operator(()operator(\)) operator(==) ident(end)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) ident(end)operator(\)) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end) operator(+) ident(regex)operator(.)ident(getPattern)operator(()operator(\))operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(end)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end) operator(+) integer(1)operator(;) operator(}) operator(}) keyword(else) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end)operator(;) operator(}) keyword(return) ident(substr)operator(()ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(,) ident(end) operator(-) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(\))operator(.)ident(infectBy)operator(()ident(regex)operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) comment(// group version) directive(private) ident(IRubyObject) ident(scanOnce)operator(()ident(RubyRegexp) ident(regex)operator(,) pre_type(Matcher) ident(matcher)operator(,) type(int) ident(range)operator(\)) operator({) keyword(if) operator(()ident(matcher)operator(.)ident(search)operator(()ident(matcher)operator(.)ident(value) operator(+) ident(value)operator(.)ident(begin)operator(,) ident(range)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\)) operator(>=) integer(0)operator(\)) operator({) pre_type(Region) ident(region) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) type(int) ident(end) operator(=) ident(region)operator(.)ident(end)operator([)integer(0)operator(])operator(;) keyword(if) operator(()ident(region)operator(.)ident(beg)operator([)integer(0)operator(]) operator(==) ident(end)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) ident(end)operator(\)) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end) operator(+) ident(regex)operator(.)ident(getPattern)operator(()operator(\))operator(.)ident(getEncoding)operator(()operator(\))operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(end)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end) operator(+) integer(1)operator(;) operator(}) operator(}) keyword(else) operator({) ident(matcher)operator(.)ident(value) operator(=) ident(end)operator(;) operator(}) ident(RubyArray) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(region)operator(.)ident(numRegs)operator(\))operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(1)operator(;) ident(i)operator(<)ident(region)operator(.)ident(numRegs)operator(;) ident(i)operator(++)operator(\)) operator({) type(int) ident(beg) operator(=) ident(region)operator(.)ident(beg)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(beg) operator(==) operator(-)integer(1)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(result)operator(.)ident(append)operator(()ident(substr)operator(()ident(beg)operator(,) ident(region)operator(.)ident(end)operator([)ident(i)operator(]) operator(-) ident(beg)operator(\))operator(.)ident(infectBy)operator(()ident(regex)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(result)operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(private) directive(static) directive(final) ident(ByteList) ident(SPACE_BYTELIST) operator(=) keyword(new) ident(ByteList)operator(()ident(ByteList)operator(.)ident(plain)operator(()stringoperator(\))operator(\))operator(;) directive(private) directive(final) ident(IRubyObject) ident(justify)operator(()ident(IRubyObject) ident(arg0)operator(,) type(char) ident(jflag)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(width) operator(=) ident(RubyFixnum)operator(.)ident(num2int)operator(()ident(arg0)operator(\))operator(;) type(int) ident(f)operator(,) ident(flen) operator(=) integer(0)operator(;) type(byte)type([])ident(fbuf)operator(;) ident(IRubyObject) ident(pad)operator(;) ident(f) operator(=) ident(SPACE_BYTELIST)operator(.)ident(begin)operator(;) ident(flen) operator(=) ident(SPACE_BYTELIST)operator(.)ident(realSize)operator(;) ident(fbuf) operator(=) ident(SPACE_BYTELIST)operator(.)ident(bytes)operator(;) ident(pad) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(justifyCommon)operator(()ident(width)operator(,) ident(jflag)operator(,) ident(flen)operator(,) ident(fbuf)operator(,) ident(f)operator(,) ident(runtime)operator(,) ident(pad)operator(\))operator(;) operator(}) directive(private) directive(final) ident(IRubyObject) ident(justify)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(,) type(char) ident(jflag)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(width) operator(=) ident(RubyFixnum)operator(.)ident(num2int)operator(()ident(arg0)operator(\))operator(;) type(int) ident(f)operator(,) ident(flen) operator(=) integer(0)operator(;) type(byte)type([])ident(fbuf)operator(;) ident(IRubyObject) ident(pad)operator(;) ident(pad) operator(=) ident(arg1)operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(ByteList) ident(fList) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(pad)operator(\))operator(.)ident(value)operator(;) ident(f) operator(=) ident(fList)operator(.)ident(begin)operator(;) ident(flen) operator(=) ident(fList)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(flen) operator(==) integer(0)operator(\)) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) ident(fbuf) operator(=) ident(fList)operator(.)ident(bytes)operator(;) keyword(return) ident(justifyCommon)operator(()ident(width)operator(,) ident(jflag)operator(,) ident(flen)operator(,) ident(fbuf)operator(,) ident(f)operator(,) ident(runtime)operator(,) ident(pad)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(justifyCommon)operator(()type(int) ident(width)operator(,) type(char) ident(jflag)operator(,) type(int) ident(flen)operator(,) type(byte)type([]) ident(fbuf)operator(,) type(int) ident(f)operator(,) ident(Ruby) ident(runtime)operator(,) ident(IRubyObject) ident(pad)operator(\)) operator({) keyword(if) operator(()ident(width) operator(<) integer(0) operator(||) ident(value)operator(.)ident(realSize) operator(>=) ident(width)operator(\)) keyword(return) ident(strDup)operator(()ident(runtime)operator(\))operator(;) ident(ByteList) ident(res) operator(=) keyword(new) ident(ByteList)operator(()ident(width)operator(\))operator(;) ident(res)operator(.)ident(realSize) operator(=) ident(width)operator(;) type(int) ident(p) operator(=) ident(res)operator(.)ident(begin)operator(;) type(int) ident(pend)operator(;) type(byte)type([]) ident(pbuf) operator(=) ident(res)operator(.)ident(bytes)operator(;) keyword(if) operator(()ident(jflag) operator(!=) stringoperator(\)) operator({) type(int) ident(n) operator(=) ident(width) operator(-) ident(value)operator(.)ident(realSize)operator(;) ident(pend) operator(=) ident(p) operator(+) operator(()operator(()ident(jflag) operator(==) stringoperator(\)) operator(?) ident(n) operator(:) ident(n) operator(/) integer(2)operator(\))operator(;) keyword(if) operator(()ident(flen) operator(<=) integer(1)operator(\)) operator({) keyword(while) operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) ident(pbuf)operator([)ident(p)operator(++)operator(]) operator(=) ident(fbuf)operator([)ident(f)operator(])operator(;) operator(}) operator(}) keyword(else) operator({) type(int) ident(q) operator(=) ident(f)operator(;) keyword(while) operator(()ident(p) operator(+) ident(flen) operator(<=) ident(pend)operator(\)) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(fbuf)operator(,) ident(f)operator(,) ident(pbuf)operator(,) ident(p)operator(,) ident(flen)operator(\))operator(;) ident(p) operator(+=) ident(flen)operator(;) operator(}) keyword(while) operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) ident(pbuf)operator([)ident(p)operator(++)operator(]) operator(=) ident(fbuf)operator([)ident(q)operator(++)operator(])operator(;) operator(}) operator(}) operator(}) pre_type(System)operator(.)ident(arraycopy)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin)operator(,) ident(pbuf)operator(,) ident(p)operator(,) ident(value)operator(.)ident(realSize)operator(\))operator(;) keyword(if) operator(()ident(jflag) operator(!=) stringoperator(\)) operator({) ident(p) operator(+=) ident(value)operator(.)ident(realSize)operator(;) ident(pend) operator(=) ident(res)operator(.)ident(begin) operator(+) ident(width)operator(;) keyword(if) operator(()ident(flen) operator(<=) integer(1)operator(\)) operator({) keyword(while) operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) ident(pbuf)operator([)ident(p)operator(++)operator(]) operator(=) ident(fbuf)operator([)ident(f)operator(])operator(;) operator(}) operator(}) keyword(else) operator({) keyword(while) operator(()ident(p) operator(+) ident(flen) operator(<=) ident(pend)operator(\)) operator({) pre_type(System)operator(.)ident(arraycopy)operator(()ident(fbuf)operator(,) ident(f)operator(,) ident(pbuf)operator(,) ident(p)operator(,) ident(flen)operator(\))operator(;) ident(p) operator(+=) ident(flen)operator(;) operator(}) keyword(while) operator(()ident(p) operator(<) ident(pend)operator(\)) operator({) ident(pbuf)operator([)ident(p)operator(++)operator(]) operator(=) ident(fbuf)operator([)ident(f)operator(++)operator(])operator(;) operator(}) operator(}) operator(}) ident(RubyString) ident(resStr) operator(=) keyword(new) ident(RubyString)operator(()ident(runtime)operator(,) ident(getMetaClass)operator(()operator(\))operator(,) ident(res)operator(\))operator(;) ident(resStr)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) keyword(if) operator(()ident(flen) operator(>) integer(0)operator(\)) operator({) ident(resStr)operator(.)ident(infectBy)operator(()ident(pad)operator(\))operator(;) operator(}) keyword(return) ident(resStr)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated use the one or two argument versions. */) directive(public) ident(IRubyObject) ident(ljust)operator(()ident(IRubyObject) type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(ljust)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(ljust)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_ljust * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(ljust)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_str_ljust * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(ljust)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) ident(arg1)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated use the one or two argument versions. */) directive(public) ident(IRubyObject) ident(rjust)operator(()ident(IRubyObject) type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(rjust)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(rjust)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_rjust * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(rjust)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_str_rjust * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(rjust)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) ident(arg1)operator(,) stringoperator(\))operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated use the one or two argument versions. */) directive(public) ident(IRubyObject) ident(center)operator(()ident(IRubyObject) type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(1)operator(:) keyword(return) ident(center)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(case) integer(2)operator(:) keyword(return) ident(center)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_center * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(center)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) stringoperator(\))operator(;) operator(}) comment(/** rb_str_center * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(center)operator(()ident(IRubyObject) ident(arg0)operator(,) ident(IRubyObject) ident(arg1)operator(\)) operator({) keyword(return) ident(justify)operator(()ident(arg0)operator(,) ident(arg1)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(chop)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(chop_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_chop_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(chop_bang)operator(()operator(\)) operator({) type(int) ident(end) operator(=) ident(value)operator(.)ident(realSize) operator(-) integer(1)operator(;) keyword(if) operator(()ident(end) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(end)operator(])operator(\)) operator(==) stringoperator(\)) operator({) keyword(if) operator(()ident(end) operator(>) integer(0) operator(&&) operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(end) operator(-) integer(1)operator(])operator(\)) operator(==) stringoperator(\)) ident(end)operator(--)operator(;) operator(}) ident(view)operator(()integer(0)operator(,) ident(end)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby * * @param args * @return * @deprecated Use the zero or one argument versions. */) directive(public) ident(RubyString) ident(chomp)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(chomp)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(chomp)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** rb_str_chop * */) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(chomp)operator(()operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(chomp_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_chop * */) annotation(@JRubyMethod) directive(public) ident(RubyString) ident(chomp)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(chomp_bang)operator(()ident(arg0)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** * Variable-arity version for compatibility. Not bound to Ruby. * @deprecated Use the zero or one argument versions. */) directive(public) ident(IRubyObject) ident(chomp_bang)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(return) ident(chomp_bang)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(return) ident(chomp_bang)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(default)operator(:) ident(Arity)operator(.)ident(raiseArgumentError)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(.)ident(length)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(return) pre_constant(null)operator(;) comment(// not reached) operator(}) operator(}) comment(/** * rb_str_chomp_bang * * In the common case, removes CR and LF characters in various ways depending on the value of * the optional args[0]. * If args.length==0 removes one instance of CR, CRLF or LF from the end of the string. * If args.length>0 and args[0] is "\\n" then same behaviour as args.length==0 . * If args.length>0 and args[0] is "" then removes trailing multiple LF or CRLF (but no CRs at * all(!\)\). * @param args See method description. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(chomp_bang)operator(()operator(\)) operator({) ident(IRubyObject) ident(rsObj)operator(;) type(int) ident(len) operator(=) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(byte)type([])ident(buff) operator(=) ident(value)operator(.)ident(bytes)operator(;) ident(rsObj) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(rsObj) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(getDefaultSeparator)operator(()operator(\))operator(\)) operator({) type(int) ident(realSize) operator(=) ident(value)operator(.)ident(realSize)operator(;) type(int) ident(begin) operator(=) ident(value)operator(.)ident(begin)operator(;) keyword(if) operator(()ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\))stringoperator(\)) operator({) ident(realSize)operator(--)operator(;) keyword(if) operator(()ident(realSize) operator(>) integer(0) operator(&&) ident(buff)operator([)ident(begin) operator(+) ident(realSize) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\))stringoperator(\)) ident(realSize)operator(--)operator(;) ident(view)operator(()integer(0)operator(,) ident(realSize)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\))stringoperator(\)) operator({) ident(realSize)operator(--)operator(;) ident(view)operator(()integer(0)operator(,) ident(realSize)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(chompBangCommon)operator(()ident(rsObj)operator(\))operator(;) operator(}) comment(/** * rb_str_chomp_bang * * In the common case, removes CR and LF characters in various ways depending on the value of * the optional args[0]. * If args.length==0 removes one instance of CR, CRLF or LF from the end of the string. * If args.length>0 and args[0] is "\\n" then same behaviour as args.length==0 . * If args.length>0 and args[0] is "" then removes trailing multiple LF or CRLF (but no CRs at * all(!\)\). * @param args See method description. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(chomp_bang)operator(()ident(IRubyObject) ident(arg0)operator(\)) operator({) keyword(return) ident(chompBangCommon)operator(()ident(arg0)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(chompBangCommon)operator(()ident(IRubyObject) ident(rsObj)operator(\)) operator({) keyword(if) operator(()ident(rsObj)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(RubyString) ident(rs) operator(=) ident(rsObj)operator(.)ident(convertToString)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(value)operator(.)ident(realSize)operator(;) type(int) ident(begin) operator(=) ident(value)operator(.)ident(begin)operator(;) keyword(if) operator(()ident(len) operator(==) integer(0)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(byte)type([]) ident(buff) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(rslen) operator(=) ident(rs)operator(.)ident(value)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(rslen) operator(==) integer(0)operator(\)) operator({) keyword(while) operator(()ident(len) operator(>) integer(0) operator(&&) ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(len)operator(--)operator(;) keyword(if) operator(()ident(len) operator(>) integer(0) operator(&&) ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(len)operator(--)operator(;) operator(}) operator(}) keyword(if) operator(()ident(len) operator(<) ident(value)operator(.)ident(realSize)operator(\)) operator({) ident(view)operator(()integer(0)operator(,) ident(len)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(rslen) operator(>) ident(len)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) type(byte) ident(newline) operator(=) ident(rs)operator(.)ident(value)operator(.)ident(bytes)operator([)ident(rslen) operator(-) integer(1)operator(])operator(;) keyword(if) operator(()ident(rslen) operator(==) integer(1) operator(&&) ident(newline) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(buff) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(realSize) operator(=) ident(value)operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(realSize)operator(--)operator(;) keyword(if) operator(()ident(realSize) operator(>) integer(0) operator(&&) ident(buff)operator([)ident(begin) operator(+) ident(realSize) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(realSize)operator(--)operator(;) operator(}) ident(view)operator(()integer(0)operator(,) ident(realSize)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\)) stringoperator(\)) operator({) ident(realSize)operator(--)operator(;) ident(view)operator(()integer(0)operator(,) ident(realSize)operator(\))operator(;) operator(}) keyword(else) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) keyword(if) operator(()ident(buff)operator([)ident(begin) operator(+) ident(len) operator(-) integer(1)operator(]) operator(==) ident(newline) operator(&&) ident(rslen) operator(<=) integer(1) operator(||) ident(value)operator(.)ident(endsWith)operator(()ident(rs)operator(.)ident(value)operator(\))operator(\)) operator({) ident(view)operator(()integer(0)operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(rslen)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_lstrip * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(lstrip)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(lstrip_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_lstrip_bang */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(lstrip_bang)operator(()operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(i)operator(=)integer(0)operator(;) keyword(while) operator(()ident(i) operator(<) ident(value)operator(.)ident(realSize) operator(&&) ident(ASCII)operator(.)ident(isSpace)operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(i)operator(]) operator(&) hex(0xff)operator(\))operator(\)) ident(i)operator(++)operator(;) keyword(if) operator(()ident(i) operator(>) integer(0)operator(\)) operator({) ident(view)operator(()ident(i)operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(i)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_rstrip * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(rstrip)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(rstrip_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_rstrip_bang */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rstrip_bang)operator(()operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(i)operator(=)ident(value)operator(.)ident(realSize) operator(-) integer(1)operator(;) keyword(while) operator(()ident(i) operator(>=) integer(0) operator(&&) ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin)operator(+)ident(i)operator(]) operator(==) integer(0)operator(\)) ident(i)operator(--)operator(;) keyword(while) operator(()ident(i) operator(>=) integer(0) operator(&&) ident(ASCII)operator(.)ident(isSpace)operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(i)operator(]) operator(&) hex(0xff)operator(\))operator(\)) ident(i)operator(--)operator(;) keyword(if) operator(()ident(i) operator(<) ident(value)operator(.)ident(realSize) operator(-) integer(1)operator(\)) operator({) ident(view)operator(()integer(0)operator(,) ident(i) operator(+) integer(1)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_strip * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(strip)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(strip_bang)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_strip_bang */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(strip_bang)operator(()operator(\)) operator({) ident(IRubyObject) ident(l) operator(=) ident(lstrip_bang)operator(()operator(\))operator(;) ident(IRubyObject) ident(r) operator(=) ident(rstrip_bang)operator(()operator(\))operator(;) keyword(if)operator(()ident(l)operator(.)ident(isNil)operator(()operator(\)) operator(&&) ident(r)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(l)operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_count * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(count)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(1)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(;) type(boolean)type([])ident(table) operator(=) keyword(new) type(boolean)operator([)ident(TRANS_SIZE)operator(])operator(;) type(boolean) ident(init) operator(=) pre_constant(true)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(s)operator(.)ident(setup_table)operator(()ident(table)operator(,) ident(init)operator(\))operator(;) ident(init) operator(=) pre_constant(false)operator(;) operator(}) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte)type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(i) operator(=) integer(0)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) keyword(if) operator(()ident(table)operator([)ident(buf)operator([)ident(s)operator(++)operator(]) operator(&) hex(0xff)operator(])operator(\)) ident(i)operator(++)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(;) operator(}) comment(/** rb_str_delete * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(delete)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(delete_bang)operator(()ident(args)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_delete_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(delete_bang)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(<) integer(1)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) type(boolean)type([])ident(squeeze) operator(=) keyword(new) type(boolean)operator([)ident(TRANS_SIZE)operator(])operator(;) type(boolean) ident(init) operator(=) pre_constant(true)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(s)operator(.)ident(setup_table)operator(()ident(squeeze)operator(,) ident(init)operator(\))operator(;) ident(init) operator(=) pre_constant(false)operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(t) operator(=) ident(s)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte)type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) keyword(if) operator(()ident(squeeze)operator([)ident(buf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(])operator(\)) operator({) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) operator({) ident(buf)operator([)ident(t)operator(++)operator(]) operator(=) ident(buf)operator([)ident(s)operator(])operator(;) operator(}) ident(s)operator(++)operator(;) operator(}) ident(value)operator(.)ident(realSize) operator(=) ident(t) operator(-) ident(value)operator(.)ident(begin)operator(;) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_squeeze * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(squeeze)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(squeeze_bang)operator(()ident(args)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_squeeze_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(squeeze_bang)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(modifyCheck)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(final) type(boolean) ident(squeeze)type([]) operator(=) keyword(new) type(boolean)operator([)ident(TRANS_SIZE)operator(])operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(squeeze)operator([)ident(i)operator(]) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) operator({) type(boolean) ident(init) operator(=) pre_constant(true)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubyString) ident(s) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(s)operator(.)ident(setup_table)operator(()ident(squeeze)operator(,) ident(init)operator(\))operator(;) ident(init) operator(=) pre_constant(false)operator(;) operator(}) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(t) operator(=) ident(s)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte)type([])ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) type(int) ident(save) operator(=) operator(-)integer(1)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) type(int) ident(c) operator(=) ident(buf)operator([)ident(s)operator(++)operator(]) operator(&) hex(0xff)operator(;) keyword(if) operator(()ident(c) operator(!=) ident(save) operator(||) operator(!)ident(squeeze)operator([)ident(c)operator(])operator(\)) ident(buf)operator([)ident(t)operator(++)operator(]) operator(=) operator(()type(byte)operator(\))operator(()ident(save) operator(=) ident(c)operator(\))operator(;) operator(}) keyword(if) operator(()ident(t) operator(-) ident(value)operator(.)ident(begin) operator(!=) ident(value)operator(.)ident(realSize)operator(\)) operator({) comment(// modified) ident(value)operator(.)ident(realSize) operator(=) ident(t) operator(-) ident(value)operator(.)ident(begin)operator(;) keyword(return) local_variable(this)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** rb_str_tr * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(tr)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(repl)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(tr_trans)operator(()ident(src)operator(,) ident(repl)operator(,) pre_constant(false)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_tr_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(tr_bang)operator(()ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(repl)operator(\)) operator({) keyword(return) ident(tr_trans)operator(()ident(src)operator(,) ident(repl)operator(,) pre_constant(false)operator(\))operator(;) operator(}) directive(private) directive(static) directive(final) type(class) class(TR) operator({) type(int) ident(gen)operator(,) ident(now)operator(,) ident(max)operator(;) type(int) ident(p)operator(,) ident(pend)operator(;) type(byte)type([])ident(buf)operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(TRANS_SIZE) operator(=) integer(256)operator(;) comment(/** tr_setup_table * */) directive(private) directive(final) type(void) ident(setup_table)operator(()type(boolean)type([])ident(table)operator(,) type(boolean) ident(init)operator(\)) operator({) directive(final) type(boolean)type([])ident(buf) operator(=) keyword(new) type(boolean)operator([)ident(TRANS_SIZE)operator(])operator(;) directive(final) ident(TR) ident(tr) operator(=) keyword(new) ident(TR)operator(()operator(\))operator(;) type(int) ident(c)operator(;) type(boolean) ident(cflag) operator(=) pre_constant(false)operator(;) ident(tr)operator(.)ident(p) operator(=) ident(value)operator(.)ident(begin)operator(;) ident(tr)operator(.)ident(pend) operator(=) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(;) ident(tr)operator(.)ident(buf) operator(=) ident(value)operator(.)ident(bytes)operator(;) ident(tr)operator(.)ident(gen) operator(=) ident(tr)operator(.)ident(now) operator(=) ident(tr)operator(.)ident(max) operator(=) integer(0)operator(;) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) integer(1) operator(&&) ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin)operator(]) operator(==) stringoperator(\)) operator({) ident(cflag) operator(=) pre_constant(true)operator(;) ident(tr)operator(.)ident(p)operator(++)operator(;) operator(}) keyword(if) operator(()ident(init)operator(\)) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(table)operator([)ident(i)operator(]) operator(=) pre_constant(true)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(buf)operator([)ident(i)operator(]) operator(=) ident(cflag)operator(;) keyword(while) operator(()operator(()ident(c) operator(=) ident(trnext)operator(()ident(tr)operator(\))operator(\)) operator(>=) integer(0)operator(\)) ident(buf)operator([)ident(c) operator(&) hex(0xff)operator(]) operator(=) operator(!)ident(cflag)operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(table)operator([)ident(i)operator(]) operator(=) ident(table)operator([)ident(i)operator(]) operator(&&) ident(buf)operator([)ident(i)operator(])operator(;) operator(}) comment(/** tr_trans * */) directive(private) directive(final) ident(IRubyObject) ident(tr_trans)operator(()ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(repl)operator(,) type(boolean) ident(sflag)operator(\)) operator({) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ByteList) ident(replList) operator(=) ident(repl)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(value)operator(;) keyword(if) operator(()ident(replList)operator(.)ident(realSize) operator(==) integer(0)operator(\)) keyword(return) ident(delete_bang)operator(()keyword(new) ident(IRubyObject)type([])operator({)ident(src)operator(})operator(\))operator(;) ident(ByteList) ident(srcList) operator(=) ident(src)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(value)operator(;) directive(final) ident(TR) ident(trsrc) operator(=) keyword(new) ident(TR)operator(()operator(\))operator(;) directive(final) ident(TR) ident(trrepl) operator(=) keyword(new) ident(TR)operator(()operator(\))operator(;) type(boolean) ident(cflag) operator(=) pre_constant(false)operator(;) type(boolean) ident(modify) operator(=) pre_constant(false)operator(;) ident(trsrc)operator(.)ident(p) operator(=) ident(srcList)operator(.)ident(begin)operator(;) ident(trsrc)operator(.)ident(pend) operator(=) ident(srcList)operator(.)ident(begin) operator(+) ident(srcList)operator(.)ident(realSize)operator(;) ident(trsrc)operator(.)ident(buf) operator(=) ident(srcList)operator(.)ident(bytes)operator(;) keyword(if) operator(()ident(srcList)operator(.)ident(realSize) operator(>=) integer(2) operator(&&) ident(srcList)operator(.)ident(bytes)operator([)ident(srcList)operator(.)ident(begin)operator(]) operator(==) stringoperator(\)) operator({) ident(cflag) operator(=) pre_constant(true)operator(;) ident(trsrc)operator(.)ident(p)operator(++)operator(;) operator(}) ident(trrepl)operator(.)ident(p) operator(=) ident(replList)operator(.)ident(begin)operator(;) ident(trrepl)operator(.)ident(pend) operator(=) ident(replList)operator(.)ident(begin) operator(+) ident(replList)operator(.)ident(realSize)operator(;) ident(trrepl)operator(.)ident(buf) operator(=) ident(replList)operator(.)ident(bytes)operator(;) ident(trsrc)operator(.)ident(gen) operator(=) ident(trrepl)operator(.)ident(gen) operator(=) integer(0)operator(;) ident(trsrc)operator(.)ident(now) operator(=) ident(trrepl)operator(.)ident(now) operator(=) integer(0)operator(;) ident(trsrc)operator(.)ident(max) operator(=) ident(trrepl)operator(.)ident(max) operator(=) integer(0)operator(;) type(int) ident(c)operator(;) directive(final) type(int)type([])ident(trans) operator(=) keyword(new) type(int)operator([)ident(TRANS_SIZE)operator(])operator(;) keyword(if) operator(()ident(cflag)operator(\)) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(trans)operator([)ident(i)operator(]) operator(=) integer(1)operator(;) keyword(while) operator(()operator(()ident(c) operator(=) ident(trnext)operator(()ident(trsrc)operator(\))operator(\)) operator(>=) integer(0)operator(\)) ident(trans)operator([)ident(c) operator(&) hex(0xff)operator(]) operator(=) operator(-)integer(1)operator(;) keyword(while) operator(()operator(()ident(c) operator(=) ident(trnext)operator(()ident(trrepl)operator(\))operator(\)) operator(>=) integer(0)operator(\))operator(;) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(trans)operator([)ident(i)operator(]) operator(>=) integer(0)operator(\)) ident(trans)operator([)ident(i)operator(]) operator(=) ident(trrepl)operator(.)ident(now)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(;) ident(i)operator(<)ident(TRANS_SIZE)operator(;) ident(i)operator(++)operator(\)) ident(trans)operator([)ident(i)operator(]) operator(=) operator(-)integer(1)operator(;) keyword(while) operator(()operator(()ident(c) operator(=) ident(trnext)operator(()ident(trsrc)operator(\))operator(\)) operator(>=) integer(0)operator(\)) operator({) type(int) ident(r) operator(=) ident(trnext)operator(()ident(trrepl)operator(\))operator(;) keyword(if) operator(()ident(r) operator(==) operator(-)integer(1)operator(\)) ident(r) operator(=) ident(trrepl)operator(.)ident(now)operator(;) ident(trans)operator([)ident(c) operator(&) hex(0xff)operator(]) operator(=) ident(r)operator(;) operator(}) operator(}) ident(modify)operator(()operator(\))operator(;) type(int) ident(s) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(send) operator(=) ident(s) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(byte) ident(sbuf)type([]) operator(=) ident(value)operator(.)ident(bytes)operator(;) keyword(if) operator(()ident(sflag)operator(\)) operator({) type(int) ident(t) operator(=) ident(s)operator(;) type(int) ident(c0)operator(,) ident(last) operator(=) operator(-)integer(1)operator(;) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) ident(c0) operator(=) ident(sbuf)operator([)ident(s)operator(++)operator(])operator(;) keyword(if) operator(()operator(()ident(c) operator(=) ident(trans)operator([)ident(c0) operator(&) hex(0xff)operator(])operator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(if) operator(()ident(last) operator(==) ident(c)operator(\)) keyword(continue)operator(;) ident(last) operator(=) ident(c)operator(;) ident(sbuf)operator([)ident(t)operator(++)operator(]) operator(=) operator(()type(byte)operator(\))operator(()ident(c) operator(&) hex(0xff)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) keyword(else) operator({) ident(last) operator(=) operator(-)integer(1)operator(;) ident(sbuf)operator([)ident(t)operator(++)operator(]) operator(=) operator(()type(byte)operator(\))ident(c0)operator(;) operator(}) operator(}) keyword(if) operator(()ident(value)operator(.)ident(realSize) operator(>) operator(()ident(t) operator(-) ident(value)operator(.)ident(begin)operator(\))operator(\)) operator({) ident(value)operator(.)ident(realSize) operator(=) ident(t) operator(-) ident(value)operator(.)ident(begin)operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(else) operator({) keyword(while) operator(()ident(s) operator(<) ident(send)operator(\)) operator({) keyword(if) operator(()operator(()ident(c) operator(=) ident(trans)operator([)ident(sbuf)operator([)ident(s)operator(]) operator(&) hex(0xff)operator(])operator(\)) operator(>=) integer(0)operator(\)) operator({) ident(sbuf)operator([)ident(s)operator(]) operator(=) operator(()type(byte)operator(\))operator(()ident(c) operator(&) hex(0xff)operator(\))operator(;) ident(modify) operator(=) pre_constant(true)operator(;) operator(}) ident(s)operator(++)operator(;) operator(}) operator(}) keyword(if) operator(()ident(modify)operator(\)) keyword(return) local_variable(this)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** trnext * */) directive(private) directive(final) type(int) ident(trnext)operator(()ident(TR) ident(t)operator(\)) operator({) type(byte) type([]) ident(buf) operator(=) ident(t)operator(.)ident(buf)operator(;) keyword(for) operator(()operator(;)operator(;)operator(\)) operator({) keyword(if) operator(()ident(t)operator(.)ident(gen) operator(==) integer(0)operator(\)) operator({) keyword(if) operator(()ident(t)operator(.)ident(p) operator(==) ident(t)operator(.)ident(pend)operator(\)) keyword(return) operator(-)integer(1)operator(;) keyword(if) operator(()ident(t)operator(.)ident(p) operator(<) ident(t)operator(.)ident(pend) operator(-)integer(1) operator(&&) ident(buf)operator([)ident(t)operator(.)ident(p)operator(]) operator(==) stringoperator(\)) ident(t)operator(.)ident(p)operator(++)operator(;) ident(t)operator(.)ident(now) operator(=) ident(buf)operator([)ident(t)operator(.)ident(p)operator(++)operator(])operator(;) keyword(if) operator(()ident(t)operator(.)ident(p) operator(<) ident(t)operator(.)ident(pend) operator(-) integer(1) operator(&&) ident(buf)operator([)ident(t)operator(.)ident(p)operator(]) operator(==) stringoperator(\)) operator({) ident(t)operator(.)ident(p)operator(++)operator(;) keyword(if) operator(()ident(t)operator(.)ident(p) operator(<) ident(t)operator(.)ident(pend)operator(\)) operator({) keyword(if) operator(()ident(t)operator(.)ident(now) operator(>) operator(()operator(()type(int)operator(\))ident(buf)operator([)ident(t)operator(.)ident(p)operator(]) operator(&) hex(0xFF)operator(\))operator(\)) operator({) ident(t)operator(.)ident(p)operator(++)operator(;) keyword(continue)operator(;) operator(}) ident(t)operator(.)ident(gen) operator(=) integer(1)operator(;) ident(t)operator(.)ident(max) operator(=) operator(()type(int)operator(\))ident(buf)operator([)ident(t)operator(.)ident(p)operator(++)operator(]) operator(&) hex(0xFF)operator(;) operator(}) operator(}) keyword(return) ident(t)operator(.)ident(now) operator(&) hex(0xff)operator(;) operator(}) keyword(else) keyword(if) operator(()operator(++)ident(t)operator(.)ident(now) operator(<) ident(t)operator(.)ident(max)operator(\)) operator({) keyword(return) ident(t)operator(.)ident(now) operator(&) hex(0xff)operator(;) operator(}) keyword(else) operator({) ident(t)operator(.)ident(gen) operator(=) integer(0)operator(;) keyword(return) ident(t)operator(.)ident(max) operator(&) hex(0xff)operator(;) operator(}) operator(}) operator(}) comment(/** rb_str_tr_s * */) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(tr_s)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(repl)operator(\)) operator({) ident(RubyString) ident(str) operator(=) ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(str)operator(.)ident(tr_trans)operator(()ident(src)operator(,) ident(repl)operator(,) pre_constant(true)operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) comment(/** rb_str_tr_s_bang * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(tr_s_bang)operator(()ident(IRubyObject) ident(src)operator(,) ident(IRubyObject) ident(repl)operator(\)) operator({) keyword(return) ident(tr_trans)operator(()ident(src)operator(,) ident(repl)operator(,) pre_constant(true)operator(\))operator(;) operator(}) comment(/** rb_str_each_line * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(0)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_line)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) type(byte) ident(newline)operator(;) type(int) ident(p) operator(=) ident(value)operator(.)ident(begin)operator(;) type(int) ident(pend) operator(=) ident(p) operator(+) ident(value)operator(.)ident(realSize)operator(;) type(int) ident(s)operator(;) type(int) ident(ptr) operator(=) ident(p)operator(;) type(int) ident(len) operator(=) ident(value)operator(.)ident(realSize)operator(;) type(int) ident(rslen)operator(;) ident(IRubyObject) ident(line)operator(;) ident(IRubyObject) ident(_rsep)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(_rsep) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) operator(}) keyword(else) operator({) ident(_rsep) operator(=) ident(args)operator([)integer(0)operator(])operator(;) operator(}) keyword(if)operator(()ident(_rsep)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) local_variable(this)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) ident(RubyString) ident(rsep) operator(=) ident(stringValue)operator(()ident(_rsep)operator(\))operator(;) ident(ByteList) ident(rsepValue) operator(=) ident(rsep)operator(.)ident(value)operator(;) type(byte)type([]) ident(strBytes) operator(=) ident(value)operator(.)ident(bytes)operator(;) ident(rslen) operator(=) ident(rsepValue)operator(.)ident(realSize)operator(;) keyword(if)operator(()ident(rslen) operator(==) integer(0)operator(\)) operator({) ident(newline) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(newline) operator(=) ident(rsepValue)operator(.)ident(bytes)operator([)ident(rsepValue)operator(.)ident(begin) operator(+) ident(rslen)operator(-)integer(1)operator(])operator(;) operator(}) ident(s) operator(=) ident(p)operator(;) ident(p)operator(+=)ident(rslen)operator(;) keyword(for)operator(()operator(;) ident(p) operator(<) ident(pend)operator(;) ident(p)operator(++)operator(\)) operator({) keyword(if)operator(()ident(rslen) operator(==) integer(0) operator(&&) ident(strBytes)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) keyword(if)operator(()ident(strBytes)operator([)operator(++)ident(p)operator(]) operator(!=) stringoperator(\)) operator({) keyword(continue)operator(;) operator(}) keyword(while)operator(()ident(p) operator(<) ident(pend) operator(&&) ident(strBytes)operator([)ident(p)operator(]) operator(==) stringoperator(\)) operator({) ident(p)operator(++)operator(;) operator(}) operator(}) keyword(if)operator(()ident(ptr)operator(<)ident(p) operator(&&) ident(strBytes)operator([)ident(p)operator(-)integer(1)operator(]) operator(==) ident(newline) operator(&&) operator(()ident(rslen) operator(<=) integer(1) operator(||) ident(ByteList)operator(.)ident(memcmp)operator(()ident(rsepValue)operator(.)ident(bytes)operator(,) ident(rsepValue)operator(.)ident(begin)operator(,) ident(rslen)operator(,) ident(strBytes)operator(,) ident(p)operator(-)ident(rslen)operator(,) ident(rslen)operator(\)) operator(==) integer(0)operator(\))operator(\)) operator({) ident(line) operator(=) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) local_variable(this)operator(.)ident(value)operator(.)ident(makeShared)operator(()ident(s)operator(-)ident(ptr)operator(,) ident(p)operator(-)ident(s)operator(\))operator(\))operator(;) ident(line)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(line)operator(\))operator(;) ident(modifyCheck)operator(()ident(strBytes)operator(,)ident(len)operator(\))operator(;) ident(s) operator(=) ident(p)operator(;) operator(}) operator(}) keyword(if)operator(()ident(s) operator(!=) ident(pend)operator(\)) operator({) keyword(if)operator(()ident(p) operator(>) ident(pend)operator(\)) operator({) ident(p) operator(=) ident(pend)operator(;) operator(}) ident(line) operator(=) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(,) local_variable(this)operator(.)ident(value)operator(.)ident(makeShared)operator(()ident(s)operator(-)ident(ptr)operator(,) ident(p)operator(-)ident(s)operator(\))operator(\))operator(;) ident(line)operator(.)ident(infectBy)operator(()local_variable(this)operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(line)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** * rb_str_each_byte */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyString) ident(each_byte)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) comment(// Check the length every iteration, since) comment(// the block can modify this string.) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(&) hex(0xFF)operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) comment(/** rb_str_intern * */) directive(public) ident(RubySymbol) ident(intern)operator(()operator(\)) operator({) pre_type(String) ident(s) operator(=) ident(toString)operator(()operator(\))operator(;) keyword(if) operator(()ident(s)operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(s)operator(.)ident(indexOf)operator(()stringoperator(\)) operator(>=) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newSymbol)operator(()ident(s)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubySymbol) ident(to_sym)operator(()operator(\)) operator({) keyword(return) ident(intern)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(RubyInteger) ident(sum)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) type(long) ident(bitSize) operator(=) integer(16)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) type(long) ident(bitSizeArg) operator(=) operator(()operator(()ident(RubyInteger)operator(\)) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToInteger)operator(()operator(\))operator(\))operator(.)ident(getLongValue)operator(()operator(\))operator(;) keyword(if) operator(()ident(bitSizeArg) operator(>) integer(0)operator(\)) operator({) ident(bitSize) operator(=) ident(bitSizeArg)operator(;) operator(}) operator(}) type(long) ident(result) operator(=) integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(value)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(result) operator(+=) ident(value)operator(.)ident(get)operator(()ident(i)operator(\)) operator(&) hex(0xFF)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(bitSize) operator(==) integer(0) operator(?) ident(result) operator(:) ident(result) operator(%) operator(()type(long)operator(\)) pre_type(Math)operator(.)ident(pow)operator(()integer(2)operator(,) ident(bitSize)operator(\))operator(\))operator(;) operator(}) comment(/** string_to_c * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(to_c)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(IRubyObject) ident(backref) operator(=) ident(frame)operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(backref) operator(!=) pre_constant(null) operator(&&) ident(backref) keyword(instanceof) ident(RubyMatchData)operator(\)) operator(()operator(()ident(RubyMatchData)operator(\))ident(backref)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) ident(IRubyObject) ident(s) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(() ident(context)operator(,) local_variable(this)operator(,) stringoperator(,) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(ComplexPatterns)operator(.)ident(underscores_pat)operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(\))operator(;) ident(RubyArray) ident(a) operator(=) ident(RubyComplex)operator(.)ident(str_to_c_internal)operator(()ident(context)operator(,) ident(s)operator(\))operator(;) ident(frame)operator(.)ident(setBackRef)operator(()ident(backref)operator(\))operator(;) keyword(if) operator(()operator(!)ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RubyComplex)operator(.)ident(newComplexCanonicalize)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(}) comment(/** string_to_r * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(reads) operator(=) ident(BACKREF)operator(,) ident(writes) operator(=) ident(BACKREF)operator(,) ident(compat) operator(=) ident(CompatVersion)operator(.)ident(RUBY1_9)operator(\)) directive(public) ident(IRubyObject) ident(to_r)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(IRubyObject) ident(backref) operator(=) ident(frame)operator(.)ident(getBackRef)operator(()operator(\))operator(;) keyword(if) operator(()ident(backref) operator(!=) pre_constant(null) operator(&&) ident(backref) keyword(instanceof) ident(RubyMatchData)operator(\)) operator(()operator(()ident(RubyMatchData)operator(\))ident(backref)operator(\))operator(.)ident(use)operator(()operator(\))operator(;) ident(IRubyObject) ident(s) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(() ident(context)operator(,) local_variable(this)operator(,) stringoperator(,) ident(RubyRegexp)operator(.)ident(newRegexp)operator(()ident(runtime)operator(,) ident(Numeric)operator(.)ident(ComplexPatterns)operator(.)ident(underscores_pat)operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()keyword(new) ident(ByteList)operator(()keyword(new) type(byte)type([])operator({)stringoperator(})operator(\))operator(\))operator(\))operator(;) ident(RubyArray) ident(a) operator(=) ident(RubyRational)operator(.)ident(str_to_r_internal)operator(()ident(context)operator(,) ident(s)operator(\))operator(;) ident(frame)operator(.)ident(setBackRef)operator(()ident(backref)operator(\))operator(;) keyword(if) operator(()operator(!)ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) ident(a)operator(.)ident(eltInternal)operator(()integer(0)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RubyRational)operator(.)ident(newRationalCanonicalize)operator(()ident(context)operator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(runtime)operator(\))operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyString) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(RubyString) ident(result) operator(=) ident(newString)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) comment(/** * @see org.jruby.util.Pack#unpack */) annotation(@JRubyMethod) directive(public) ident(RubyArray) ident(unpack)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) keyword(return) ident(Pack)operator(.)ident(unpack)operator(()ident(getRuntime)operator(()operator(\))operator(,) local_variable(this)operator(.)ident(value)operator(,) ident(stringValue)operator(()ident(obj)operator(\))operator(.)ident(value)operator(\))operator(;) operator(}) directive(public) type(void) ident(empty)operator(()operator(\)) operator({) ident(value) operator(=) ident(ByteList)operator(.)ident(EMPTY_BYTELIST)operator(;) ident(shareLevel) operator(=) ident(SHARE_LEVEL_BYTELIST)operator(;) operator(}) comment(/** * Mutator for internal string representation. * * @param value The new java.lang.String this RubyString should encapsulate * @deprecated */) directive(public) type(void) ident(setValue)operator(()pre_type(CharSequence) ident(value)operator(\)) operator({) ident(view)operator(()ident(ByteList)operator(.)ident(plain)operator(()ident(value)operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(setValue)operator(()ident(ByteList) ident(value)operator(\)) operator({) ident(view)operator(()ident(value)operator(\))operator(;) operator(}) directive(public) pre_type(CharSequence) ident(getValue)operator(()operator(\)) operator({) keyword(return) ident(toString)operator(()operator(\))operator(;) operator(}) directive(public) type(byte)type([]) ident(getBytes)operator(()operator(\)) operator({) keyword(return) ident(value)operator(.)ident(bytes)operator(()operator(\))operator(;) operator(}) directive(public) ident(ByteList) ident(getByteList)operator(()operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) comment(/** used by ar-jdbc * */) directive(public) pre_type(String) ident(getUnicodeValue)operator(()operator(\)) operator({) keyword(try) operator({) keyword(return) keyword(new) pre_type(String)operator(()ident(value)operator(.)ident(bytes)operator(,)ident(value)operator(.)ident(begin)operator(,)ident(value)operator(.)ident(realSize)operator(,) stringoperator(\))operator(;) operator(}) keyword(catch) operator(()exception(Exception) ident(e)operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(,) ident(e)operator(\))operator(;) operator(}) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(to_java)operator(()operator(\)) operator({) keyword(return) ident(MiniJava)operator(.)ident(javaToRuby)operator(()ident(getRuntime)operator(()operator(\))operator(,) keyword(new) pre_type(String)operator(()ident(getBytes)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Ryan Bell * Copyright (C\) 2007 Thomas E Enebo * Copyright (C\) 2008 Vladimir Sizikov * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(org.jruby.anno.FrameField)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.TypeConverter)operator(;) keyword(import) include(org.jruby.util.io.InvalidValueException)operator(;) keyword(import) include(org.jruby.util.io.ModeFlags)operator(;) keyword(import) include(org.jruby.util.io.Stream)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyStringIO) directive(extends) ident(RubyObject) operator({) directive(private) directive(static) ident(ObjectAllocator) ident(STRINGIO_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyStringIO)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createStringIOClass)operator(()directive(final) ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(stringIOClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(() stringoperator(,) ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(STRINGIO_ALLOCATOR)operator(\))operator(;) ident(stringIOClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyStringIO)operator(.)ident(class)operator(\))operator(;) ident(stringIOClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) keyword(return) ident(stringIOClass)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyStringIO) ident(strio) operator(=) operator(()ident(RubyStringIO)operator(\))operator(()operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) ident(IRubyObject) ident(val) operator(=) ident(strio)operator(;) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(val) operator(=) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(strio)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(strio)operator(.)ident(doFinalize)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(val)operator(;) operator(}) directive(protected) ident(RubyStringIO)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) directive(private) type(long) ident(pos) operator(=) integer(0L)operator(;) directive(private) type(int) ident(lineno) operator(=) integer(0)operator(;) directive(private) type(boolean) ident(eof) operator(=) pre_constant(false)operator(;) comment(/** * ATTN: the value of internal might be reset to null * (during StringIO.open with block\), so watch out for that. */) directive(private) ident(RubyString) ident(internal)operator(;) comment(// Has read/write been closed or is it still open for business) directive(private) type(boolean) ident(closedRead) operator(=) pre_constant(false)operator(;) directive(private) type(boolean) ident(closedWrite) operator(=) pre_constant(false)operator(;) comment(// Support IO modes that this object was opened with) ident(ModeFlags) ident(modes)operator(;) directive(private) type(void) ident(initializeModes)operator(()pre_type(Object) ident(modeArgument)operator(\)) operator({) keyword(try) operator({) keyword(if) operator(()ident(modeArgument) operator(==) pre_constant(null)operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(RubyIO)operator(.)ident(getIOModesIntFromString)operator(()ident(getRuntime)operator(()operator(\))operator(,) stringoperator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(modeArgument) keyword(instanceof) pre_type(Long)operator(\)) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()operator(()operator(()pre_type(Long)operator(\))ident(modeArgument)operator(\))operator(.)ident(longValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(modes) operator(=) keyword(new) ident(ModeFlags)operator(()ident(RubyIO)operator(.)ident(getIOModesIntFromString)operator(()ident(getRuntime)operator(()operator(\))operator(,) operator(()pre_type(String)operator(\)) ident(modeArgument)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(catch) operator(()ident(InvalidValueException) ident(e)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) operator(}) ident(setupModes)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) pre_type(Object) ident(modeArgument) operator(=) pre_constant(null)operator(;) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) ident(internal) operator(=) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(modeArgument) operator(=) stringoperator(;) keyword(break)operator(;) keyword(case) integer(1)operator(:) ident(internal) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) ident(modeArgument) operator(=) ident(internal)operator(.)ident(isFrozen)operator(()operator(\)) operator(?) string operator(:) stringoperator(;) keyword(break)operator(;) keyword(case) integer(2)operator(:) ident(internal) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator([)integer(1)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(modeArgument) operator(=) ident(RubyFixnum)operator(.)ident(fix2long)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) ident(modeArgument) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(break)operator(;) operator(}) ident(initializeModes)operator(()ident(modeArgument)operator(\))operator(;) keyword(if) operator(()ident(modes)operator(.)ident(isWritable)operator(()operator(\)) operator(&&) ident(internal)operator(.)ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEACCESError)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(modes)operator(.)ident(isTruncate)operator(()operator(\))operator(\)) operator({) ident(internal)operator(.)ident(modifyCheck)operator(()operator(\))operator(;) ident(internal)operator(.)ident(empty)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) ident(RubyStringIO) ident(otherIO) operator(=) operator(()ident(RubyStringIO)operator(\)) ident(TypeConverter)operator(.)ident(convertToType)operator(() ident(other)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(,) ident(MethodIndex)operator(.)ident(getIndex)operator(()stringoperator(\))operator(,) stringoperator(\))operator(;) keyword(if) operator(()local_variable(this) operator(==) ident(otherIO)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) ident(pos) operator(=) ident(otherIO)operator(.)ident(pos)operator(;) ident(lineno) operator(=) ident(otherIO)operator(.)ident(lineno)operator(;) ident(eof) operator(=) ident(otherIO)operator(.)ident(eof)operator(;) ident(closedRead) operator(=) ident(otherIO)operator(.)ident(closedRead)operator(;) ident(closedWrite) operator(=) ident(otherIO)operator(.)ident(closedWrite)operator(;) ident(internal) operator(=) ident(otherIO)operator(.)ident(internal)operator(;) ident(modes) operator(=) ident(otherIO)operator(.)ident(modes)operator(;) keyword(if) operator(()ident(otherIO)operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(append)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(writeInternal)operator(()ident(context)operator(,) ident(arg)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(binmode)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) ident(checkOpen)operator(()operator(\))operator(;) ident(closedRead) operator(=) pre_constant(true)operator(;) ident(closedWrite) operator(=) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(doFinalize)operator(()operator(\)) operator({) ident(closedRead) operator(=) pre_constant(true)operator(;) ident(closedWrite) operator(=) pre_constant(true)operator(;) ident(internal) operator(=) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(closed_p)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(closedRead) operator(&&) ident(closedWrite)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close_read)operator(()operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) ident(closedRead) operator(=) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(closed_read_p)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(closedRead)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close_write)operator(()operator(\)) operator({) ident(checkWritable)operator(()operator(\))operator(;) ident(closedWrite) operator(=) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(closed_write_p)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(closedWrite)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) keyword(while) operator(()operator(!)ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(line)operator(\))operator(;) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_byte)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ByteList) ident(bytes) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(;) comment(// Check the length every iteration, since) comment(// the block can modify this string.) keyword(while) operator(()ident(pos) operator(<) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newFixnum)operator(()ident(bytes)operator(.)ident(get)operator(()operator(()type(int)operator(\)) ident(pos)operator(++)operator(\)) operator(&) hex(0xFF)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_line)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(each)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(eof)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isEOF)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) type(boolean) ident(isEOF)operator(()operator(\)) operator({) keyword(return) operator(()ident(pos) operator(>=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\)) operator(||) ident(eof)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(fcntl)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(fileno)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(flush)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(fsync)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(getc)operator(()operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(get)operator(()operator(()type(int)operator(\))ident(pos)operator(++)operator(\)) operator(&) hex(0xFF)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(internalGets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(&&) operator(!)ident(eof)operator(\)) operator({) type(boolean) ident(isParagraph) operator(=) pre_constant(false)operator(;) ident(ByteList) ident(sep)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(ByteList) ident(buf) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(makeShared)operator(() operator(()type(int)operator(\))ident(pos)operator(,) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(-) operator(()type(int)operator(\))ident(pos)operator(\))operator(;) ident(pos) operator(+=) ident(buf)operator(.)ident(realSize)operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,) ident(buf)operator(\))operator(;) operator(}) ident(sep) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(sep)operator(.)ident(realSize) operator(==) integer(0)operator(\)) operator({) ident(isParagraph) operator(=) pre_constant(true)operator(;) ident(sep) operator(=) ident(Stream)operator(.)ident(PARAGRAPH_SEPARATOR)operator(;) operator(}) operator(}) keyword(else) operator({) ident(sep) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) ident(ByteList) ident(ss) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(isParagraph)operator(\)) operator({) ident(swallowLF)operator(()ident(ss)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) ident(ss)operator(.)ident(realSize)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) type(int) ident(ix) operator(=) ident(ss)operator(.)ident(indexOf)operator(()ident(sep)operator(,) operator(()type(int)operator(\))ident(pos)operator(\))operator(;) ident(ByteList) ident(add)operator(;) keyword(if) operator(()operator(-)integer(1) operator(==) ident(ix)operator(\)) operator({) ident(ix) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(;) ident(add) operator(=) keyword(new) ident(ByteList)operator(()keyword(new) type(byte)operator([)integer(0)operator(])operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(else) operator({) ident(add) operator(=) ident(isParagraph)operator(?) ident(NEWLINE) operator(:) ident(sep)operator(;) operator(}) ident(ByteList) ident(line) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(makeShared)operator(()operator(()type(int)operator(\))ident(pos)operator(,) ident(ix) operator(-) operator(()type(int)operator(\))ident(pos)operator(\))operator(;) ident(line)operator(.)ident(unshare)operator(()operator(\))operator(;) ident(line)operator(.)ident(append)operator(()ident(add)operator(\))operator(;) ident(line)operator(.)ident(invalidate)operator(()operator(\))operator(;) ident(pos) operator(=) ident(ix) operator(+) ident(add)operator(.)ident(realSize)operator(;) ident(lineno)operator(++)operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(runtime)operator(,)ident(line)operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(swallowLF)operator(()ident(ByteList) ident(list)operator(\)) operator({) keyword(while) operator(()ident(pos) operator(<) ident(list)operator(.)ident(realSize)operator(\)) operator({) keyword(if) operator(()ident(list)operator(.)ident(get)operator(()operator(()type(int)operator(\))ident(pos)operator(\)) operator(==) stringoperator(\)) operator({) ident(pos)operator(++)operator(;) operator(}) keyword(else) operator({) keyword(break)operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(gets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) ident(IRubyObject) ident(result) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(isatty)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(length)operator(()operator(\)) operator({) ident(checkFinalized)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(lineno)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(lineno)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_lineno)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(lineno) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(path)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pid)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(pos)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(pos)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_pos)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(pos) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(print)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(0)operator(\)) operator({) keyword(for) operator(()type(int) ident(i)operator(=)integer(0)operator(,)ident(j)operator(=)ident(args)operator(.)ident(length)operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) ident(append)operator(()ident(context)operator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(IRubyObject) ident(arg) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) ident(append)operator(()ident(context)operator(,) ident(arg)operator(.)ident(isNil)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\)) operator(:) ident(arg)operator(\))operator(;) operator(}) ident(IRubyObject) ident(sep) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(sep)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(append)operator(()ident(context)operator(,) ident(sep)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(printf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(append)operator(()ident(context)operator(,) ident(RubyKernel)operator(.)ident(sprintf)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(args)operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(putc)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(checkWritable)operator(()operator(\))operator(;) type(byte) ident(c) operator(=) ident(RubyNumeric)operator(.)ident(num2chr)operator(()ident(obj)operator(\))operator(;) ident(checkFrozen)operator(()operator(\))operator(;) ident(internal)operator(.)ident(modify)operator(()operator(\))operator(;) ident(ByteList) ident(bytes) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(modes)operator(.)ident(isAppendable)operator(()operator(\))operator(\)) operator({) ident(pos) operator(=) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(;) ident(bytes)operator(.)ident(append)operator(()ident(c)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(pos) operator(>=) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(bytes)operator(.)ident(length)operator(()operator(()type(int)operator(\))ident(pos) operator(+) integer(1)operator(\))operator(;) operator(}) ident(bytes)operator(.)ident(set)operator(()operator(()type(int)operator(\)) ident(pos)operator(,) ident(c)operator(\))operator(;) ident(pos)operator(++)operator(;) operator(}) keyword(return) ident(obj)operator(;) operator(}) directive(public) directive(static) directive(final) ident(ByteList) ident(NEWLINE) operator(=) ident(ByteList)operator(.)ident(create)operator(()stringoperator(\))operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(puts)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(checkWritable)operator(()operator(\))operator(;) comment(// FIXME: the code below is a copy of RubyIO.puts,) comment(// and we should avoid copy-paste.) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(NEWLINE)operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) pre_type(String) ident(line)operator(;) keyword(if) operator(()ident(args)operator([)ident(i)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(line) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(checkArrayType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(RubyArray) ident(arr) operator(=) operator(()ident(RubyArray)operator(\)) ident(tmp)operator(;) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(isInspecting)operator(()ident(arr)operator(\))operator(\)) operator({) ident(line) operator(=) stringoperator(;) operator(}) keyword(else) operator({) ident(inspectPuts)operator(()ident(context)operator(,) ident(arr)operator(\))operator(;) keyword(continue)operator(;) operator(}) operator(}) keyword(else) operator({) ident(line) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) operator(}) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(line)operator(\))operator(\))operator(;) keyword(if) operator(()operator(!)ident(line)operator(.)ident(endsWith)operator(()stringoperator(\))operator(\)) operator({) ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(NEWLINE)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(inspectPuts)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyArray) ident(array)operator(\)) operator({) keyword(try) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()ident(array)operator(\))operator(;) keyword(return) ident(puts)operator(()ident(context)operator(,) ident(array)operator(.)ident(toJavaArray)operator(()operator(\))operator(\))operator(;) operator(}) keyword(finally) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()ident(array)operator(\))operator(;) operator(}) operator(}) annotation(@SuppressWarnings)operator(()stringoperator(\)) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(read)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) ident(ByteList) ident(buf) operator(=) pre_constant(null)operator(;) type(int) ident(length) operator(=) integer(0)operator(;) type(int) ident(oldLength) operator(=) integer(0)operator(;) ident(RubyString) ident(originalString) operator(=) pre_constant(null)operator(;) keyword(switch) operator(()ident(args)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(2)operator(:) ident(originalString) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) comment(// must let original string know we're modifying, so shared buffers aren't damaged) ident(originalString)operator(.)ident(modify)operator(()operator(\))operator(;) ident(buf) operator(=) ident(originalString)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(case) integer(1)operator(:) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(length) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) ident(oldLength) operator(=) ident(length)operator(;) keyword(if) operator(()ident(length) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(length) operator(+) stringoperator(\))operator(;) operator(}) keyword(if) operator(()ident(length) operator(>) integer(0) operator(&&) ident(pos) operator(>=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(\)) operator({) ident(eof) operator(=) pre_constant(true)operator(;) keyword(if) operator(()ident(buf) operator(!=) pre_constant(null)operator(\)) ident(buf)operator(.)ident(realSize) operator(=) integer(0)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(eof)operator(\)) operator({) keyword(if) operator(()ident(buf) operator(!=) pre_constant(null)operator(\)) ident(buf)operator(.)ident(realSize) operator(=) integer(0)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(break)operator(;) operator(}) keyword(case) integer(0)operator(:) ident(oldLength) operator(=) operator(-)integer(1)operator(;) ident(length) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(length) operator(<=) ident(pos)operator(\)) operator({) ident(eof) operator(=) pre_constant(true)operator(;) keyword(if) operator(()ident(buf) operator(==) pre_constant(null)operator(\)) operator({) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(buf)operator(.)ident(realSize) operator(=) integer(0)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buf)operator(\))operator(;) operator(}) keyword(else) operator({) ident(length) operator(-=) ident(pos)operator(;) operator(}) keyword(break)operator(;) keyword(default)operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,) integer(0)operator(\))operator(;) operator(}) keyword(if) operator(()ident(buf) operator(==) pre_constant(null)operator(\)) operator({) type(int) ident(internalLength) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) keyword(if) operator(()ident(internalLength) operator(>) integer(0)operator(\)) operator({) keyword(if) operator(()ident(internalLength) operator(>=) ident(pos) operator(+) ident(length)operator(\)) operator({) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(,) operator(()type(int)operator(\)) ident(pos)operator(,) ident(length)operator(\))operator(;) operator(}) keyword(else) operator({) type(int) ident(rest) operator(=) operator(()type(int)operator(\)) operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(-) ident(pos)operator(\))operator(;) keyword(if) operator(()ident(length) operator(>) ident(rest)operator(\)) ident(length) operator(=) ident(rest)operator(;) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(,) operator(()type(int)operator(\)) ident(pos)operator(,) ident(length)operator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) type(int) ident(rest) operator(=) operator(()type(int)operator(\)) operator(()ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(-) ident(pos)operator(\))operator(;) keyword(if) operator(()ident(length) operator(>) ident(rest)operator(\)) ident(length) operator(=) ident(rest)operator(;) comment(// Yow...this is ugly) ident(buf)operator(.)ident(realSize) operator(=) ident(length)operator(;) ident(buf)operator(.)ident(replace)operator(()integer(0)operator(,) ident(length)operator(,) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(bytes)operator(,) operator(()type(int)operator(\)) ident(pos)operator(,) ident(length)operator(\))operator(;) operator(}) keyword(if) operator(()ident(buf) operator(==) pre_constant(null)operator(\)) operator({) keyword(if) operator(()operator(!)ident(eof)operator(\)) ident(buf) operator(=) keyword(new) ident(ByteList)operator(()operator(\))operator(;) ident(length) operator(=) integer(0)operator(;) operator(}) keyword(else) operator({) ident(length) operator(=) ident(buf)operator(.)ident(length)operator(()operator(\))operator(;) ident(pos) operator(+=) ident(length)operator(;) operator(}) keyword(if) operator(()ident(oldLength) operator(<) integer(0) operator(||) ident(oldLength) operator(>) ident(length)operator(\)) ident(eof) operator(=) pre_constant(true)operator(;) keyword(return) ident(originalString) operator(!=) pre_constant(null) operator(?) ident(originalString) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buf)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(readchar)operator(()operator(\)) operator({) ident(IRubyObject) ident(c) operator(=) ident(getc)operator(()operator(\))operator(;) keyword(if) operator(()ident(c)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(c)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(readline)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(gets)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) keyword(return) ident(line)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(readlines)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(arg)operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(lns) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()operator(\))operator(;) keyword(while) operator(()operator(!)operator(()ident(isEOF)operator(()operator(\))operator(\))operator(\)) operator({) ident(IRubyObject) ident(line) operator(=) ident(internalGets)operator(()ident(context)operator(,) ident(arg)operator(\))operator(;) keyword(if) operator(()ident(line)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) ident(lns)operator(.)ident(add)operator(()ident(line)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(lns)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(0)operator(,) ident(optional) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(reopen)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1) operator(&&) operator(!)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(return) ident(initialize_copy)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) comment(// reset the state) ident(doRewind)operator(()operator(\))operator(;) ident(closedRead) operator(=) pre_constant(false)operator(;) ident(closedWrite) operator(=) pre_constant(false)operator(;) keyword(return) ident(initialize)operator(()ident(args)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rewind)operator(()operator(\)) operator({) ident(doRewind)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) type(void) ident(doRewind)operator(()operator(\)) operator({) local_variable(this)operator(.)ident(pos) operator(=) integer(0L)operator(;) local_variable(this)operator(.)ident(eof) operator(=) pre_constant(false)operator(;) local_variable(this)operator(.)ident(lineno) operator(=) integer(0)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame)operator(=)pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(seek)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) comment(// MRI 1.8.7 behavior:) comment(// checkOpen(\);) ident(checkFinalized)operator(()operator(\))operator(;) type(long) ident(amount) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) type(int) ident(whence) operator(=) ident(Stream)operator(.)ident(SEEK_SET)operator(;) type(long) ident(newPosition) operator(=) ident(pos)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1) operator(&&) operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(whence) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) keyword(if) operator(()ident(whence) operator(==) ident(Stream)operator(.)ident(SEEK_CUR)operator(\)) operator({) ident(newPosition) operator(+=) ident(amount)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(whence) operator(==) ident(Stream)operator(.)ident(SEEK_END)operator(\)) operator({) ident(newPosition) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(+) ident(amount)operator(;) operator(}) keyword(else) operator({) ident(newPosition) operator(=) ident(amount)operator(;) operator(}) keyword(if) operator(()ident(newPosition) operator(<) integer(0)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()operator(\))operator(;) ident(pos) operator(=) ident(newPosition)operator(;) ident(eof) operator(=) pre_constant(false)operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_string)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(reopen)operator(()keyword(new) ident(IRubyObject)type([]) operator({) ident(arg)operator(.)ident(convertToString)operator(()operator(\)) operator(})operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_sync)operator(()ident(IRubyObject) ident(args)operator(\)) operator({) keyword(return) ident(args)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(string)operator(()operator(\)) operator({) keyword(if) operator(()ident(internal) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(internal)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sync)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(sysread)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) ident(read)operator(()ident(args)operator(\))operator(;) keyword(if) operator(()ident(isEOF)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(obj)operator(.)ident(isNil)operator(()operator(\)) operator(||) operator(()operator(()ident(RubyString)operator(\)) ident(obj)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\)) operator(==) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(obj)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(truncate)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(checkWritable)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(RubyFixnum)operator(.)ident(fix2int)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newErrnoEINVALError)operator(()stringoperator(\))operator(;) operator(}) ident(internal)operator(.)ident(modify)operator(()operator(\))operator(;) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()ident(len)operator(\))operator(;) keyword(return) ident(arg)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(ungetc)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(checkReadable)operator(()operator(\))operator(;) type(int) ident(c) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(arg)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(internal)operator(.)ident(modify)operator(()operator(\))operator(;) ident(pos)operator(--)operator(;) ident(ByteList) ident(bytes) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(bytes)operator(.)ident(length)operator(()operator(\)) operator(<=) ident(pos)operator(\)) operator({) ident(bytes)operator(.)ident(length)operator(()operator(()type(int)operator(\))ident(pos) operator(+) integer(1)operator(\))operator(;) operator(}) ident(bytes)operator(.)ident(set)operator(()operator(()type(int)operator(\)) ident(pos)operator(,) ident(c)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(write)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(writeInternal)operator(()ident(context)operator(,) ident(arg)operator(\))operator(\))operator(;) operator(}) directive(private) type(int) ident(writeInternal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(checkWritable)operator(()operator(\))operator(;) ident(checkFrozen)operator(()operator(\))operator(;) ident(RubyString) ident(val) operator(=) ident(arg)operator(.)ident(asString)operator(()operator(\))operator(;) ident(internal)operator(.)ident(modify)operator(()operator(\))operator(;) keyword(if) operator(()ident(modes)operator(.)ident(isAppendable)operator(()operator(\))operator(\)) operator({) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(append)operator(()ident(val)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(pos) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) type(int) ident(left) operator(=) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(-)operator(()type(int)operator(\))ident(pos)operator(;) ident(internal)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(replace)operator(()operator(()type(int)operator(\))ident(pos)operator(,)pre_type(Math)operator(.)ident(min)operator(()ident(val)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(,)ident(left)operator(\))operator(,)ident(val)operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(pos) operator(+=) ident(val)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(val)operator(.)ident(isTaint)operator(()operator(\))operator(\)) operator({) ident(internal)operator(.)ident(setTaint)operator(()pre_constant(true)operator(\))operator(;) operator(}) keyword(return) ident(val)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(length)operator(()operator(\))operator(;) operator(}) comment(/* rb: check_modifiable */) annotation(@Override) directive(protected) type(void) ident(checkFrozen)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(if) operator(()ident(internal)operator(.)ident(isFrozen)operator(()operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) comment(/* rb: readable */) directive(private) type(void) ident(checkReadable)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(if) operator(()ident(closedRead) operator(||) operator(!)ident(modes)operator(.)ident(isReadable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) comment(/* rb: writable */) directive(private) type(void) ident(checkWritable)operator(()operator(\)) operator({) ident(checkInitialized)operator(()operator(\))operator(;) keyword(if) operator(()ident(closedWrite) operator(||) operator(!)ident(modes)operator(.)ident(isWritable)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) comment(// Tainting here if we ever want it. (secure 4\)) operator(}) directive(private) type(void) ident(checkInitialized)operator(()operator(\)) operator({) keyword(if) operator(()ident(modes) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(checkFinalized)operator(()operator(\)) operator({) keyword(if) operator(()ident(internal) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(checkOpen)operator(()operator(\)) operator({) keyword(if) operator(()ident(closedRead) operator(&&) ident(closedWrite)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIOError)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(private) type(void) ident(setupModes)operator(()operator(\)) operator({) ident(closedWrite) operator(=) pre_constant(false)operator(;) ident(closedRead) operator(=) pre_constant(false)operator(;) keyword(if) operator(()ident(modes)operator(.)ident(isReadOnly)operator(()operator(\))operator(\)) ident(closedWrite) operator(=) pre_constant(true)operator(;) keyword(if) operator(()operator(!)ident(modes)operator(.)ident(isReadable)operator(()operator(\))operator(\)) ident(closedRead) operator(=) pre_constant(true)operator(;) operator(}) operator(}) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.joni.Matcher)operator(;) keyword(import) include(org.joni.Option)operator(;) keyword(import) include(org.joni.Regex)operator(;) keyword(import) include(org.joni.Region)operator(;) keyword(import) include(org.joni.encoding.Encoding)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** * @author kscott * */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyStringScanner) directive(extends) ident(RubyObject) operator({) directive(private) ident(RubyString) ident(str)operator(;) directive(private) type(int) ident(pos) operator(=) integer(0)operator(;) directive(private) type(int) ident(lastPos) operator(=) operator(-)integer(1)operator(;) directive(private) pre_type(Region) ident(regs)operator(;) directive(private) type(int) ident(beg) operator(=) operator(-)integer(1)operator(;) directive(private) type(int) ident(end) operator(=) operator(-)integer(1)operator(;) comment(// not to be confused with RubyObject's flags) directive(private) type(int) ident(scannerFlags)operator(;) directive(private) directive(static) directive(final) type(int) ident(MATCHED_STR_SCN_F) operator(=) integer(1) operator(<)operator(<) integer(11)operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(STRINGSCANNER_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyStringScanner)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createScannerClass)operator(()directive(final) ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(scannerClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(STRINGSCANNER_ALLOCATOR)operator(\))operator(;) ident(scannerClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyStringScanner)operator(.)ident(class)operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(scannerClass)operator(.)ident(setConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(\))operator(;) ident(scannerClass)operator(.)ident(setConstant)operator(()stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(\))operator(;) ident(RubyClass) ident(standardError) operator(=) ident(runtime)operator(.)ident(getStandardError)operator(()operator(\))operator(;) ident(RubyClass) ident(error) operator(=) ident(scannerClass)operator(.)ident(defineClassUnder)operator(() stringoperator(,) ident(standardError)operator(,) ident(standardError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(RubyClass) ident(objClass) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(objClass)operator(.)ident(isConstantDefined)operator(()stringoperator(\))operator(\)) operator({) ident(objClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(error)operator(\))operator(;) operator(}) keyword(return) ident(scannerClass)operator(;) operator(}) directive(private) type(void) ident(clearMatched)operator(()operator(\)) operator({) ident(scannerFlags) operator(&=) operator(~)ident(MATCHED_STR_SCN_F)operator(;) operator(}) directive(private) type(void) ident(setMatched)operator(()operator(\)) operator({) ident(scannerFlags) operator(|=) ident(MATCHED_STR_SCN_F)operator(;) operator(}) directive(private) type(boolean) ident(isMatched)operator(()operator(\)) operator({) keyword(return) operator(()ident(scannerFlags) operator(&) ident(MATCHED_STR_SCN_F)operator(\)) operator(!=) integer(0)operator(;) operator(}) directive(private) type(void) ident(check)operator(()operator(\)) operator({) keyword(if) operator(()ident(str) operator(==) pre_constant(null)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) directive(protected) ident(RubyStringScanner)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) comment(// second argument is allowed, but ignored (MRI\)) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(str) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame)operator(=)pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) local_variable(this)operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyStringScanner)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(other)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(RubyStringScanner) ident(otherScanner) operator(=) operator(()ident(RubyStringScanner)operator(\))ident(other)operator(;) ident(str) operator(=) ident(otherScanner)operator(.)ident(str)operator(;) ident(pos) operator(=) ident(otherScanner)operator(.)ident(pos)operator(;) ident(lastPos) operator(=) ident(otherScanner)operator(.)ident(lastPos)operator(;) ident(scannerFlags) operator(=) ident(otherScanner)operator(.)ident(scannerFlags)operator(;) ident(regs) operator(=) ident(otherScanner)operator(.)ident(regs) operator(!=) pre_constant(null) operator(?) ident(otherScanner)operator(.)ident(regs)operator(.)ident(clone)operator(()operator(\)) operator(:) pre_constant(null)operator(;) ident(beg) operator(=) ident(otherScanner)operator(.)ident(beg)operator(;) ident(end) operator(=) ident(otherScanner)operator(.)ident(end)operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(reset)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(pos) operator(=) integer(0)operator(;) ident(clearMatched)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(terminate)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(pos) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(;) ident(clearMatched)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(clear)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(terminate)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(string)operator(()operator(\)) operator({) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_string)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(str)operator(\)) operator({) local_variable(this)operator(.)ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(str)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(strDup)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(freeze)operator(()ident(context)operator(\))operator(;) ident(pos) operator(=) integer(0)operator(;) ident(clearMatched)operator(()operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(concat)operator(()ident(IRubyObject) ident(obj)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(str)operator(.)ident(append)operator(()ident(obj)operator(\))operator(;) comment(// append will call convertToString(\)) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyFixnum) ident(pos)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(set_pos)operator(()ident(IRubyObject) ident(pos)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) type(int) ident(i) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(pos)operator(\))operator(;) type(int) ident(size) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(i) operator(<) integer(0)operator(\)) ident(i) operator(+=) ident(size)operator(;) keyword(if) operator(()ident(i) operator(<) integer(0) operator(||) ident(i) operator(>) ident(size)operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newRangeError)operator(()stringoperator(\))operator(;) local_variable(this)operator(.)ident(pos) operator(=) ident(i)operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(i)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(extractRange)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(beg)operator(,) type(int) ident(end)operator(\)) operator({) type(int) ident(size) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(beg) operator(>) ident(size)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(end) operator(>) ident(size)operator(\)) ident(end) operator(=) ident(size)operator(;) keyword(return) ident(str)operator(.)ident(makeShared)operator(()ident(runtime)operator(,) ident(beg)operator(,) ident(end) operator(-) ident(beg)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(extractBegLen)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(beg)operator(,) type(int) ident(len)operator(\)) operator({) keyword(assert) ident(len) operator(>=) integer(0)operator(;) type(int) ident(size) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(;) keyword(if) operator(()ident(beg) operator(>) ident(size)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(beg) operator(+) ident(len) operator(>) ident(size)operator(\)) ident(len) operator(=) ident(size) operator(-) ident(beg)operator(;) keyword(return) ident(str)operator(.)ident(makeShared)operator(()ident(runtime)operator(,) ident(beg)operator(,) ident(len)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(scan)operator(()ident(IRubyObject) ident(regex)operator(,) type(boolean) ident(succptr)operator(,) type(boolean) ident(getstr)operator(,) type(boolean) ident(headonly)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(regex) keyword(instanceof) ident(RubyRegexp)operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(regex)operator(.)ident(getMetaClass)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(check)operator(()operator(\))operator(;) ident(Regex) ident(pattern) operator(=) operator(()operator(()ident(RubyRegexp)operator(\))ident(regex)operator(\))operator(.)ident(getPattern)operator(()operator(\))operator(;) ident(clearMatched)operator(()operator(\))operator(;) type(int) ident(rest) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(-) ident(pos)operator(;) keyword(if) operator(()ident(rest) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) pre_type(Matcher) ident(matcher) operator(=) ident(pattern)operator(.)ident(matcher)operator(()ident(value)operator(.)ident(bytes)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(pos)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(\))operator(;) directive(final) type(int) ident(ret)operator(;) keyword(if) operator(()ident(headonly)operator(\)) operator({) ident(ret) operator(=) ident(matcher)operator(.)ident(match)operator(()ident(value)operator(.)ident(begin) operator(+) ident(pos)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(;) operator(}) keyword(else) operator({) ident(ret) operator(=) ident(matcher)operator(.)ident(search)operator(()ident(value)operator(.)ident(begin) operator(+) ident(pos)operator(,) ident(value)operator(.)ident(begin) operator(+) ident(value)operator(.)ident(realSize)operator(,) pre_type(Option)operator(.)ident(NONE)operator(\))operator(;) operator(}) ident(regs) operator(=) ident(matcher)operator(.)ident(getRegion)operator(()operator(\))operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) ident(beg) operator(=) ident(matcher)operator(.)ident(getBegin)operator(()operator(\))operator(;) ident(end) operator(=) ident(matcher)operator(.)ident(getEnd)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(beg) operator(=) ident(regs)operator(.)ident(beg)operator([)integer(0)operator(])operator(;) ident(end) operator(=) ident(regs)operator(.)ident(end)operator([)integer(0)operator(])operator(;) operator(}) keyword(if) operator(()ident(ret) operator(<) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(setMatched)operator(()operator(\))operator(;) ident(lastPos) operator(=) ident(pos)operator(;) keyword(if) operator(()ident(succptr)operator(\)) ident(pos) operator(+=) ident(end)operator(;) keyword(return) ident(getstr) operator(?) ident(extractBegLen)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos)operator(,) ident(end)operator(\)) operator(:) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(end)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(scan)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(true)operator(,) pre_constant(true)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(match_p)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(skip)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(true)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(check)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(3)operator(\)) directive(public) ident(IRubyObject) ident(scan_full)operator(()ident(IRubyObject) ident(regex)operator(,) ident(IRubyObject) ident(s)operator(,) ident(IRubyObject) ident(f)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) ident(s)operator(.)ident(isTrue)operator(()operator(\))operator(,) ident(f)operator(.)ident(isTrue)operator(()operator(\))operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(scan_until)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(true)operator(,) pre_constant(true)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(exist_p)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(skip_until)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(true)operator(,) pre_constant(false)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(check_until)operator(()ident(IRubyObject) ident(regex)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) pre_constant(false)operator(,) pre_constant(true)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(3)operator(\)) directive(public) ident(IRubyObject) ident(search_full)operator(()ident(IRubyObject) ident(regex)operator(,) ident(IRubyObject) ident(s)operator(,) ident(IRubyObject) ident(f)operator(\)) operator({) keyword(return) ident(scan)operator(()ident(regex)operator(,) ident(s)operator(.)ident(isTrue)operator(()operator(\))operator(,) ident(f)operator(.)ident(isTrue)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) operator(}) directive(private) type(void) ident(adjustRegisters)operator(()operator(\)) operator({) ident(beg) operator(=) integer(0)operator(;) ident(end) operator(=) ident(pos) operator(-) ident(lastPos)operator(;) ident(regs) operator(=) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(getch)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(clearMatched)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(value)operator(.)ident(realSize)operator(\)) keyword(return) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(Encoding) ident(enc) operator(=) ident(runtime)operator(.)ident(getKCode)operator(()operator(\))operator(.)ident(getEncoding)operator(()operator(\))operator(;) type(int) ident(len)operator(;) keyword(if) operator(()ident(enc)operator(.)ident(isSingleByte)operator(()operator(\))operator(\)) operator({) ident(len) operator(=) integer(1)operator(;) operator(}) keyword(else) operator({) ident(len) operator(=) ident(enc)operator(.)ident(length)operator(()ident(value)operator(.)ident(bytes)operator([)ident(value)operator(.)ident(begin) operator(+) ident(pos)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()ident(pos) operator(+) ident(len) operator(>) ident(value)operator(.)ident(realSize)operator(\)) ident(len) operator(=) ident(value)operator(.)ident(realSize) operator(-) ident(pos)operator(;) ident(lastPos) operator(=) ident(pos)operator(;) ident(pos) operator(+=) ident(len)operator(;) ident(setMatched)operator(()operator(\))operator(;) ident(adjustRegisters)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(runtime)operator(,) ident(lastPos) operator(+) ident(beg)operator(,) ident(lastPos) operator(+) ident(end)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(get_byte)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(clearMatched)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(lastPos) operator(=) ident(pos)operator(;) ident(pos)operator(++)operator(;) ident(setMatched)operator(()operator(\))operator(;) ident(adjustRegisters)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos) operator(+) ident(beg)operator(,) ident(lastPos) operator(+) ident(end)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(getbyte)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(get_byte)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(peek)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(length)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(length)operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(value)operator(.)ident(realSize)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(infectBy)operator(()ident(str)operator(\))operator(;) keyword(if) operator(()ident(pos) operator(+) ident(len) operator(>) ident(value)operator(.)ident(realSize)operator(\)) ident(len) operator(=) ident(value)operator(.)ident(realSize) operator(-) ident(pos)operator(;) keyword(return) ident(extractBegLen)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(,) ident(len)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(peep)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(length)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(() ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(peek)operator(()ident(context)operator(,) ident(length)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(unscan)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) operator({) ident(RubyClass) ident(errorClass) operator(=) ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) keyword(throw) keyword(new) ident(RaiseException)operator(()ident(RubyException)operator(.)ident(newException)operator(() ident(runtime)operator(,) ident(errorClass)operator(,) stringoperator(\))operator(\))operator(;) operator(}) ident(pos) operator(=) ident(lastPos)operator(;) ident(clearMatched)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(alias) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(bol_p)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>) ident(value)operator(.)ident(realSize)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) integer(0)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(value)operator(.)ident(bytes)operator([)operator(()ident(value)operator(.)ident(begin) operator(+) ident(pos)operator(\)) operator(-) integer(1)operator(]) operator(==) operator(()type(byte)operator(\))string operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(eos_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(pos) operator(>=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(empty_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(eos_p)operator(()ident(context)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(rest_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(pos) operator(>=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(matched_p)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(return) ident(isMatched)operator(()operator(\)) operator(?) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(matched)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos) operator(+) ident(beg)operator(,) ident(lastPos) operator(+) ident(end)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(matched_size)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(end) operator(-) ident(beg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(matchedsize)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(matched_size)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(idx)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(int) ident(i) operator(=) ident(RubyNumeric)operator(.)ident(num2int)operator(()ident(idx)operator(\))operator(;) type(int) ident(numRegs) operator(=) ident(regs) operator(==) pre_constant(null) operator(?) integer(1) operator(:) ident(regs)operator(.)ident(numRegs)operator(;) keyword(if) operator(()ident(i) operator(<) integer(0)operator(\)) ident(i) operator(+=) ident(numRegs)operator(;) keyword(if) operator(()ident(i) operator(<) integer(0) operator(||) ident(i) operator(>=) ident(numRegs)operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(regs) operator(==) pre_constant(null)operator(\)) operator({) keyword(assert) ident(i) operator(==) integer(0)operator(;) keyword(if) operator(()ident(beg) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos) operator(+) ident(beg)operator(,) ident(lastPos) operator(+) ident(end)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()ident(regs)operator(.)ident(beg)operator([)ident(i)operator(]) operator(==) operator(-)integer(1)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos) operator(+) ident(regs)operator(.)ident(beg)operator([)ident(i)operator(])operator(,) ident(lastPos) operator(+) ident(regs)operator(.)ident(end)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pre_match)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) integer(0)operator(,) ident(lastPos) operator(+) ident(beg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(post_match)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(isMatched)operator(()operator(\))operator(\)) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(lastPos) operator(+) ident(end)operator(,) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rest)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(value)operator(.)ident(realSize)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(infectBy)operator(()ident(str)operator(\))operator(;) keyword(return) ident(extractRange)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(pos)operator(,) ident(value)operator(.)ident(realSize)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(rest_size)operator(()operator(\)) operator({) ident(check)operator(()operator(\))operator(;) ident(ByteList) ident(value) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(value)operator(.)ident(realSize)operator(\)) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(return) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(value)operator(.)ident(realSize) operator(-) ident(pos)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(restsize)operator(()operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warning)operator(()ident(ID)operator(.)ident(DEPRECATED_METHOD)operator(,) stringoperator(,) stringoperator(,) stringoperator(\))operator(;) keyword(return) ident(rest_size)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) keyword(if) operator(()ident(str) operator(==) pre_constant(null)operator(\)) keyword(return) ident(inspect)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(pos) operator(>=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(\)) keyword(return) ident(inspect)operator(()stringoperator(\))operator(;) keyword(if) operator(()ident(pos) operator(==) integer(0)operator(\)) keyword(return) ident(inspect)operator(()ident(pos) operator(+) string operator(+) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(+) string operator(+) ident(inspect2)operator(()operator(\))operator(\))operator(;) keyword(return) ident(inspect)operator(()ident(pos) operator(+) string operator(+) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(+) string operator(+) ident(inspect1)operator(()operator(\)) operator(+) string operator(+) ident(inspect2)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(inspect)operator(()pre_type(String) ident(msg)operator(\)) operator({) ident(IRubyObject) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(getMetaClass)operator(()operator(\)) operator(+) string operator(+) ident(msg) operator(+) string)delimiter(")>operator(\))operator(;) keyword(if) operator(()ident(str) operator(!=) pre_constant(null)operator(\)) ident(result)operator(.)ident(infectBy)operator(()ident(str)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(static) directive(final) type(int) ident(INSPECT_LENGTH) operator(=) integer(5)operator(;) directive(private) ident(IRubyObject) ident(inspect1)operator(()operator(\)) operator({) keyword(if) operator(()ident(pos) operator(==) integer(0)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(pos) operator(>) ident(INSPECT_LENGTH)operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,) stringoperator(.)ident(getBytes)operator(()operator(\))operator(\))operator(.)ident(append)operator(()ident(str)operator(.)ident(substr)operator(()ident(pos) operator(-) ident(INSPECT_LENGTH)operator(,) ident(INSPECT_LENGTH)operator(\))operator(\))operator(.)ident(inspect)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(str)operator(.)ident(substr)operator(()integer(0)operator(,) ident(pos)operator(\))operator(.)ident(inspect)operator(()operator(\))operator(;) operator(}) operator(}) directive(private) ident(IRubyObject) ident(inspect2)operator(()operator(\)) operator({) keyword(if) operator(()ident(pos) operator(>=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize)operator(\)) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) type(int) ident(len) operator(=) ident(str)operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(realSize) operator(-) ident(pos)operator(;) keyword(if) operator(()ident(len) operator(>) ident(INSPECT_LENGTH)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyString)operator(\))ident(str)operator(.)ident(substr)operator(()ident(pos)operator(,) ident(INSPECT_LENGTH)operator(\))operator(\))operator(.)ident(cat)operator(()stringoperator(.)ident(getBytes)operator(()operator(\))operator(\))operator(.)ident(inspect)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(str)operator(.)ident(substr)operator(()ident(pos)operator(,) ident(len)operator(\))operator(.)ident(inspect)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(mustCversion)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2005 Charles O Nutter * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.Frame)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.IdUtil)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.CallConfiguration)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) comment(/** * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyStruct) directive(extends) ident(RubyObject) operator({) directive(private) ident(IRubyObject)type([]) ident(values)operator(;) comment(/** * Constructor for RubyStruct. * @param runtime * @param rubyClass */) directive(public) ident(RubyStruct)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) type(int) ident(size) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(getInternalVariable)operator(()operator(()ident(RubyClass)operator(\))ident(rubyClass)operator(,) stringoperator(\))operator(\))operator(;) ident(values) operator(=) keyword(new) ident(IRubyObject)operator([)ident(size)operator(])operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(size)operator(;) ident(i)operator(++)operator(\)) operator({) ident(values)operator([)ident(i)operator(]) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyClass) ident(createStructClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// TODO: NOT_ALLOCATABLE_ALLOCATOR may be ok here, but it's unclear how Structs) comment(// work with marshalling. Confirm behavior and ensure we're doing this correctly. JRUBY-415) ident(RubyClass) ident(structClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setStructClass)operator(()ident(structClass)operator(\))operator(;) ident(structClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(STRUCT)operator(;) ident(structClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(structClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyStruct)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(structClass)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(STRUCT)operator(;) operator(}) directive(private) directive(static) ident(IRubyObject) ident(getInternalVariable)operator(()ident(RubyClass) ident(type)operator(,) pre_type(String) ident(internedName)operator(\)) operator({) ident(RubyClass) ident(structClass) operator(=) ident(type)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getStructClass)operator(()operator(\))operator(;) ident(IRubyObject) ident(variable)operator(;) keyword(while) operator(()ident(type) operator(!=) pre_constant(null) operator(&&) ident(type) operator(!=) ident(structClass)operator(\)) operator({) keyword(if) operator(()operator(()ident(variable) operator(=) ident(type)operator(.)ident(fastGetInternalVariable)operator(()ident(internedName)operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(variable)operator(;) operator(}) ident(type) operator(=) ident(type)operator(.)ident(getSuperClass)operator(()operator(\))operator(;) operator(}) keyword(return) ident(type)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(private) ident(RubyClass) ident(classOf)operator(()operator(\)) operator({) keyword(return) ident(getMetaClass)operator(()operator(\)) keyword(instanceof) ident(MetaClass) operator(?) ident(getMetaClass)operator(()operator(\))operator(.)ident(getSuperClass)operator(()operator(\)) operator(:) ident(getMetaClass)operator(()operator(\))operator(;) operator(}) directive(private) type(void) ident(modify)operator(()operator(\)) operator({) ident(testFrozen)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(isTaint)operator(()operator(\)) operator(&&) ident(getRuntime)operator(()operator(\))operator(.)ident(getSafeLevel)operator(()operator(\)) operator(>=) integer(4)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newSecurityError)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod) directive(public) ident(RubyFixnum) ident(hash)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(h) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(hashCode)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(h) operator(=) operator(()ident(h) operator(<)operator(<) integer(1)operator(\)) operator(|) operator(()ident(h) operator(<) integer(0) operator(?) integer(1) operator(:) integer(0)operator(\))operator(;) ident(h) operator(^=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(values)operator([)ident(i)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(HASH)operator(,) stringoperator(\))operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(newFixnum)operator(()ident(h)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(setByName)operator(()pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) ident(modify)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,)ident(k)operator(=)ident(member)operator(.)ident(getLength)operator(()operator(\))operator(;) ident(i) operator(<) ident(k)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(member)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(values)operator([)ident(i)operator(]) operator(=) ident(value)operator(;) operator(}) operator(}) keyword(throw) ident(notStructMemberError)operator(()ident(name)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(getByName)operator(()pre_type(String) ident(name)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,)ident(k)operator(=)ident(member)operator(.)ident(getLength)operator(()operator(\))operator(;) ident(i) operator(<) ident(k)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(member)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(.)ident(equals)operator(()ident(name)operator(\))operator(\)) operator({) keyword(return) ident(values)operator([)ident(i)operator(])operator(;) operator(}) operator(}) keyword(throw) ident(notStructMemberError)operator(()ident(name)operator(\))operator(;) operator(}) comment(// Struct methods) comment(/** Create new Struct class. * * MRI: rb_struct_s_def / make_struct * */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyClass) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) pre_type(String) ident(name) operator(=) pre_constant(null)operator(;) type(boolean) ident(nilName) operator(=) pre_constant(false)operator(;) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(IRubyObject) ident(firstArgAsString) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(firstArgAsString)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(name) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(firstArgAsString)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(nilName) operator(=) pre_constant(true)operator(;) operator(}) operator(}) ident(RubyArray) ident(member) operator(=) ident(runtime)operator(.)ident(newArray)operator(()operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) operator(()ident(name) operator(==) pre_constant(null) operator(&&) operator(!)ident(nilName)operator(\)) operator(?) integer(0) operator(:) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(member)operator(.)ident(append)operator(()ident(runtime)operator(.)ident(newSymbol)operator(()ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(RubyClass) ident(newStruct)operator(;) ident(RubyClass) ident(superClass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) keyword(if) operator(()ident(name) operator(==) pre_constant(null) operator(||) ident(nilName)operator(\)) operator({) ident(newStruct) operator(=) ident(RubyClass)operator(.)ident(newClass)operator(()ident(runtime)operator(,) ident(superClass)operator(\))operator(;) ident(newStruct)operator(.)ident(setAllocator)operator(()ident(STRUCT_INSTANCE_ALLOCATOR)operator(\))operator(;) ident(newStruct)operator(.)ident(makeMetaClass)operator(()ident(superClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) ident(newStruct)operator(.)ident(inherit)operator(()ident(superClass)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)ident(IdUtil)operator(.)ident(isConstant)operator(()ident(name)operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) ident(IRubyObject) ident(type) operator(=) ident(superClass)operator(.)ident(getConstantAt)operator(()ident(name)operator(\))operator(;) keyword(if) operator(()ident(type) operator(!=) pre_constant(null)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(Frame) ident(frame) operator(=) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(;) ident(runtime)operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(STRUCT_CONSTANT_REDEFINED)operator(,) ident(frame)operator(.)ident(getFile)operator(()operator(\))operator(,) ident(frame)operator(.)ident(getLine)operator(()operator(\))operator(,) string operator(+) ident(name)operator(,) ident(name)operator(\))operator(;) ident(superClass)operator(.)ident(remove_const)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(newString)operator(()ident(name)operator(\))operator(\))operator(;) operator(}) ident(newStruct) operator(=) ident(superClass)operator(.)ident(defineClassUnder)operator(()ident(name)operator(,) ident(superClass)operator(,) ident(STRUCT_INSTANCE_ALLOCATOR)operator(\))operator(;) operator(}) ident(newStruct)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(STRUCT)operator(;) ident(newStruct)operator(.)ident(fastSetInternalVariable)operator(()stringoperator(,) ident(member)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) ident(newStruct)operator(.)ident(fastSetInternalVariable)operator(()stringoperator(,) ident(member)operator(\))operator(;) ident(newStruct)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineAnnotatedMethods)operator(()ident(StructMethods)operator(.)ident(class)operator(\))operator(;) comment(// define access methods.) keyword(for) operator(()type(int) ident(i) operator(=) operator(()ident(name) operator(==) pre_constant(null) operator(&&) operator(!)ident(nilName)operator(\)) operator(?) integer(0) operator(:) integer(1)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) directive(final) pre_type(String) ident(memberName) operator(=) ident(args)operator([)ident(i)operator(])operator(.)ident(asJavaString)operator(()operator(\))operator(;) comment(// if we are storing a name as well, index is one too high for values) directive(final) type(int) ident(index) operator(=) operator(()ident(name) operator(==) pre_constant(null) operator(&&) operator(!)ident(nilName)operator(\)) operator(?) ident(i) operator(:) ident(i) operator(-) integer(1)operator(;) ident(newStruct)operator(.)ident(addMethod)operator(()ident(memberName)operator(,) keyword(new) ident(DynamicMethod)operator(()ident(newStruct)operator(,) pre_type(Visibility)operator(.)ident(PUBLIC)operator(,) ident(CallConfiguration)operator(.)ident(NO_FRAME_NO_SCOPE)operator(\)) operator({) annotation(@Override) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(0)operator(,) integer(0)operator(\))operator(;) keyword(return) operator(()operator(()ident(RubyStruct)operator(\))ident(self)operator(\))operator(.)ident(get)operator(()ident(index)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyStruct)operator(\))ident(self)operator(\))operator(.)ident(get)operator(()ident(index)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(DynamicMethod) ident(dup)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(})operator(\))operator(;) ident(newStruct)operator(.)ident(addMethod)operator(()ident(memberName) operator(+) stringoperator(,) keyword(new) ident(DynamicMethod)operator(()ident(newStruct)operator(,) pre_type(Visibility)operator(.)ident(PUBLIC)operator(,) ident(CallConfiguration)operator(.)ident(NO_FRAME_NO_SCOPE)operator(\)) operator({) annotation(@Override) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(1)operator(,) integer(1)operator(\))operator(;) keyword(return) operator(()operator(()ident(RubyStruct)operator(\))ident(self)operator(\))operator(.)ident(set)operator(()ident(args)operator([)integer(0)operator(])operator(,) ident(index)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(self)operator(,) ident(RubyModule) ident(clazz)operator(,) pre_type(String) ident(name)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyStruct)operator(\))ident(self)operator(\))operator(.)ident(set)operator(()ident(arg)operator(,) ident(index)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(DynamicMethod) ident(dup)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(})operator(\))operator(;) operator(}) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) comment(// Struct bodies should be public by default, so set block visibility to public. JRUBY-1185.) ident(block)operator(.)ident(getBinding)operator(()operator(\))operator(.)ident(setVisibility)operator(()pre_type(Visibility)operator(.)ident(PUBLIC)operator(\))operator(;) ident(block)operator(.)ident(yield)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) pre_constant(null)operator(,) ident(newStruct)operator(,) ident(newStruct)operator(,) pre_constant(false)operator(\))operator(;) operator(}) keyword(return) ident(newStruct)operator(;) operator(}) comment(// For binding purposes on the newly created struct types) directive(public) directive(static) type(class) class(StructMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newStruct)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RubyStruct)operator(.)ident(newStruct)operator(()ident(recv)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) directive(static) ident(IRubyObject) ident(members)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(RubyStruct)operator(.)ident(members)operator(()ident(recv)operator(,) ident(block)operator(\))operator(;) operator(}) operator(}) comment(/** Create new Structure. * * MRI: struct_alloc * */) directive(public) directive(static) ident(RubyStruct) ident(newStruct)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyStruct) ident(struct) operator(=) keyword(new) ident(RubyStruct)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(;) ident(struct)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(struct)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(modify)operator(()operator(\))operator(;) type(int) ident(size) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(getInternalVariable)operator(()ident(getMetaClass)operator(()operator(\))operator(,) stringoperator(\))operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) ident(size)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(args)operator(.)ident(length) operator(+)string operator(+) ident(size) operator(+) stringoperator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(values)operator([)ident(i)operator(]) operator(=) ident(args)operator([)ident(i)operator(])operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyArray) ident(members)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) ident(RubyArray) ident(result) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(member)operator(.)ident(getLength)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,)ident(k)operator(=)ident(member)operator(.)ident(getLength)operator(()operator(\))operator(;) ident(i) operator(<) ident(k)operator(;) ident(i)operator(++)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(member)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(RubyArray) ident(members)operator(()operator(\)) operator({) keyword(return) ident(members)operator(()ident(classOf)operator(()operator(\))operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(RubyArray) ident(select)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(array) operator(=) ident(RubyArray)operator(.)ident(newArray)operator(()ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(values)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(array)operator(;) operator(}) directive(public) ident(IRubyObject) ident(set)operator(()ident(IRubyObject) ident(value)operator(,) type(int) ident(index)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) ident(modify)operator(()operator(\))operator(;) keyword(return) ident(values)operator([)ident(index)operator(]) operator(=) ident(value)operator(;) operator(}) directive(private) ident(RaiseException) ident(notStructMemberError)operator(()pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newNameError)operator(()ident(name) operator(+) stringoperator(,) ident(name)operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(get)operator(()type(int) ident(index)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) keyword(return) ident(values)operator([)ident(index)operator(])operator(;) operator(}) annotation(@Override) directive(public) type(void) ident(copySpecialInstanceVariables)operator(()ident(IRubyObject) ident(clone)operator(\)) operator({) ident(RubyStruct) ident(struct) operator(=) operator(()ident(RubyStruct)operator(\))ident(clone)operator(;) ident(struct)operator(.)ident(values) operator(=) keyword(new) ident(IRubyObject)operator([)ident(values)operator(.)ident(length)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(values)operator(,) integer(0)operator(,) ident(struct)operator(.)ident(values)operator(,) integer(0)operator(,) ident(values)operator(.)ident(length)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_equal)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyStruct)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\)) operator(!=) ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyStruct) ident(otherStruct) operator(=) operator(()ident(RubyStruct)operator(\))ident(other)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(equalInternal)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(,) ident(otherStruct)operator(.)ident(values)operator([)ident(i)operator(])operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(other)operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)operator(()ident(other) keyword(instanceof) ident(RubyStruct)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) keyword(if) operator(()ident(getMetaClass)operator(()operator(\)) operator(!=) ident(other)operator(.)ident(getMetaClass)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) ident(RubyStruct) ident(otherStruct) operator(=) operator(()ident(RubyStruct)operator(\))ident(other)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(eqlInternal)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(,) ident(otherStruct)operator(.)ident(values)operator([)ident(i)operator(])operator(\))operator(\)) keyword(return) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(runtime)operator(.)ident(getTrue)operator(()operator(\))operator(;) operator(}) comment(/** inspect_struct * */) directive(private) ident(IRubyObject) ident(inspectStruct)operator(()directive(final) ident(ThreadContext) ident(context)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) ident(ByteList) ident(buffer) operator(=) keyword(new) ident(ByteList)operator(()stringoperator(.)ident(getBytes)operator(()operator(\))operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(.)ident(getBytes)operator(()operator(\))operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,)ident(k)operator(=)ident(member)operator(.)ident(getLength)operator(()operator(\))operator(;) ident(i) operator(<) ident(k)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(i) operator(>) integer(0)operator(\)) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) comment(// FIXME: MRI has special case for constants here ) ident(buffer)operator(.)ident(append)operator(()ident(RubyString)operator(.)ident(objAsString)operator(()ident(context)operator(,) ident(member)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(buffer)operator(.)ident(append)operator(()ident(inspect)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) ident(buffer)operator(.)ident(append)operator(()string)delimiter(')>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(buffer)operator(\))operator(;) comment(// OBJ_INFECT ) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(inspect)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(isInspecting)operator(()local_variable(this)operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\)) operator(+) string)delimiter(")>operator(\))operator(;) keyword(try) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(registerInspecting)operator(()local_variable(this)operator(\))operator(;) keyword(return) ident(inspectStruct)operator(()ident(context)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(unregisterInspecting)operator(()local_variable(this)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(values)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(}) operator(\)) directive(public) ident(RubyFixnum) ident(size)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(values)operator(.)ident(length)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(backtrace) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(values)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_pair)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyArray) ident(member) operator(=) operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(;) keyword(assert) operator(!)ident(member)operator(.)ident(isNil)operator(()operator(\)) operator(:) stringoperator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(values)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()keyword(new) ident(IRubyObject)type([])operator({)ident(member)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(,) ident(values)operator([)ident(i)operator(])operator(})operator(\))operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(aref)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) keyword(if) operator(()ident(key) keyword(instanceof) ident(RubyString) operator(||) ident(key) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) keyword(return) ident(getByName)operator(()ident(key)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) type(int) ident(idx) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(key)operator(\))operator(;) ident(idx) operator(=) ident(idx) operator(<) integer(0) operator(?) ident(values)operator(.)ident(length) operator(+) ident(idx) operator(:) ident(idx)operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(idx) operator(+) string operator(+) ident(values)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(idx) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(idx) operator(+) string operator(+) ident(values)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) keyword(return) ident(values)operator([)ident(idx)operator(])operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(aset)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) keyword(if) operator(()ident(key) keyword(instanceof) ident(RubyString) operator(||) ident(key) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) keyword(return) ident(setByName)operator(()ident(key)operator(.)ident(asJavaString)operator(()operator(\))operator(,) ident(value)operator(\))operator(;) operator(}) type(int) ident(idx) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(key)operator(\))operator(;) ident(idx) operator(=) ident(idx) operator(<) integer(0) operator(?) ident(values)operator(.)ident(length) operator(+) ident(idx) operator(:) ident(idx)operator(;) keyword(if) operator(()ident(idx) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(idx) operator(+) string operator(+) ident(values)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(idx) operator(>=) ident(values)operator(.)ident(length)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newIndexError)operator(()string operator(+) ident(idx) operator(+) string operator(+) ident(values)operator(.)ident(length) operator(+) stringoperator(\))operator(;) operator(}) ident(modify)operator(()operator(\))operator(;) keyword(return) ident(values)operator([)ident(idx)operator(]) operator(=) ident(value)operator(;) operator(}) comment(// FIXME: This is copied code from RubyArray. Both RE, Struct, and Array should share one impl) comment(// This is also hacky since I construct ruby objects to access ruby arrays through aref instead) comment(// of something lower.) annotation(@JRubyMethod)operator(()ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(values_at)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(long) ident(olen) operator(=) ident(values)operator(.)ident(length)operator(;) ident(RubyArray) ident(result) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(args)operator(.)ident(length)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(args)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(aref)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(;) keyword(continue)operator(;) operator(}) type(long) ident(beglen)type([])operator(;) keyword(if) operator(()operator(!)operator(()ident(args)operator([)ident(i)operator(]) keyword(instanceof) ident(RubyRange)operator(\))operator(\)) operator({) operator(}) keyword(else) keyword(if) operator(()operator(()ident(beglen) operator(=) operator(()operator(()ident(RubyRange)operator(\)) ident(args)operator([)ident(i)operator(])operator(\))operator(.)ident(begLen)operator(()ident(olen)operator(,) integer(0)operator(\))operator(\)) operator(==) pre_constant(null)operator(\)) operator({) keyword(continue)operator(;) operator(}) keyword(else) operator({) type(int) ident(beg) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(0)operator(])operator(;) type(int) ident(len) operator(=) operator(()type(int)operator(\)) ident(beglen)operator([)integer(1)operator(])operator(;) type(int) ident(end) operator(=) ident(len)operator(;) keyword(for) operator(()type(int) ident(j) operator(=) integer(0)operator(;) ident(j) operator(<) ident(end)operator(;) ident(j)operator(++)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()ident(aref)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(j) operator(+) ident(beg)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(continue)operator(;) operator(}) ident(result)operator(.)ident(append)operator(()ident(aref)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(public) directive(static) type(void) ident(marshalTo)operator(()ident(RubyStruct) ident(struct)operator(,) ident(MarshalStream) ident(output)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(output)operator(.)ident(registerLinkTarget)operator(()ident(struct)operator(\))operator(;) ident(output)operator(.)ident(dumpDefaultObjectHeader)operator(()stringoperator(,) ident(struct)operator(.)ident(getMetaClass)operator(()operator(\))operator(\))operator(;) pre_type(List) ident(members) operator(=) operator(()operator(()ident(RubyArray)operator(\)) ident(getInternalVariable)operator(()ident(struct)operator(.)ident(classOf)operator(()operator(\))operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(;) ident(output)operator(.)ident(writeInt)operator(()ident(members)operator(.)ident(size)operator(()operator(\))operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(members)operator(.)ident(size)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) ident(RubySymbol) ident(name) operator(=) operator(()ident(RubySymbol)operator(\)) ident(members)operator(.)ident(get)operator(()ident(i)operator(\))operator(;) ident(output)operator(.)ident(dumpObject)operator(()ident(name)operator(\))operator(;) ident(output)operator(.)ident(dumpObject)operator(()ident(struct)operator(.)ident(values)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) directive(public) directive(static) ident(RubyStruct) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(Ruby) ident(runtime) operator(=) ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubySymbol) ident(className) operator(=) operator(()ident(RubySymbol)operator(\)) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(;) ident(RubyClass) ident(rbClass) operator(=) ident(pathToClass)operator(()ident(runtime)operator(,) ident(className)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(rbClass) operator(==) pre_constant(null)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newNameError)operator(()string operator(+) ident(className)operator(,) ident(className)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) ident(RubyArray) ident(mem) operator(=) ident(members)operator(()ident(rbClass)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) type(int) ident(len) operator(=) ident(input)operator(.)ident(unmarshalInt)operator(()operator(\))operator(;) ident(IRubyObject)type([]) ident(values) operator(=) keyword(new) ident(IRubyObject)operator([)ident(len)operator(])operator(;) keyword(for)operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(values)operator([)ident(i)operator(]) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(RubyStruct) ident(result) operator(=) ident(newStruct)operator(()ident(rbClass)operator(,) ident(values)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(for)operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(len)operator(;) ident(i)operator(++)operator(\)) operator({) ident(IRubyObject) ident(slot) operator(=) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)ident(mem)operator(.)ident(eltInternal)operator(()ident(i)operator(\))operator(.)ident(toString)operator(()operator(\))operator(.)ident(equals)operator(()ident(slot)operator(.)ident(toString)operator(()operator(\))operator(\))operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()string operator(+) ident(rbClass)operator(.)ident(getName)operator(()operator(\)) operator(+) string operator(+) ident(slot) operator(+) string operator(+) ident(mem)operator(.)ident(eltInternal)operator(()ident(i)operator(\)) operator(+) stringoperator(\))operator(;) operator(}) ident(result)operator(.)ident(aset)operator(()ident(runtime)operator(.)ident(newFixnum)operator(()ident(i)operator(\))operator(,) ident(input)operator(.)ident(unmarshalObject)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(static) ident(RubyClass) ident(pathToClass)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(path)operator(\)) operator({) comment(// FIXME: Throw the right ArgumentError's if the class is missing) comment(// or if it's a module.) keyword(return) operator(()ident(RubyClass)operator(\)) ident(runtime)operator(.)ident(getClassFromPath)operator(()ident(path)operator(\))operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(STRUCT_INSTANCE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyStruct) ident(instance) operator(=) keyword(new) ident(RubyStruct)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(instance)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) annotation(@Override) annotation(@JRubyMethod)operator(()ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(arg)operator(\)) keyword(return) local_variable(this)operator(;) ident(RubyStruct) ident(original) operator(=) operator(()ident(RubyStruct)operator(\)) ident(arg)operator(;) ident(values) operator(=) keyword(new) ident(IRubyObject)operator([)ident(original)operator(.)ident(values)operator(.)ident(length)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(original)operator(.)ident(values)operator(,) integer(0)operator(,) ident(values)operator(,) integer(0)operator(,) ident(original)operator(.)ident(values)operator(.)ident(length)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) operator(}) comment(/* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Alan Moore * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Joey Gibson * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Derek Berner * Copyright (C\) 2006 Miguel Covarrubias * Copyright (C\) 2007 William N Dortch * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.concurrent.locks.ReentrantLock)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.BlockCallback)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) comment(/** * Represents a Ruby symbol (e.g. :bar\) */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubySymbol) directive(extends) ident(RubyObject) operator({) directive(private) directive(final) pre_type(String) ident(symbol)operator(;) directive(private) directive(final) type(int) ident(id)operator(;) directive(private) directive(final) ident(ByteList) ident(symbolBytes)operator(;) comment(/** * * @param runtime * @param internedSymbol the String value of the new Symbol. This must * have been previously interned */) directive(private) ident(RubySymbol)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(internedSymbol)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getSymbol)operator(()operator(\))operator(,) pre_constant(false)operator(\))operator(;) comment(// symbol string *must* be interned) keyword(assert) ident(internedSymbol) operator(==) ident(internedSymbol)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedSymbol) operator(+) stringoperator(;) local_variable(this)operator(.)ident(symbol) operator(=) ident(internedSymbol)operator(;) local_variable(this)operator(.)ident(symbolBytes) operator(=) ident(ByteList)operator(.)ident(create)operator(()ident(symbol)operator(\))operator(;) local_variable(this)operator(.)ident(id) operator(=) ident(runtime)operator(.)ident(allocSymbolId)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createSymbolClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(symbolClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setSymbol)operator(()ident(symbolClass)operator(\))operator(;) ident(RubyClass) ident(symbolMetaClass) operator(=) ident(symbolClass)operator(.)ident(getMetaClass)operator(()operator(\))operator(;) ident(symbolClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(SYMBOL)operator(;) ident(symbolClass)operator(.)ident(kindOf) operator(=) keyword(new) ident(RubyModule)operator(.)ident(KindOf)operator(()operator(\)) operator({) directive(public) type(boolean) ident(isKindOf)operator(()ident(IRubyObject) ident(obj)operator(,) ident(RubyModule) ident(type)operator(\)) operator({) keyword(return) ident(obj) keyword(instanceof) ident(RubySymbol)operator(;) operator(}) operator(})operator(;) ident(symbolClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubySymbol)operator(.)ident(class)operator(\))operator(;) ident(symbolMetaClass)operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) keyword(return) ident(symbolClass)operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(getNativeTypeIndex)operator(()operator(\)) operator({) keyword(return) ident(ClassIndex)operator(.)ident(SYMBOL)operator(;) operator(}) comment(/** rb_to_id * * @return a String representation of the symbol */) annotation(@Override) directive(public) pre_type(String) ident(asJavaString)operator(()operator(\)) operator({) keyword(return) ident(symbol)operator(;) operator(}) comment(/** short circuit for Symbol key comparison * */) annotation(@Override) directive(public) directive(final) type(boolean) ident(eql)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) ident(other) operator(==) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(isImmediate)operator(()operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) annotation(@Override) directive(public) ident(RubyClass) ident(getSingletonClass)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) directive(public) directive(static) ident(RubySymbol) ident(getSymbolLong)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(id)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getSymbolTable)operator(()operator(\))operator(.)ident(lookup)operator(()ident(id)operator(\))operator(;) operator(}) comment(/* Symbol class methods. * */) directive(public) directive(static) ident(RubySymbol) ident(newSymbol)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(String) ident(name)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getSymbolTable)operator(()operator(\))operator(.)ident(getSymbol)operator(()ident(name)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(to_i)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(id)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(to_int)operator(()operator(\)) operator({) keyword(if) operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getVerbose)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(SYMBOL_AS_INTEGER)operator(,) stringoperator(\))operator(;) operator(}) keyword(return) ident(to_i)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(newString)operator(()string operator(+) operator(()ident(isSymbolName)operator(()ident(symbol)operator(\)) operator(?) ident(symbol) operator(:) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(runtime)operator(,) ident(symbolBytes)operator(\))operator(.)ident(dump)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) keyword(return) ident(RubyString)operator(.)ident(newStringShared)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(symbolBytes)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(id2name)operator(()operator(\)) operator({) keyword(return) ident(to_s)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_eqq)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) local_variable(super)operator(.)ident(op_equal)operator(()ident(context)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(hashCode)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@Override) directive(public) type(int) ident(hashCode)operator(()operator(\)) operator({) keyword(return) ident(id)operator(;) operator(}) directive(public) type(int) ident(getId)operator(()operator(\)) operator({) keyword(return) ident(id)operator(;) operator(}) annotation(@Override) directive(public) type(boolean) ident(equals)operator(()pre_type(Object) ident(other)operator(\)) operator({) keyword(return) ident(other) operator(==) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_sym)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(freeze)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@Override) directive(public) ident(IRubyObject) ident(taint)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) directive(private) directive(static) type(class) class(ToProcCallback) directive(implements) ident(BlockCallback) operator({) directive(private) ident(RubySymbol) ident(symbol)operator(;) directive(public) ident(ToProcCallback)operator(()ident(RubySymbol) ident(symbol)operator(\)) operator({) local_variable(this)operator(.)ident(symbol) operator(=) ident(symbol)operator(;) operator(}) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(ctx)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(blk)operator(\)) operator({) ident(IRubyObject)type([]) ident(currentArgs) operator(=) ident(args)operator(;) keyword(switch)operator(()ident(currentArgs)operator(.)ident(length)operator(\)) operator({) keyword(case) integer(0)operator(:) keyword(throw) ident(symbol)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) keyword(case) integer(1)operator(:) operator({) keyword(if)operator(()operator(()ident(currentArgs)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyArray)operator(\)) operator(&&) operator(()operator(()ident(RubyArray)operator(\))ident(currentArgs)operator([)integer(0)operator(])operator(\))operator(.)ident(getLength)operator(()operator(\)) operator(!=) integer(0)operator(\)) operator({) comment(// This is needed to unpack stuff) ident(currentArgs) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(currentArgs)operator([)integer(0)operator(])operator(\))operator(.)ident(toJavaArrayMaybeUnsafe)operator(()operator(\))operator(;) ident(IRubyObject)type([]) ident(args2) operator(=) keyword(new) ident(IRubyObject)operator([)ident(currentArgs)operator(.)ident(length)operator(-)integer(1)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(currentArgs)operator(,) integer(1)operator(,) ident(args2)operator(,) integer(0)operator(,) ident(args2)operator(.)ident(length)operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(ctx)operator(,) ident(currentArgs)operator([)integer(0)operator(])operator(,) ident(symbol)operator(.)ident(symbol)operator(,) ident(args2)operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(ctx)operator(,) ident(currentArgs)operator([)integer(0)operator(])operator(,) ident(symbol)operator(.)ident(symbol)operator(\))operator(;) operator(}) operator(}) keyword(default)operator(:) operator({) ident(IRubyObject)type([]) ident(args2) operator(=) keyword(new) ident(IRubyObject)operator([)ident(currentArgs)operator(.)ident(length)operator(-)integer(1)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(currentArgs)operator(,) integer(1)operator(,) ident(args2)operator(,) integer(0)operator(,) ident(args2)operator(.)ident(length)operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(ctx)operator(,) ident(currentArgs)operator([)integer(0)operator(])operator(,) ident(symbol)operator(.)ident(symbol)operator(,) ident(args2)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) comment(/* @JRubyMethod public IRubyObject to_proc(\) { return RubyProc.newProc(getRuntime(\), CallBlock.newCallClosure(this, getRuntime(\).getSymbol(\), Arity.noArguments(\), new ToProcCallback(this\), getRuntime(\).getCurrentContext(\)\), Block.Type.PROC\); } */) directive(private) directive(static) type(boolean) ident(isIdentStart)operator(()type(char) ident(c)operator(\)) operator({) keyword(return) operator(()operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\))operator(||) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\)) operator(||) ident(c) operator(==) stringoperator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(isIdentChar)operator(()type(char) ident(c)operator(\)) operator({) keyword(return) operator(()operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\)) operator(||) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\)) operator(||) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\)) operator(||) ident(c) operator(==) stringoperator(\))operator(;) operator(}) directive(private) directive(static) type(boolean) ident(isIdentifier)operator(()pre_type(String) ident(s)operator(\)) operator({) keyword(if) operator(()ident(s) operator(==) pre_constant(null) operator(||) ident(s)operator(.)ident(length)operator(()operator(\)) operator(<=) integer(0)operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) keyword(if) operator(()operator(!)ident(isIdentStart)operator(()ident(s)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(1)operator(;) ident(i) operator(<) ident(s)operator(.)ident(length)operator(()operator(\))operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(isIdentChar)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(\))operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) comment(/** * is_special_global_name from parse.c. * @param s * @return */) directive(private) directive(static) type(boolean) ident(isSpecialGlobalName)operator(()pre_type(String) ident(s)operator(\)) operator({) keyword(if) operator(()ident(s) operator(==) pre_constant(null) operator(||) ident(s)operator(.)ident(length)operator(()operator(\)) operator(<=) integer(0)operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) type(int) ident(length) operator(=) ident(s)operator(.)ident(length)operator(()operator(\))operator(;) keyword(switch) operator(()ident(s)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(\)) operator({) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) string)delimiter(')>operator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(return) ident(length) operator(==) integer(1)operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(length) operator(==) integer(1) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) ident(isIdentChar)operator(()ident(s)operator(.)ident(charAt)operator(()integer(1)operator(\))operator(\))operator(\))operator(\))operator(;) keyword(default)operator(:) comment(// we already confirmed above that length > 0) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)pre_type(Character)operator(.)ident(isDigit)operator(()ident(s)operator(.)ident(charAt)operator(()ident(i)operator(\))operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(true)operator(;) operator(}) directive(private) directive(static) type(boolean) ident(isSymbolName)operator(()pre_type(String) ident(s)operator(\)) operator({) keyword(if) operator(()ident(s) operator(==) pre_constant(null) operator(||) ident(s)operator(.)ident(length)operator(()operator(\)) operator(<) integer(1)operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) type(int) ident(length) operator(=) ident(s)operator(.)ident(length)operator(()operator(\))operator(;) type(char) ident(c) operator(=) ident(s)operator(.)ident(charAt)operator(()integer(0)operator(\))operator(;) keyword(switch) operator(()ident(c)operator(\)) operator({) keyword(case) stringoperator(:) keyword(if) operator(()ident(length) operator(>) integer(1) operator(&&) ident(isSpecialGlobalName)operator(()ident(s)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) keyword(return) ident(isIdentifier)operator(()ident(s)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(;) keyword(case) stringoperator(:) type(int) ident(offset) operator(=) integer(1)operator(;) keyword(if) operator(()ident(length) operator(>=) integer(2) operator(&&) ident(s)operator(.)ident(charAt)operator(()integer(1)operator(\)) operator(==) stringoperator(\)) operator({) ident(offset)operator(++)operator(;) operator(}) keyword(return) ident(isIdentifier)operator(()ident(s)operator(.)ident(substring)operator(()ident(offset)operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(length) operator(==) integer(1) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) operator(()ident(s)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\)) operator(||) operator(()ident(length) operator(==) integer(3) operator(&&) ident(s)operator(.)ident(equals)operator(()string)delimiter(")>operator(\))operator(\))operator(\))operator(;) keyword(case) string)delimiter(')>operator(:) keyword(return) operator(()ident(length) operator(==) integer(1)operator(\)) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) operator(()ident(s)operator(.)ident(equals)operator(()string>)delimiter(")>operator(\)) operator(||) ident(s)operator(.)ident(equals)operator(()string=)delimiter(")>operator(\))operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()operator(()ident(length) operator(==) integer(2) operator(&&) operator(()ident(s)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\)) operator(||) operator(()ident(length) operator(==) integer(3) operator(&&) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(length) operator(==) integer(1) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(length) operator(==) integer(1) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(return) operator(()ident(length) operator(==) integer(1) operator(||) operator(()ident(length) operator(==) integer(2) operator(&&) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(\))operator(;) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(case) stringoperator(:) keyword(return) ident(length) operator(==) integer(1)operator(;) keyword(case) stringoperator(:) keyword(return) ident(s)operator(.)ident(equals)operator(()stringoperator(\)) operator(||) ident(s)operator(.)ident(equals)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(isIdentStart)operator(()ident(c)operator(\))operator(\)) operator({) keyword(return) pre_constant(false)operator(;) operator(}) type(boolean) ident(localID) operator(=) operator(()ident(c) operator(>=) string operator(&&) ident(c) operator(<=) stringoperator(\))operator(;) type(int) ident(last) operator(=) integer(1)operator(;) keyword(for) operator(()operator(;) ident(last) operator(<) ident(length)operator(;) ident(last)operator(++)operator(\)) operator({) type(char) ident(d) operator(=) ident(s)operator(.)ident(charAt)operator(()ident(last)operator(\))operator(;) keyword(if) operator(()operator(!)ident(isIdentChar)operator(()ident(d)operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) operator(}) keyword(if) operator(()ident(last) operator(==) ident(length)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(localID) operator(&&) ident(last) operator(==) ident(length) operator(-) integer(1)operator(\)) operator({) type(char) ident(d) operator(=) ident(s)operator(.)ident(charAt)operator(()ident(last)operator(\))operator(;) keyword(return) ident(d) operator(==) string operator(||) ident(d) operator(==) string operator(||) ident(d) operator(==) stringoperator(;) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(all_symbols)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getSymbolTable)operator(()operator(\))operator(.)ident(all_symbols)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubySymbol) ident(unmarshalFrom)operator(()ident(UnmarshalStream) ident(input)operator(\)) directive(throws) ident(java)operator(.)ident(io)operator(.)ident(IOException) operator({) ident(RubySymbol) ident(result) operator(=) ident(newSymbol)operator(()ident(input)operator(.)ident(getRuntime)operator(()operator(\))operator(,) ident(RubyString)operator(.)ident(byteListToString)operator(()ident(input)operator(.)ident(unmarshalString)operator(()operator(\))operator(\))operator(\))operator(;) ident(input)operator(.)ident(registerLinkTarget)operator(()ident(result)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(public) directive(static) type(class) class(SymbolTable) operator({) directive(static) directive(final) type(int) ident(DEFAULT_INITIAL_CAPACITY) operator(=) integer(2048)operator(;) comment(// *must* be power of 2!) directive(static) directive(final) type(int) ident(MAXIMUM_CAPACITY) operator(=) integer(1) operator(<)operator(<) integer(30)operator(;) directive(static) directive(final) type(float) ident(DEFAULT_LOAD_FACTOR) operator(=) float(0.75f)operator(;) directive(private) directive(final) pre_type(ReentrantLock) ident(tableLock) operator(=) keyword(new) pre_type(ReentrantLock)operator(()operator(\))operator(;) directive(private) directive(volatile) ident(SymbolEntry)type([]) ident(symbolTable)operator(;) directive(private) type(int) ident(size)operator(;) directive(private) type(int) ident(threshold)operator(;) directive(private) directive(final) type(float) ident(loadFactor)operator(;) directive(private) directive(final) ident(Ruby) ident(runtime)operator(;) directive(public) ident(SymbolTable)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(this)operator(.)ident(runtime) operator(=) ident(runtime)operator(;) local_variable(this)operator(.)ident(loadFactor) operator(=) ident(DEFAULT_LOAD_FACTOR)operator(;) local_variable(this)operator(.)ident(threshold) operator(=) operator(()type(int)operator(\))operator(()ident(DEFAULT_INITIAL_CAPACITY) operator(*) ident(DEFAULT_LOAD_FACTOR)operator(\))operator(;) local_variable(this)operator(.)ident(symbolTable) operator(=) keyword(new) ident(SymbolEntry)operator([)ident(DEFAULT_INITIAL_CAPACITY)operator(])operator(;) operator(}) comment(// note all fields are final -- rehash creates new entries when necessary.) comment(// as documented in java.util.concurrent.ConcurrentHashMap.java, that will) comment(// statistically affect only a small percentage (< 20%\) of entries for a given rehash.) directive(static) type(class) class(SymbolEntry) operator({) directive(final) type(int) ident(hash)operator(;) directive(final) pre_type(String) ident(name)operator(;) directive(final) ident(RubySymbol) ident(symbol)operator(;) directive(final) ident(SymbolEntry) ident(next)operator(;) ident(SymbolEntry)operator(()type(int) ident(hash)operator(,) pre_type(String) ident(name)operator(,) ident(RubySymbol) ident(symbol)operator(,) ident(SymbolEntry) ident(next)operator(\)) operator({) local_variable(this)operator(.)ident(hash) operator(=) ident(hash)operator(;) local_variable(this)operator(.)ident(name) operator(=) ident(name)operator(;) local_variable(this)operator(.)ident(symbol) operator(=) ident(symbol)operator(;) local_variable(this)operator(.)ident(next) operator(=) ident(next)operator(;) operator(}) operator(}) directive(public) ident(RubySymbol) ident(getSymbol)operator(()pre_type(String) ident(name)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) ident(SymbolEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(symbolTable)operator(\))operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(tableLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(size) operator(+) integer(1)operator(\)) operator(>) ident(threshold)operator(\)) operator({) ident(table) operator(=) ident(rehash)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(table) operator(=) ident(symbolTable)operator(;) operator(}) type(int) ident(index)operator(;) comment(// try lookup again under lock) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) ident(table)operator([)ident(index) operator(=) ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) pre_type(String) ident(internedName)operator(;) ident(RubySymbol) ident(symbol) operator(=) keyword(new) ident(RubySymbol)operator(()ident(runtime)operator(,) ident(internedName) operator(=) ident(name)operator(.)ident(intern)operator(()operator(\))operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) keyword(new) ident(SymbolEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(symbol)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(size) operator(=) ident(potentialNewSize)operator(;) comment(// write-volatile) ident(symbolTable) operator(=) ident(table)operator(;) keyword(return) ident(symbol)operator(;) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) ident(RubySymbol) ident(fastGetSymbol)operator(()pre_type(String) ident(internedName)operator(\)) operator({) keyword(assert) ident(internedName) operator(==) ident(internedName)operator(.)ident(intern)operator(()operator(\)) operator(:) ident(internedName) operator(+) stringoperator(;) ident(SymbolEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(symbolTable)operator(\))operator([)ident(internedName)operator(.)ident(hashCode)operator(()operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) pre_type(ReentrantLock) ident(lock)operator(;) operator(()ident(lock) operator(=) ident(tableLock)operator(\))operator(.)ident(lock)operator(()operator(\))operator(;) keyword(try) operator({) type(int) ident(potentialNewSize)operator(;) keyword(if) operator(()operator(()ident(potentialNewSize) operator(=) ident(size) operator(+) integer(1)operator(\)) operator(>) ident(threshold)operator(\)) operator({) ident(table) operator(=) ident(rehash)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) ident(table) operator(=) ident(symbolTable)operator(;) operator(}) type(int) ident(index)operator(;) type(int) ident(hash)operator(;) comment(// try lookup again under lock) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) ident(table)operator([)ident(index) operator(=) operator(()ident(hash) operator(=) ident(internedName)operator(.)ident(hashCode)operator(()operator(\))operator(\)) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(internedName) operator(==) ident(e)operator(.)ident(name)operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) ident(RubySymbol) ident(symbol) operator(=) keyword(new) ident(RubySymbol)operator(()ident(runtime)operator(,) ident(internedName)operator(\))operator(;) ident(table)operator([)ident(index)operator(]) operator(=) keyword(new) ident(SymbolEntry)operator(()ident(hash)operator(,) ident(internedName)operator(,) ident(symbol)operator(,) ident(table)operator([)ident(index)operator(])operator(\))operator(;) ident(size) operator(=) ident(potentialNewSize)operator(;) comment(// write-volatile) ident(symbolTable) operator(=) ident(table)operator(;) keyword(return) ident(symbol)operator(;) operator(}) keyword(finally) operator({) ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) operator(}) comment(// backwards-compatibility, but threadsafe now) directive(public) ident(RubySymbol) ident(lookup)operator(()pre_type(String) ident(name)operator(\)) operator({) type(int) ident(hash) operator(=) ident(name)operator(.)ident(hashCode)operator(()operator(\))operator(;) ident(SymbolEntry)type([]) ident(table)operator(;) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) operator(()ident(table) operator(=) ident(symbolTable)operator(\))operator([)ident(hash) operator(&) operator(()ident(table)operator(.)ident(length) operator(-) integer(1)operator(\))operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(hash) operator(==) ident(e)operator(.)ident(hash) operator(&&) ident(name)operator(.)ident(equals)operator(()ident(e)operator(.)ident(name)operator(\))operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(public) ident(RubySymbol) ident(lookup)operator(()type(long) ident(id)operator(\)) operator({) ident(SymbolEntry)type([]) ident(table) operator(=) ident(symbolTable)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) keyword(if) operator(()ident(id) operator(==) ident(e)operator(.)ident(symbol)operator(.)ident(id)operator(\)) operator({) keyword(return) ident(e)operator(.)ident(symbol)operator(;) operator(}) operator(}) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) directive(public) ident(RubyArray) ident(all_symbols)operator(()operator(\)) operator({) ident(SymbolEntry)type([]) ident(table) operator(=) local_variable(this)operator(.)ident(symbolTable)operator(;) ident(RubyArray) ident(array) operator(=) ident(runtime)operator(.)ident(newArray)operator(()local_variable(this)operator(.)ident(size)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(table)operator(.)ident(length)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) keyword(for) operator(()ident(SymbolEntry) ident(e) operator(=) ident(table)operator([)ident(i)operator(])operator(;) ident(e) operator(!=) pre_constant(null)operator(;) ident(e) operator(=) ident(e)operator(.)ident(next)operator(\)) operator({) ident(array)operator(.)ident(append)operator(()ident(e)operator(.)ident(symbol)operator(\))operator(;) operator(}) operator(}) keyword(return) ident(array)operator(;) operator(}) comment(// not so backwards-compatible here, but no one should have been) comment(// calling this anyway.) annotation(@Deprecated) directive(public) type(void) ident(store)operator(()ident(RubySymbol) ident(symbol)operator(\)) operator({) keyword(throw) keyword(new) exception(UnsupportedOperationException)operator(()operator(\))operator(;) operator(}) directive(private) ident(SymbolEntry)type([]) ident(rehash)operator(()operator(\)) operator({) ident(SymbolEntry)type([]) ident(oldTable) operator(=) ident(symbolTable)operator(;) type(int) ident(oldCapacity)operator(;) keyword(if) operator(()operator(()ident(oldCapacity) operator(=) ident(oldTable)operator(.)ident(length)operator(\)) operator(>=) ident(MAXIMUM_CAPACITY)operator(\)) operator({) keyword(return) ident(oldTable)operator(;) operator(}) type(int) ident(newCapacity) operator(=) ident(oldCapacity) operator(<)operator(<) integer(1)operator(;) ident(SymbolEntry)type([]) ident(newTable) operator(=) keyword(new) ident(SymbolEntry)operator([)ident(newCapacity)operator(])operator(;) ident(threshold) operator(=) operator(()type(int)operator(\))operator(()ident(newCapacity) operator(*) ident(loadFactor)operator(\))operator(;) type(int) ident(sizeMask) operator(=) ident(newCapacity) operator(-) integer(1)operator(;) ident(SymbolEntry) ident(e)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(oldCapacity)operator(;) operator(--)ident(i) operator(>=) integer(0)operator(;) operator(\)) operator({) comment(// We need to guarantee that any existing reads of old Map can) comment(// proceed. So we cannot yet null out each bin.) ident(e) operator(=) ident(oldTable)operator([)ident(i)operator(])operator(;) keyword(if) operator(()ident(e) operator(!=) pre_constant(null)operator(\)) operator({) ident(SymbolEntry) ident(next) operator(=) ident(e)operator(.)ident(next)operator(;) type(int) ident(idx) operator(=) ident(e)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) comment(// Single node on list) keyword(if) operator(()ident(next) operator(==) pre_constant(null)operator(\)) ident(newTable)operator([)ident(idx)operator(]) operator(=) ident(e)operator(;) keyword(else) operator({) comment(// Reuse trailing consecutive sequence at same slot) ident(SymbolEntry) ident(lastRun) operator(=) ident(e)operator(;) type(int) ident(lastIdx) operator(=) ident(idx)operator(;) keyword(for) operator(()ident(SymbolEntry) ident(last) operator(=) ident(next)operator(;) ident(last) operator(!=) pre_constant(null)operator(;) ident(last) operator(=) ident(last)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(last)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) keyword(if) operator(()ident(k) operator(!=) ident(lastIdx)operator(\)) operator({) ident(lastIdx) operator(=) ident(k)operator(;) ident(lastRun) operator(=) ident(last)operator(;) operator(}) operator(}) ident(newTable)operator([)ident(lastIdx)operator(]) operator(=) ident(lastRun)operator(;) comment(// Clone all remaining nodes) keyword(for) operator(()ident(SymbolEntry) ident(p) operator(=) ident(e)operator(;) ident(p) operator(!=) ident(lastRun)operator(;) ident(p) operator(=) ident(p)operator(.)ident(next)operator(\)) operator({) type(int) ident(k) operator(=) ident(p)operator(.)ident(hash) operator(&) ident(sizeMask)operator(;) ident(SymbolEntry) ident(n) operator(=) ident(newTable)operator([)ident(k)operator(])operator(;) ident(newTable)operator([)ident(k)operator(]) operator(=) keyword(new) ident(SymbolEntry)operator(()ident(p)operator(.)ident(hash)operator(,) ident(p)operator(.)ident(name)operator(,) ident(p)operator(.)ident(symbol)operator(,) ident(n)operator(\))operator(;) operator(}) operator(}) operator(}) operator(}) ident(symbolTable) operator(=) ident(newTable)operator(;) keyword(return) ident(newTable)operator(;) operator(}) operator(}) operator(}) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ObjectMarshal)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.builtin.Variable)operator(;) keyword(import) include(org.jruby.runtime.component.VariableEntry)operator(;) keyword(import) include(org.jruby.runtime.marshal.MarshalStream)operator(;) keyword(import) include(org.jruby.runtime.marshal.UnmarshalStream)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubySystemCallError) directive(extends) ident(RubyException) operator({) directive(private) ident(IRubyObject) ident(errno) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) directive(private) directive(final) directive(static) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(String)operator(>) ident(defaultMessages) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(String)operator(>)operator(()operator(\))operator(;) directive(static) operator({) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) ident(defaultMessages)operator(.)ident(put)operator(()stringoperator(,) stringoperator(\))operator(;) operator(}) directive(protected) ident(RubySystemCallError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) pre_constant(null)operator(\))operator(;) operator(}) directive(public) ident(RubySystemCallError)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) pre_type(String) ident(message)operator(,) type(int) ident(errno)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(,) ident(message)operator(\))operator(;) local_variable(this)operator(.)ident(errno) operator(=) ident(runtime)operator(.)ident(newFixnum)operator(()ident(errno)operator(\))operator(;) operator(}) directive(private) directive(static) ident(ObjectAllocator) ident(SYSTEM_CALL_ERROR_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) ident(RubyException) ident(instance) operator(=) keyword(new) ident(RubySystemCallError)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) ident(instance)operator(.)ident(setMetaClass)operator(()ident(klass)operator(\))operator(;) keyword(return) ident(instance)operator(;) operator(}) operator(})operator(;) directive(private) directive(static) directive(final) ident(ObjectMarshal) ident(SYSTEM_CALL_ERROR_MARSHAL) operator(=) keyword(new) ident(ObjectMarshal)operator(()operator(\)) operator({) directive(public) type(void) ident(marshalTo)operator(()ident(Ruby) ident(runtime)operator(,) pre_type(Object) ident(obj)operator(,) ident(RubyClass) ident(type)operator(,) ident(MarshalStream) ident(marshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubySystemCallError) ident(exc) operator(=) operator(()ident(RubySystemCallError)operator(\)) ident(obj)operator(;) ident(marshalStream)operator(.)ident(registerLinkTarget)operator(()ident(exc)operator(\))operator(;) pre_type(List)operator(<)ident(Variable)operator(<)ident(IRubyObject)operator(>)operator(>) ident(attrs) operator(=) ident(exc)operator(.)ident(getVariableList)operator(()operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(() stringoperator(,) ident(exc)operator(.)ident(message) operator(==) pre_constant(null) operator(?) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(exc)operator(.)ident(message)operator(\))operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(exc)operator(.)ident(errno)operator(\))operator(\))operator(;) ident(attrs)operator(.)ident(add)operator(()keyword(new) ident(VariableEntry)operator(<)ident(IRubyObject)operator(>)operator(()stringoperator(,) ident(exc)operator(.)ident(getBacktrace)operator(()operator(\))operator(\))operator(\))operator(;) ident(marshalStream)operator(.)ident(dumpVariables)operator(()ident(attrs)operator(\))operator(;) operator(}) directive(public) pre_type(Object) ident(unmarshalFrom)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(,) ident(UnmarshalStream) ident(unmarshalStream)operator(\)) directive(throws) exception(IOException) operator({) ident(RubySystemCallError) ident(exc) operator(=) operator(()ident(RubySystemCallError)operator(\)) ident(type)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(unmarshalStream)operator(.)ident(registerLinkTarget)operator(()ident(exc)operator(\))operator(;) ident(unmarshalStream)operator(.)ident(defaultVariablesUnmarshal)operator(()ident(exc)operator(\))operator(;) ident(exc)operator(.)ident(message) operator(=) ident(exc)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(;) ident(exc)operator(.)ident(errno) operator(=) ident(exc)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(;) ident(exc)operator(.)ident(set_backtrace)operator(()ident(exc)operator(.)ident(removeInternalVariable)operator(()stringoperator(\))operator(\))operator(;) keyword(return) ident(exc)operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createSystemCallErrorClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(standardError)operator(\)) operator({) ident(RubyClass) ident(exceptionClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(standardError)operator(,) ident(SYSTEM_CALL_ERROR_ALLOCATOR)operator(\))operator(;) ident(exceptionClass)operator(.)ident(setMarshal)operator(()ident(SYSTEM_CALL_ERROR_MARSHAL)operator(\))operator(;) ident(runtime)operator(.)ident(callbackFactory)operator(()ident(RubyClass)operator(.)ident(class)operator(\))operator(;) ident(exceptionClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubySystemCallError)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(exceptionClass)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(optional) operator(=) integer(2)operator(,) ident(required)operator(=)integer(0)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(sCallErorrClass) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getSystemCallError)operator(()operator(\))operator(;) ident(RubyClass) ident(klass) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(;) ident(IRubyObject) ident(msg) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(IRubyObject) ident(err) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) type(boolean) ident(isErrnoClass) operator(=) operator(!)ident(klass)operator(.)ident(equals)operator(()ident(sCallErorrClass)operator(\))operator(;) keyword(if) operator(()operator(!)ident(isErrnoClass)operator(\)) operator({) comment(// one optional, one required args) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(1)operator(,) integer(2)operator(\))operator(;) ident(msg) operator(=) ident(args)operator([)integer(0)operator(])operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(2)operator(\)) operator({) ident(err) operator(=) ident(args)operator([)integer(1)operator(])operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1) operator(&&) operator(()ident(msg) keyword(instanceof) ident(RubyFixnum)operator(\))operator(\)) operator({) ident(err) operator(=) ident(msg)operator(;) ident(msg) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) comment(// one optional and no required args) ident(Arity)operator(.)ident(checkArgumentCount)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(args)operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) ident(msg) operator(=) ident(args)operator([)integer(0)operator(])operator(;) operator(}) comment(// try to get errno out of the class ) ident(err) operator(=) ident(klass)operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(err)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(errno) operator(=) ident(err)operator(.)ident(convertToInteger)operator(()operator(\))operator(;) operator(}) pre_type(String) ident(val) operator(=) ident(defaultMessages)operator(.)ident(get)operator(()ident(klass)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(val) operator(==) pre_constant(null)operator(\)) operator({) ident(val) operator(=) stringoperator(;) operator(}) comment(// MRI behavior: we don't print errno for actual Errno errors) keyword(if) operator(()operator(!)ident(errno)operator(.)ident(isNil)operator(()operator(\)) operator(&&) operator(!)ident(isErrnoClass)operator(\)) operator({) ident(val) operator(+=) string operator(+) ident(errno)operator(.)ident(toString)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(msg)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(val) operator(+=) string operator(+) ident(msg)operator(.)ident(convertToString)operator(()operator(\))operator(;) operator(}) ident(message) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(val)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod) directive(public) ident(IRubyObject) ident(errno)operator(()operator(\)) operator({) keyword(return) ident(errno)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubySystemExit) directive(extends) ident(RubyException) operator({) ident(IRubyObject) ident(status)operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(SYSTEMEXIT_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubySystemExit)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createSystemExitClass)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(\)) operator({) ident(RubyClass) ident(systemExitClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(exceptionClass)operator(,) ident(SYSTEMEXIT_ALLOCATOR)operator(\))operator(;) ident(systemExitClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubySystemExit)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(systemExitClass)operator(;) operator(}) directive(public) directive(static) ident(RubySystemExit) ident(newInstance)operator(()ident(Ruby) ident(runtime)operator(,) type(int) ident(status)operator(\)) operator({) ident(RubyClass) ident(exc) operator(=) ident(runtime)operator(.)ident(getSystemExit)operator(()operator(\))operator(;) ident(IRubyObject)type([]) ident(exArgs) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(runtime)operator(.)ident(newFixnum)operator(()ident(status)operator(\))operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\)) operator(})operator(;) keyword(return) operator(()ident(RubySystemExit)operator(\)) ident(exc)operator(.)ident(newInstance)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(exArgs)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) directive(protected) ident(RubySystemExit)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(exceptionClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(exceptionClass)operator(\))operator(;) ident(status) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([])ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(status) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0) operator(&&) ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(status) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(IRubyObject)type([])ident(tmpArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(args)operator(.)ident(length) operator(-) integer(1)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(1)operator(,) ident(tmpArgs)operator(,) integer(0)operator(,) ident(tmpArgs)operator(.)ident(length)operator(\))operator(;) ident(args) operator(=) ident(tmpArgs)operator(;) operator(}) local_variable(super)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(status)operator(()operator(\)) operator({) keyword(return) ident(status)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(success_p)operator(()operator(\)) operator({) keyword(if) operator(()ident(status)operator(.)ident(isNil)operator(()operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(if) operator(()ident(status)operator(.)ident(equals)operator(()ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(\)) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Jason Voegele * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2002-2004 Jan Arne Petersen * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004-2005 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.nio.channels.Channel)operator(;) keyword(import) include(java.nio.channels.SelectableChannel)operator(;) keyword(import) include(java.nio.channels.SelectionKey)operator(;) keyword(import) include(java.nio.channels.Selector)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.Set)operator(;) keyword(import) include(org.jruby.common.IRubyWarnings.ID)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.exceptions.ThreadKill)operator(;) keyword(import) include(org.jruby.internal.runtime.FutureThread)operator(;) keyword(import) include(org.jruby.internal.runtime.NativeThread)operator(;) keyword(import) include(org.jruby.internal.runtime.RubyRunnable)operator(;) keyword(import) include(org.jruby.internal.runtime.ThreadLike)operator(;) keyword(import) include(org.jruby.internal.runtime.ThreadService)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(java.util.concurrent.ExecutionException)operator(;) keyword(import) include(java.util.concurrent.locks.ReentrantLock)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.ObjectMarshal)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) comment(/** * Implementation of Ruby's Thread class. Each Ruby thread is * mapped to an underlying Java Virtual Machine thread. *

* Thread encapsulates the behavior of a thread of execution, including the main * thread of the Ruby script. In the descriptions that follow, the parameter * aSymbol refers to a symbol, which is either a quoted string or a * Symbol (such as :name\). * * Note: For CVS history, see ThreadClass.java. */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyThread) directive(extends) ident(RubyObject) operator({) directive(private) ident(ThreadLike) ident(threadImpl)operator(;) directive(private) ident(RubyFixnum) ident(priority)operator(;) directive(private) directive(transient) pre_type(Map)operator(<)ident(IRubyObject)operator(,) ident(IRubyObject)operator(>) ident(threadLocalVariables)operator(;) directive(private) type(boolean) ident(abortOnException)operator(;) directive(private) ident(IRubyObject) ident(finalResult)operator(;) directive(private) ident(RaiseException) ident(exitingException)operator(;) directive(private) ident(IRubyObject) ident(receivedException)operator(;) directive(private) ident(RubyThreadGroup) ident(threadGroup)operator(;) directive(private) directive(final) ident(ThreadService) ident(threadService)operator(;) directive(private) directive(volatile) type(boolean) ident(isStopped) operator(=) pre_constant(false)operator(;) directive(private) directive(volatile) type(boolean) ident(isDead) operator(=) pre_constant(false)operator(;) directive(public) pre_type(Object) ident(stopLock) operator(=) keyword(new) pre_type(Object)operator(()operator(\))operator(;) directive(private) directive(volatile) type(boolean) ident(killed) operator(=) pre_constant(false)operator(;) directive(public) pre_type(Object) ident(killLock) operator(=) keyword(new) pre_type(Object)operator(()operator(\))operator(;) directive(public) directive(final) pre_type(ReentrantLock) ident(lock) operator(=) keyword(new) pre_type(ReentrantLock)operator(()operator(\))operator(;) directive(private) directive(static) directive(final) type(boolean) ident(DEBUG) operator(=) pre_constant(false)operator(;) directive(protected) ident(RubyThread)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) local_variable(this)operator(.)ident(threadService) operator(=) ident(runtime)operator(.)ident(getThreadService)operator(()operator(\))operator(;) ident(finalResult) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(/** * Dispose of the current thread by removing it from its parent ThreadGroup. */) directive(public) type(void) ident(dispose)operator(()operator(\)) operator({) ident(threadGroup)operator(.)ident(remove)operator(()local_variable(this)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(createThreadClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// FIXME: In order for Thread to play well with the standard 'new' behavior,) comment(// it must provide an allocator that can create empty object instances which) comment(// initialize then fills with appropriate data.) ident(RubyClass) ident(threadClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setThread)operator(()ident(threadClass)operator(\))operator(;) ident(threadClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyThread)operator(.)ident(class)operator(\))operator(;) ident(RubyThread) ident(rubyThread) operator(=) keyword(new) ident(RubyThread)operator(()ident(runtime)operator(,) ident(threadClass)operator(\))operator(;) comment(// TODO: need to isolate the "current" thread from class creation) ident(rubyThread)operator(.)ident(threadImpl) operator(=) keyword(new) ident(NativeThread)operator(()ident(rubyThread)operator(,) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(setMainThread)operator(()pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\))operator(,) ident(rubyThread)operator(\))operator(;) comment(// set to default thread group) ident(runtime)operator(.)ident(getDefaultThreadGroup)operator(()operator(\))operator(.)ident(addDirectly)operator(()ident(rubyThread)operator(\))operator(;) ident(threadClass)operator(.)ident(setMarshal)operator(()ident(ObjectMarshal)operator(.)ident(NOT_MARSHALABLE_MARSHAL)operator(\))operator(;) keyword(return) ident(threadClass)operator(;) operator(}) comment(/** * Thread.new *

* Thread.new( [ arg ]* \) {| args | block } -> aThread *

* Creates a new thread to execute the instructions given in block, and * begins running it. Any arguments passed to Thread.new are passed into the * block. *

     * x = Thread.new { sleep .1; print "x"; print "y"; print "z" }
     * a = Thread.new { print "a"; print "b"; sleep .2; print "c" }
     * x.join # Let the threads finish before
     * a.join # main thread exits...
     * 
* produces: abxyzc */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(startThread)operator(()ident(recv)operator(,) ident(args)operator(,) pre_constant(true)operator(,) ident(block)operator(\))operator(;) operator(}) comment(/** * Basically the same as Thread.new . However, if class Thread is * subclassed, then calling start in that subclass will not invoke the * subclass's initialize method. */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyThread) ident(start)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(startThread)operator(()ident(recv)operator(,) ident(args)operator(,) pre_constant(false)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyThread) ident(adopt)operator(()ident(IRubyObject) ident(recv)operator(,) pre_type(Thread) ident(t)operator(\)) operator({) keyword(return) ident(adoptThread)operator(()ident(recv)operator(,) ident(t)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) directive(private) directive(static) ident(RubyThread) ident(adoptThread)operator(()directive(final) ident(IRubyObject) ident(recv)operator(,) pre_type(Thread) ident(t)operator(,) ident(Block) ident(block)operator(\)) operator({) directive(final) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyThread) ident(rubyThread) operator(=) keyword(new) ident(RubyThread)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(;) ident(rubyThread)operator(.)ident(threadImpl) operator(=) keyword(new) ident(NativeThread)operator(()ident(rubyThread)operator(,) ident(t)operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(registerNewThread)operator(()ident(rubyThread)operator(\))operator(;) ident(context)operator(.)ident(preAdoptThread)operator(()operator(\))operator(;) comment(// set to default thread group) ident(runtime)operator(.)ident(getDefaultThreadGroup)operator(()operator(\))operator(.)ident(addDirectly)operator(()ident(rubyThread)operator(\))operator(;) keyword(return) ident(rubyThread)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) keyword(throw) ident(runtime)operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) ident(RubyRunnable) ident(runnable) operator(=) keyword(new) ident(RubyRunnable)operator(()local_variable(this)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) keyword(if) operator(()ident(RubyInstanceConfig)operator(.)ident(POOLING_ENABLED)operator(\)) operator({) ident(threadImpl) operator(=) keyword(new) ident(FutureThread)operator(()local_variable(this)operator(,) ident(runnable)operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(Thread) ident(thread) operator(=) keyword(new) pre_type(Thread)operator(()ident(runnable)operator(\))operator(;) ident(thread)operator(.)ident(setDaemon)operator(()pre_constant(true)operator(\))operator(;) ident(threadImpl) operator(=) keyword(new) ident(NativeThread)operator(()local_variable(this)operator(,) ident(thread)operator(\))operator(;) operator(}) comment(// set to default thread group) ident(runtime)operator(.)ident(getDefaultThreadGroup)operator(()operator(\))operator(.)ident(addDirectly)operator(()local_variable(this)operator(\))operator(;) ident(threadImpl)operator(.)ident(start)operator(()operator(\))operator(;) comment(// We yield here to hopefully permit the target thread to schedule) comment(// MRI immediately schedules it, so this is close but not exact) pre_type(Thread)operator(.)ident(yield)operator(()operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) directive(private) directive(static) ident(RubyThread) ident(startThread)operator(()directive(final) ident(IRubyObject) ident(recv)operator(,) directive(final) ident(IRubyObject)type([]) ident(args)operator(,) type(boolean) ident(callInit)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyThread) ident(rubyThread) operator(=) keyword(new) ident(RubyThread)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(;) keyword(if) operator(()ident(callInit)operator(\)) operator({) ident(rubyThread)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(else) operator({) comment(// for Thread::start, which does not call the subclass's initialize) ident(rubyThread)operator(.)ident(initialize)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(rubyThread)operator(;) operator(}) directive(private) type(void) ident(ensureNotCurrent)operator(()operator(\)) operator({) keyword(if) operator(()local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(\)) operator({) keyword(throw) keyword(new) exception(RuntimeException)operator(()stringoperator(\))operator(;) operator(}) operator(}) directive(public) directive(synchronized) type(void) ident(cleanTerminate)operator(()ident(IRubyObject) ident(result)operator(\)) operator({) ident(finalResult) operator(=) ident(result)operator(;) ident(isStopped) operator(=) pre_constant(true)operator(;) ident(isDead) operator(=) pre_constant(true)operator(;) operator(}) directive(public) type(void) ident(pollThreadEvents)operator(()operator(\)) operator({) ident(pollThreadEvents)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(pollThreadEvents)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) comment(// check for criticalization *before* locking ourselves) ident(threadService)operator(.)ident(waitForCritical)operator(()operator(\))operator(;) keyword(if) operator(()ident(killed)operator(\)) ident(throwThreadKill)operator(()operator(\))operator(;) keyword(if) operator(()ident(receivedException) operator(!=) pre_constant(null)operator(\)) ident(receivedAnException)operator(()ident(context)operator(\))operator(;) operator(}) directive(private) type(void) ident(throwThreadKill)operator(()operator(\)) operator({) keyword(throw) keyword(new) ident(ThreadKill)operator(()operator(\))operator(;) operator(}) comment(/** * Returns the status of the global ``abort on exception'' condition. The * default is false. When set to true, will cause all threads to abort (the * process will exit(0\)\) if an exception is raised in any thread. See also * Thread.abort_on_exception= . */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyBoolean) ident(abort_on_exception_x)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(isGlobalAbortOnExceptionEnabled)operator(()operator(\)) operator(?) ident(runtime)operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(runtime)operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(abort_on_exception_set_x)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(setGlobalAbortOnExceptionEnabled)operator(()ident(value)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyThread) ident(current)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyThread) ident(main)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getMainThread)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(pass)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ThreadService) ident(ts) operator(=) ident(runtime)operator(.)ident(getThreadService)operator(()operator(\))operator(;) type(boolean) ident(critical) operator(=) ident(ts)operator(.)ident(getCritical)operator(()operator(\))operator(;) ident(ts)operator(.)ident(setCritical)operator(()pre_constant(false)operator(\))operator(;) pre_type(Thread)operator(.)ident(yield)operator(()operator(\))operator(;) ident(ts)operator(.)ident(setCritical)operator(()ident(critical)operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyArray) ident(list)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) ident(RubyThread)type([]) ident(activeThreads) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getActiveRubyThreads)operator(()operator(\))operator(;) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()ident(activeThreads)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(getSymbolKey)operator(()ident(IRubyObject) ident(originalKey)operator(\)) operator({) keyword(if) operator(()ident(originalKey) keyword(instanceof) ident(RubySymbol)operator(\)) operator({) keyword(return) ident(originalKey)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(originalKey) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newSymbol)operator(()ident(originalKey)operator(.)ident(asJavaString)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(originalKey) keyword(instanceof) ident(RubyFixnum)operator(\)) operator({) ident(getRuntime)operator(()operator(\))operator(.)ident(getWarnings)operator(()operator(\))operator(.)ident(warn)operator(()ident(ID)operator(.)ident(FIXNUMS_NOT_SYMBOLS)operator(,) stringoperator(\))operator(;) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(originalKey) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(originalKey) operator(+) stringoperator(\))operator(;) operator(}) operator(}) directive(private) directive(synchronized) pre_type(Map)operator(<)ident(IRubyObject)operator(,) ident(IRubyObject)operator(>) ident(getThreadLocals)operator(()operator(\)) operator({) keyword(if) operator(()ident(threadLocalVariables) operator(==) pre_constant(null)operator(\)) operator({) ident(threadLocalVariables) operator(=) keyword(new) pre_type(HashMap)operator(<)ident(IRubyObject)operator(,) ident(IRubyObject)operator(>)operator(()operator(\))operator(;) operator(}) keyword(return) ident(threadLocalVariables)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_aref)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) ident(IRubyObject) ident(value)operator(;) keyword(if) operator(()operator(()ident(value) operator(=) ident(getThreadLocals)operator(()operator(\))operator(.)ident(get)operator(()ident(getSymbolKey)operator(()ident(key)operator(\))operator(\))operator(\)) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(value)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(op_aset)operator(()ident(IRubyObject) ident(key)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(key) operator(=) ident(getSymbolKey)operator(()ident(key)operator(\))operator(;) ident(getThreadLocals)operator(()operator(\))operator(.)ident(put)operator(()ident(key)operator(,) ident(value)operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(abort_on_exception)operator(()operator(\)) operator({) keyword(return) ident(abortOnException) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(abort_on_exception_set)operator(()ident(IRubyObject) ident(val)operator(\)) operator({) ident(abortOnException) operator(=) ident(val)operator(.)ident(isTrue)operator(()operator(\))operator(;) keyword(return) ident(val)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(alive_p)operator(()operator(\)) operator({) keyword(return) operator(!)ident(isDead) operator(&&) ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(backtrace) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(join)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) operator({) type(long) ident(timeoutMillis) operator(=) pre_type(Long)operator(.)ident(MAX_VALUE)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()ident(args)operator(.)ident(length)operator(,)integer(1)operator(\))operator(;) operator(}) comment(// MRI behavior: value given in seconds; converted to Float; less) comment(// than or equal to zero returns immediately; returns nil) ident(timeoutMillis) operator(=) operator(()type(long)operator(\))operator(()float(1000.0D) operator(*) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToFloat)operator(()operator(\))operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) keyword(if) operator(()ident(timeoutMillis) operator(<=) integer(0)operator(\)) operator({) comment(// TODO: not sure that we should skip calling join(\) altogether.) comment(// Thread.join(\) has some implications for Java Memory Model, etc.) keyword(if) operator(()ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) operator(}) keyword(if) operator(()ident(isCurrent)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newThreadError)operator(()stringoperator(\))operator(;) operator(}) keyword(try) operator({) keyword(if) operator(()ident(threadService)operator(.)ident(getCritical)operator(()operator(\))operator(\)) operator({) comment(// If the target thread is sleeping or stopped, wake it) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(stopLock)operator(.)ident(notify)operator(()operator(\))operator(;) operator(}) comment(// interrupt the target thread in case it's blocking or waiting) comment(// WARNING: We no longer interrupt the target thread, since this usually means) comment(// interrupting IO and with NIO that means the channel is no longer usable.) comment(// We either need a new way to handle waking a target thread that's waiting) comment(// on IO, or we need to accept that we can't wake such threads and must wait) comment(// for them to complete their operation.) comment(//threadImpl.interrupt(\);) operator(}) ident(RubyThread) ident(currentThread) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) directive(final) type(long) ident(timeToWait) operator(=) pre_type(Math)operator(.)ident(min)operator(()ident(timeoutMillis)operator(,) integer(200)operator(\))operator(;) comment(// We need this loop in order to be able to "unblock" the) comment(// join call without actually calling interrupt.) type(long) ident(start) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) keyword(while)operator(()pre_constant(true)operator(\)) operator({) ident(currentThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) ident(threadImpl)operator(.)ident(join)operator(()ident(timeToWait)operator(\))operator(;) keyword(if) operator(()operator(!)ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) keyword(break)operator(;) operator(}) keyword(if) operator(()pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\)) operator(-) ident(start) operator(>) ident(timeoutMillis)operator(\)) operator({) keyword(break)operator(;) operator(}) operator(}) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(ie)operator(\)) operator({) ident(ie)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) keyword(assert) pre_constant(false) operator(:) ident(ie)operator(;) operator(}) keyword(catch) operator(()exception(ExecutionException) ident(ie)operator(\)) operator({) ident(ie)operator(.)ident(printStackTrace)operator(()operator(\))operator(;) keyword(assert) pre_constant(false) operator(:) ident(ie)operator(;) operator(}) keyword(if) operator(()ident(exitingException) operator(!=) pre_constant(null)operator(\)) operator({) keyword(throw) ident(exitingException)operator(;) operator(}) keyword(if) operator(()ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) local_variable(this)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(value)operator(()operator(\)) operator({) ident(join)operator(()keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(\))operator(;) directive(synchronized) operator(()local_variable(this)operator(\)) operator({) keyword(return) ident(finalResult)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(group)operator(()operator(\)) operator({) keyword(if) operator(()ident(threadGroup) operator(==) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(threadGroup)operator(;) operator(}) type(void) ident(setThreadGroup)operator(()ident(RubyThreadGroup) ident(rubyThreadGroup)operator(\)) operator({) ident(threadGroup) operator(=) ident(rubyThreadGroup)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(inspect)operator(()operator(\)) operator({) comment(// FIXME: There's some code duplication here with RubyObject#inspect) pre_type(StringBuilder) ident(part) operator(=) keyword(new) pre_type(StringBuilder)operator(()operator(\))operator(;) pre_type(String) ident(cname) operator(=) ident(getMetaClass)operator(()operator(\))operator(.)ident(getRealClass)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(;) ident(part)operator(.)ident(append)operator(()stringoperator(\))operator(.)ident(append)operator(()ident(cname)operator(\))operator(.)ident(append)operator(()stringoperator(\))operator(;) ident(part)operator(.)ident(append)operator(()pre_type(Integer)operator(.)ident(toHexString)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()local_variable(this)operator(\))operator(\))operator(\))operator(;) keyword(if) operator(()ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(isStopped)operator(\)) operator({) ident(part)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(killed)operator(\)) operator({) ident(part)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(part)operator(.)ident(append)operator(()ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) ident(part)operator(.)ident(append)operator(()stringoperator(\))operator(;) operator(}) ident(part)operator(.)ident(append)operator(()string)delimiter(")>operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(part)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyBoolean) ident(key_p)operator(()ident(IRubyObject) ident(key)operator(\)) operator({) ident(key) operator(=) ident(getSymbolKey)operator(()ident(key)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(getThreadLocals)operator(()operator(\))operator(.)ident(containsKey)operator(()ident(key)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyArray) ident(keys)operator(()operator(\)) operator({) ident(IRubyObject)type([]) ident(keys) operator(=) keyword(new) ident(IRubyObject)operator([)ident(getThreadLocals)operator(()operator(\))operator(.)ident(size)operator(()operator(\))operator(])operator(;) keyword(return) ident(RubyArray)operator(.)ident(newArrayNoCopy)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getThreadLocals)operator(()operator(\))operator(.)ident(keySet)operator(()operator(\))operator(.)ident(toArray)operator(()ident(keys)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(critical_set)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject) ident(value)operator(\)) operator({) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(setCritical)operator(()ident(value)operator(.)ident(isTrue)operator(()operator(\))operator(\))operator(;) keyword(return) ident(value)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(critical)operator(()ident(IRubyObject) ident(receiver)operator(\)) operator({) keyword(return) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getCritical)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(stop)operator(()ident(IRubyObject) ident(receiver)operator(\)) operator({) ident(RubyThread) ident(rubyThread) operator(=) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) pre_type(Object) ident(stopLock) operator(=) ident(rubyThread)operator(.)ident(stopLock)operator(;) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(rubyThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) keyword(try) operator({) ident(rubyThread)operator(.)ident(isStopped) operator(=) pre_constant(true)operator(;) comment(// attempt to decriticalize all if we're the critical thread) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(setCritical)operator(()pre_constant(false)operator(\))operator(;) ident(stopLock)operator(.)ident(wait)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(ie)operator(\)) operator({) ident(rubyThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) operator(}) ident(rubyThread)operator(.)ident(isStopped) operator(=) pre_constant(false)operator(;) operator(}) keyword(return) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(kill)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(IRubyObject) ident(rubyThread)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(rubyThread) keyword(instanceof) ident(RubyThread)operator(\))operator(\)) keyword(throw) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(rubyThread)operator(,) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(\))operator(;) keyword(return) operator(()operator(()ident(RubyThread)operator(\))ident(rubyThread)operator(\))operator(.)ident(kill)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(s_exit)operator(()ident(IRubyObject) ident(receiver)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyThread) ident(rubyThread) operator(=) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) ident(rubyThread)operator(.)ident(killed) operator(=) pre_constant(true)operator(;) comment(// attempt to decriticalize all if we're the critical thread) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(setCritical)operator(()pre_constant(false)operator(\))operator(;) keyword(throw) keyword(new) ident(ThreadKill)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyBoolean) ident(stop_p)operator(()operator(\)) operator({) comment(// not valid for "dead" state) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(isStopped)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyThread) ident(wakeup)operator(()operator(\)) operator({) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(stopLock)operator(.)ident(notifyAll)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFixnum) ident(priority)operator(()operator(\)) operator({) keyword(return) ident(priority)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(priority_set)operator(()ident(IRubyObject) ident(priority)operator(\)) operator({) comment(// FIXME: This should probably do some translation from Ruby priority levels to Java priority levels (until we have green threads\)) type(int) ident(iPriority) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(priority)operator(\))operator(;) keyword(if) operator(()ident(iPriority) operator(<) pre_type(Thread)operator(.)ident(MIN_PRIORITY)operator(\)) operator({) ident(iPriority) operator(=) pre_type(Thread)operator(.)ident(MIN_PRIORITY)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(iPriority) operator(>) pre_type(Thread)operator(.)ident(MAX_PRIORITY)operator(\)) operator({) ident(iPriority) operator(=) pre_type(Thread)operator(.)ident(MAX_PRIORITY)operator(;) operator(}) local_variable(this)operator(.)ident(priority) operator(=) ident(RubyFixnum)operator(.)ident(newFixnum)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(iPriority)operator(\))operator(;) keyword(if) operator(()ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) ident(threadImpl)operator(.)ident(setPriority)operator(()ident(iPriority)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(.)ident(priority)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(raise)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(ensureNotCurrent)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(RubyThread) ident(currentThread) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) keyword(try) operator({) keyword(while) operator(()operator(!)operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(tryLock)operator(()operator(\)) operator(&&) local_variable(this)operator(.)ident(lock)operator(.)ident(tryLock)operator(()operator(\))operator(\))operator(\)) operator({) keyword(if) operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) ident(currentThread)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) ident(currentThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(receivedException) operator(=) ident(prepareRaiseException)operator(()ident(runtime)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) comment(// If the target thread is sleeping or stopped, wake it) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(stopLock)operator(.)ident(notify)operator(()operator(\))operator(;) operator(}) comment(// interrupt the target thread in case it's blocking or waiting) comment(// WARNING: We no longer interrupt the target thread, since this usually means) comment(// interrupting IO and with NIO that means the channel is no longer usable.) comment(// We either need a new way to handle waking a target thread that's waiting) comment(// on IO, or we need to accept that we can't wake such threads and must wait) comment(// for them to complete their operation.) comment(//threadImpl.interrupt(\);) comment(// new interrupt, to hopefully wake it out of any blocking IO) local_variable(this)operator(.)ident(interrupt)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(if) operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) ident(currentThread)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) local_variable(this)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(private) ident(IRubyObject) ident(prepareRaiseException)operator(()ident(Ruby) ident(runtime)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(0)operator(\)) operator({) ident(IRubyObject) ident(lastException) operator(=) ident(runtime)operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if)operator(()ident(lastException)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(return) keyword(new) ident(RaiseException)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getRuntimeError)operator(()operator(\))operator(,) stringoperator(,) pre_constant(false)operator(\))operator(.)ident(getException)operator(()operator(\))operator(;) operator(}) keyword(return) ident(lastException)operator(;) operator(}) ident(IRubyObject) ident(exception)operator(;) ident(ThreadContext) ident(context) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) keyword(if)operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getRuntimeError)operator(()operator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) ident(args)operator(,) ident(block)operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(.)ident(getException)operator(()operator(\))operator(;) operator(}) ident(exception) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(.)ident(getException)operator(()operator(\))operator(;) operator(}) ident(exception) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(if) operator(()operator(!)ident(runtime)operator(.)ident(getException)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(exception)operator(\))operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(.)ident(getException)operator(()operator(\))operator(;) operator(}) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(3)operator(\)) operator({) operator(()operator(()ident(RubyException)operator(\)) ident(exception)operator(\))operator(.)ident(set_backtrace)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) operator(}) keyword(return) ident(exception)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(run)operator(()operator(\)) operator({) comment(// if stopped, unstop) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) keyword(if) operator(()ident(isStopped)operator(\)) operator({) ident(isStopped) operator(=) pre_constant(false)operator(;) ident(stopLock)operator(.)ident(notifyAll)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) local_variable(this)operator(;) operator(}) directive(public) type(void) ident(sleep)operator(()type(long) ident(millis)operator(\)) directive(throws) exception(InterruptedException) operator({) keyword(assert) local_variable(this) operator(==) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(pollThreadEvents)operator(()operator(\))operator(;) keyword(try) operator({) ident(isStopped) operator(=) pre_constant(true)operator(;) ident(stopLock)operator(.)ident(wait)operator(()ident(millis)operator(\))operator(;) operator(}) keyword(finally) operator({) ident(isStopped) operator(=) pre_constant(false)operator(;) ident(pollThreadEvents)operator(()operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(status)operator(()operator(\)) operator({) keyword(if) operator(()ident(threadImpl)operator(.)ident(isAlive)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()ident(isStopped) operator(||) ident(currentSelector) operator(!=) pre_constant(null) operator(&&) ident(currentSelector)operator(.)ident(isOpen)operator(()operator(\))operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(killed)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(exitingException) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(kill)operator(()operator(\)) operator({) comment(// need to reexamine this) ident(RubyThread) ident(currentThread) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(;) comment(// If the killee thread is the same as the killer thread, just die) keyword(if) operator(()ident(currentThread) operator(==) local_variable(this)operator(\)) ident(throwThreadKill)operator(()operator(\))operator(;) keyword(try) operator({) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\)) operator(+) stringoperator(\))operator(;) keyword(while) operator(()operator(!)operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(tryLock)operator(()operator(\)) operator(&&) local_variable(this)operator(.)ident(lock)operator(.)ident(tryLock)operator(()operator(\))operator(\))operator(\)) operator({) keyword(if) operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) ident(currentThread)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) ident(currentThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) keyword(if) operator(()ident(DEBUG)operator(\)) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\)) operator(+) stringoperator(\))operator(;) ident(killed) operator(=) pre_constant(true)operator(;) comment(// If the target thread is sleeping or stopped, wake it) directive(synchronized) operator(()ident(stopLock)operator(\)) operator({) ident(stopLock)operator(.)ident(notify)operator(()operator(\))operator(;) operator(}) comment(// interrupt the target thread in case it's blocking or waiting) comment(// WARNING: We no longer interrupt the target thread, since this usually means) comment(// interrupting IO and with NIO that means the channel is no longer usable.) comment(// We either need a new way to handle waking a target thread that's waiting) comment(// on IO, or we need to accept that we can't wake such threads and must wait) comment(// for them to complete their operation.) comment(//threadImpl.interrupt(\);) comment(// new interrupt, to hopefully wake it out of any blocking IO) local_variable(this)operator(.)ident(interrupt)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(if) operator(()ident(currentThread)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) ident(currentThread)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) keyword(if) operator(()local_variable(this)operator(.)ident(lock)operator(.)ident(isHeldByCurrentThread)operator(()operator(\))operator(\)) local_variable(this)operator(.)ident(lock)operator(.)ident(unlock)operator(()operator(\))operator(;) operator(}) keyword(try) operator({) ident(threadImpl)operator(.)ident(join)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(InterruptedException) ident(ie)operator(\)) operator({) comment(// we were interrupted, check thread events again) ident(currentThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(ExecutionException) ident(ie)operator(\)) operator({) comment(// we were interrupted, check thread events again) ident(currentThread)operator(.)ident(pollThreadEvents)operator(()operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(IRubyObject) ident(kill_bang)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(safe_level)operator(()operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newNotImplementedError)operator(()stringoperator(\))operator(;) operator(}) directive(private) type(boolean) ident(isCurrent)operator(()operator(\)) operator({) keyword(return) ident(threadImpl)operator(.)ident(isCurrent)operator(()operator(\))operator(;) operator(}) directive(public) type(void) ident(exceptionRaised)operator(()ident(RaiseException) ident(exception)operator(\)) operator({) keyword(assert) ident(isCurrent)operator(()operator(\))operator(;) ident(RubyException) ident(rubyException) operator(=) ident(exception)operator(.)ident(getException)operator(()operator(\))operator(;) ident(Ruby) ident(runtime) operator(=) ident(rubyException)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if) operator(()ident(runtime)operator(.)ident(getSystemExit)operator(()operator(\))operator(.)ident(isInstance)operator(()ident(rubyException)operator(\))operator(\)) operator({) ident(threadService)operator(.)ident(getMainThread)operator(()operator(\))operator(.)ident(raise)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(rubyException)operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(abortOnException)operator(()ident(runtime)operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(printError)operator(()ident(rubyException)operator(\))operator(;) ident(RubyException) ident(systemExit) operator(=) ident(RubySystemExit)operator(.)ident(newInstance)operator(()ident(runtime)operator(,) integer(1)operator(\))operator(;) ident(systemExit)operator(.)ident(message) operator(=) ident(rubyException)operator(.)ident(message)operator(;) ident(systemExit)operator(.)ident(set_backtrace)operator(()ident(rubyException)operator(.)ident(backtrace)operator(()operator(\))operator(\))operator(;) ident(threadService)operator(.)ident(getMainThread)operator(()operator(\))operator(.)ident(raise)operator(()keyword(new) ident(IRubyObject)type([]) operator({)ident(systemExit)operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(runtime)operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(runtime)operator(.)ident(printError)operator(()ident(exception)operator(.)ident(getException)operator(()operator(\))operator(\))operator(;) operator(}) ident(exitingException) operator(=) ident(exception)operator(;) operator(}) directive(private) type(boolean) ident(abortOnException)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) keyword(return) operator(()ident(runtime)operator(.)ident(isGlobalAbortOnExceptionEnabled)operator(()operator(\)) operator(||) ident(abortOnException)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyThread) ident(mainThread)operator(()ident(IRubyObject) ident(receiver)operator(\)) operator({) keyword(return) ident(receiver)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getThreadService)operator(()operator(\))operator(.)ident(getMainThread)operator(()operator(\))operator(;) operator(}) directive(private) pre_type(Selector) ident(currentSelector)operator(;) annotation(@Deprecated) directive(public) type(boolean) ident(selectForAccept)operator(()ident(RubyIO) ident(io)operator(\)) operator({) keyword(return) ident(select)operator(()ident(io)operator(,) pre_type(SelectionKey)operator(.)ident(OP_ACCEPT)operator(\))operator(;) operator(}) directive(public) type(boolean) ident(select)operator(()ident(RubyIO) ident(io)operator(,) type(int) ident(ops)operator(\)) operator({) pre_type(Channel) ident(channel) operator(=) ident(io)operator(.)ident(getChannel)operator(()operator(\))operator(;) keyword(if) operator(()ident(channel) keyword(instanceof) pre_type(SelectableChannel)operator(\)) operator({) pre_type(SelectableChannel) ident(selectable) operator(=) operator(()pre_type(SelectableChannel)operator(\))ident(channel)operator(;) directive(synchronized) operator(()ident(selectable)operator(.)ident(blockingLock)operator(()operator(\))operator(\)) operator({) type(boolean) ident(oldBlocking) operator(=) ident(selectable)operator(.)ident(isBlocking)operator(()operator(\))operator(;) keyword(try) operator({) ident(selectable)operator(.)ident(configureBlocking)operator(()pre_constant(false)operator(\))operator(;) ident(io)operator(.)ident(addBlockingThread)operator(()local_variable(this)operator(\))operator(;) ident(currentSelector) operator(=) ident(selectable)operator(.)ident(provider)operator(()operator(\))operator(.)ident(openSelector)operator(()operator(\))operator(;) pre_type(SelectionKey) ident(key) operator(=) ident(selectable)operator(.)ident(register)operator(()ident(currentSelector)operator(,) ident(ops)operator(\))operator(;) type(int) ident(result) operator(=) ident(currentSelector)operator(.)ident(select)operator(()operator(\))operator(;) comment(// check for thread events, in case we've been woken up to die) ident(pollThreadEvents)operator(()operator(\))operator(;) keyword(if) operator(()ident(result) operator(==) integer(1)operator(\)) operator({) pre_type(Set)operator(<)pre_type(SelectionKey)operator(>) ident(keySet) operator(=) ident(currentSelector)operator(.)ident(selectedKeys)operator(()operator(\))operator(;) keyword(if) operator(()ident(keySet)operator(.)ident(iterator)operator(()operator(\))operator(.)ident(next)operator(()operator(\)) operator(==) ident(key)operator(\)) operator({) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) keyword(return) pre_constant(false)operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(throw) ident(io)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(()string operator(+) ident(ioe)operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(if) operator(()ident(currentSelector) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) ident(currentSelector)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) keyword(throw) ident(io)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newRuntimeError)operator(()stringoperator(\))operator(;) operator(}) operator(}) ident(currentSelector) operator(=) pre_constant(null)operator(;) ident(io)operator(.)ident(removeBlockingThread)operator(()local_variable(this)operator(\))operator(;) keyword(try) operator({) ident(selectable)operator(.)ident(configureBlocking)operator(()ident(oldBlocking)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(ioe)operator(\)) operator({) comment(// ignore; I don't like doing it, but it seems like we) comment(// really just need to make all channels non-blocking by) comment(// default and use select when implementing blocking ops,) comment(// so if this remains set non-blocking, perhaps it's not) comment(// such a big deal...) operator(}) operator(}) operator(}) operator(}) keyword(else) operator({) comment(// can't select, just have to do a blocking call) keyword(return) pre_constant(true)operator(;) operator(}) operator(}) directive(public) type(void) ident(interrupt)operator(()operator(\)) operator({) keyword(if) operator(()ident(currentSelector) operator(!=) pre_constant(null)operator(\)) operator({) ident(currentSelector)operator(.)ident(wakeup)operator(()operator(\))operator(;) operator(}) operator(}) directive(public) type(void) ident(beforeBlockingCall)operator(()operator(\)) operator({) ident(isStopped) operator(=) pre_constant(true)operator(;) operator(}) directive(public) type(void) ident(afterBlockingCall)operator(()operator(\)) operator({) ident(isStopped) operator(=) pre_constant(false)operator(;) operator(}) directive(private) type(void) ident(receivedAnException)operator(()ident(ThreadContext) ident(context)operator(\)) operator({) comment(// clear this so we don't keep re-throwing) ident(IRubyObject) ident(raiseException) operator(=) ident(receivedException)operator(;) ident(receivedException) operator(=) pre_constant(null)operator(;) ident(RubyModule) ident(kernelModule) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getKernel)operator(()operator(\))operator(;) keyword(if) operator(()ident(DEBUG)operator(\)) operator({) pre_type(System)operator(.)ident(out)operator(.)ident(println)operator(()string operator(+) pre_type(Thread)operator(.)ident(currentThread)operator(()operator(\)) operator(+) string operator(+) ident(killed)operator(\))operator(;) operator(}) ident(kernelModule)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(raiseException)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Jan Arne Petersen * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * Implementation of Ruby's ThreadGroup class. This is currently * just a stub. *

* * @author Charles O Nutter (headius@headius.com\) */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyThreadGroup) directive(extends) ident(RubyObject) operator({) directive(private) pre_type(Map)operator(<)pre_type(Integer)operator(,) ident(IRubyObject)operator(>) ident(rubyThreadList) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(Integer)operator(,) ident(IRubyObject)operator(>)operator(()operator(\))operator(;) directive(private) type(boolean) ident(enclosed) operator(=) pre_constant(false)operator(;) comment(// ENEBO: Can these be fast?) directive(public) directive(static) ident(RubyClass) ident(createThreadGroupClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(threadGroupClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setThreadGroup)operator(()ident(threadGroupClass)operator(\))operator(;) ident(threadGroupClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyThreadGroup)operator(.)ident(class)operator(\))operator(;) comment(// create the default thread group) ident(RubyThreadGroup) ident(defaultThreadGroup) operator(=) keyword(new) ident(RubyThreadGroup)operator(()ident(runtime)operator(,) ident(threadGroupClass)operator(\))operator(;) ident(runtime)operator(.)ident(setDefaultThreadGroup)operator(()ident(defaultThreadGroup)operator(\))operator(;) ident(threadGroupClass)operator(.)ident(defineConstant)operator(()stringoperator(,) ident(defaultThreadGroup)operator(\))operator(;) keyword(return) ident(threadGroupClass)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) keyword(new) ident(RubyThreadGroup)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,) operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(synchronized) ident(IRubyObject) ident(add)operator(()ident(IRubyObject) ident(rubyThread)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(rubyThread) keyword(instanceof) ident(RubyThread)operator(\))operator(\)) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()ident(rubyThread)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(getThread)operator(()operator(\))operator(\))operator(;) comment(// synchronize on the RubyThread for threadgroup updates) keyword(if) operator(()ident(isFrozen)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyThread) ident(thread) operator(=) operator(()ident(RubyThread)operator(\))ident(rubyThread)operator(;) comment(// we only add live threads) keyword(if) operator(()ident(thread)operator(.)ident(alive_p)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(addDirectly)operator(()ident(thread)operator(\))operator(;) operator(}) keyword(return) local_variable(this)operator(;) operator(}) type(void) ident(addDirectly)operator(()ident(RubyThread) ident(rubyThread)operator(\)) operator({) directive(synchronized) operator(()ident(rubyThread)operator(\)) operator({) ident(IRubyObject) ident(oldGroup) operator(=) ident(rubyThread)operator(.)ident(group)operator(()operator(\))operator(;) keyword(if) operator(()ident(oldGroup) operator(!=) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(\)) operator({) ident(RubyThreadGroup) ident(threadGroup) operator(=) operator(()ident(RubyThreadGroup)operator(\)) ident(oldGroup)operator(;) ident(threadGroup)operator(.)ident(rubyThreadList)operator(.)ident(remove)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()ident(rubyThread)operator(\))operator(\))operator(;) operator(}) ident(rubyThread)operator(.)ident(setThreadGroup)operator(()local_variable(this)operator(\))operator(;) ident(rubyThreadList)operator(.)ident(put)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()ident(rubyThread)operator(\))operator(,) ident(rubyThread)operator(\))operator(;) operator(}) operator(}) directive(public) directive(synchronized) type(void) ident(remove)operator(()ident(RubyThread) ident(rubyThread)operator(\)) operator({) ident(rubyThread)operator(.)ident(setThreadGroup)operator(()pre_constant(null)operator(\))operator(;) ident(rubyThreadList)operator(.)ident(remove)operator(()pre_type(System)operator(.)ident(identityHashCode)operator(()ident(rubyThread)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(enclose)operator(()ident(Block) ident(block)operator(\)) operator({) ident(enclosed) operator(=) pre_constant(true)operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(enclosed_p)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(return) keyword(new) ident(RubyBoolean)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(enclosed)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) directive(synchronized) ident(IRubyObject) ident(list)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()operator(()ident(IRubyObject)type([])operator(\)) ident(rubyThreadList)operator(.)ident(values)operator(()operator(\))operator(.)ident(toArray)operator(()keyword(new) ident(IRubyObject)operator([)ident(rubyThreadList)operator(.)ident(size)operator(()operator(\))operator(])operator(\))operator(\))operator(;) operator(}) directive(private) ident(RubyThreadGroup)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2001 Chad Fowler * Copyright (C\) 2001-2004 Jan Arne Petersen * Copyright (C\) 2002 Benoit Cerrina * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Joey Gibson * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * Copyright (C\) 2006 Thomas E Enebo * Copyright (C\) 2006 Ola Bini * Copyright (C\) 2006 Miguel Covarrubias * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.lang.ref.SoftReference)operator(;) keyword(import) include(java.util.Date)operator(;) keyword(import) include(java.util.HashMap)operator(;) keyword(import) include(java.util.Locale)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.TimeZone)operator(;) keyword(import) include(java.util.regex.Matcher)operator(;) keyword(import) include(java.util.regex.Pattern)operator(;) keyword(import) include(org.joda.time.DateTime)operator(;) keyword(import) include(org.joda.time.DateTimeZone)operator(;) keyword(import) include(org.joda.time.format.DateTimeFormat)operator(;) keyword(import) include(org.joda.time.format.DateTimeFormatter)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ClassIndex)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) keyword(import) include(org.jruby.util.RubyDateFormat)operator(;) comment(/** The Time class. * * @author chadfowler, jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) type(class) class(RubyTime) directive(extends) ident(RubyObject) operator({) directive(public) directive(static) directive(final) pre_type(String) ident(UTC) operator(=) stringoperator(;) directive(private) ident(DateTime) ident(dt)operator(;) directive(private) type(long) ident(usec)operator(;) directive(private) directive(final) directive(static) ident(DateTimeFormatter) ident(ONE_DAY_CTIME_FORMATTER) operator(=) ident(DateTimeFormat)operator(.)ident(forPattern)operator(()stringoperator(\))operator(.)ident(withLocale)operator(()pre_type(Locale)operator(.)ident(ENGLISH)operator(\))operator(;) directive(private) directive(final) directive(static) ident(DateTimeFormatter) ident(TWO_DAY_CTIME_FORMATTER) operator(=) ident(DateTimeFormat)operator(.)ident(forPattern)operator(()stringoperator(\))operator(.)ident(withLocale)operator(()pre_type(Locale)operator(.)ident(ENGLISH)operator(\))operator(;) directive(private) directive(final) directive(static) ident(DateTimeFormatter) ident(TO_S_FORMATTER) operator(=) ident(DateTimeFormat)operator(.)ident(forPattern)operator(()stringoperator(\))operator(.)ident(withLocale)operator(()pre_type(Locale)operator(.)ident(ENGLISH)operator(\))operator(;) directive(private) directive(final) directive(static) ident(DateTimeFormatter) ident(TO_S_UTC_FORMATTER) operator(=) ident(DateTimeFormat)operator(.)ident(forPattern)operator(()stringoperator(\))operator(.)ident(withLocale)operator(()pre_type(Locale)operator(.)ident(ENGLISH)operator(\))operator(;) comment(// There are two different popular TZ formats: legacy (AST+3:00:00, GMT-3\), and) comment(// newer one (US/Pacific, America/Los_Angeles\). This pattern is to detect) comment(// the legacy TZ format in order to convert it to the newer format) comment(// understood by Java API.) directive(private) directive(static) directive(final) pre_type(Pattern) ident(TZ_PATTERN) operator(=) pre_type(Pattern)operator(.)ident(compile)operator(()stringoperator(\))operator(;) directive(private) directive(static) directive(final) ident(ByteList) ident(TZ_STRING) operator(=) ident(ByteList)operator(.)ident(create)operator(()stringoperator(\))operator(;) directive(public) directive(static) ident(DateTimeZone) ident(getLocalTimeZone)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyString) ident(tzVar) operator(=) ident(runtime)operator(.)ident(newString)operator(()ident(TZ_STRING)operator(\))operator(;) ident(RubyHash) ident(h) operator(=) operator(()operator(()ident(RubyHash)operator(\))ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(\))operator(;) ident(IRubyObject) ident(tz) operator(=) ident(h)operator(.)ident(op_aref)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(tzVar)operator(\))operator(;) keyword(if) operator(()ident(tz) operator(==) pre_constant(null) operator(||) operator(!) operator(()ident(tz) keyword(instanceof) ident(RubyString)operator(\))operator(\)) operator({) keyword(return) ident(DateTimeZone)operator(.)ident(getDefault)operator(()operator(\))operator(;) operator(}) keyword(else) operator({) pre_type(String) ident(zone) operator(=) ident(tz)operator(.)ident(toString)operator(()operator(\))operator(;) ident(DateTimeZone) ident(cachedZone) operator(=) ident(runtime)operator(.)ident(getLocalTimezoneCache)operator(()operator(\))operator(.)ident(get)operator(()ident(zone)operator(\))operator(;) keyword(if) operator(()ident(cachedZone) operator(!=) pre_constant(null)operator(\)) keyword(return) ident(cachedZone)operator(;) pre_type(String) ident(originalZone) operator(=) ident(zone)operator(;) comment(// Value of "TZ" property is of a bit different format,) comment(// which confuses the Java's TimeZone.getTimeZone(id\) method,) comment(// and so, we need to convert it.) pre_type(Matcher) ident(tzMatcher) operator(=) ident(TZ_PATTERN)operator(.)ident(matcher)operator(()ident(zone)operator(\))operator(;) keyword(if) operator(()ident(tzMatcher)operator(.)ident(matches)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(sign) operator(=) ident(tzMatcher)operator(.)ident(group)operator(()integer(2)operator(\))operator(;) pre_type(String) ident(hours) operator(=) ident(tzMatcher)operator(.)ident(group)operator(()integer(3)operator(\))operator(;) pre_type(String) ident(minutes) operator(=) ident(tzMatcher)operator(.)ident(group)operator(()integer(4)operator(\))operator(;) comment(// GMT+00:00 --> Etc/GMT, see "MRI behavior") comment(// comment below.) keyword(if) operator(()operator(()stringoperator(.)ident(equals)operator(()ident(hours)operator(\)) operator(||) stringoperator(.)ident(equals)operator(()ident(hours)operator(\))operator(\)) operator(&&) operator(()ident(minutes) operator(==) pre_constant(null) operator(||) stringoperator(.)ident(equals)operator(()ident(minutes)operator(\)) operator(||) stringoperator(.)ident(equals)operator(()ident(minutes)operator(\))operator(\))operator(\)) operator({) ident(zone) operator(=) stringoperator(;) operator(}) keyword(else) operator({) comment(// Invert the sign, since TZ format and Java format) comment(// use opposite signs, sigh... Also, Java API requires) comment(// the sign to be always present, be it "+" or "-".) ident(sign) operator(=) operator(()stringoperator(.)ident(equals)operator(()ident(sign)operator(\))operator(?) string operator(:) stringoperator(\))operator(;) comment(// Always use "GMT" since that's required by Java API.) ident(zone) operator(=) string operator(+) ident(sign) operator(+) ident(hours)operator(;) keyword(if) operator(()ident(minutes) operator(!=) pre_constant(null)operator(\)) operator({) ident(zone) operator(+=) ident(minutes)operator(;) operator(}) operator(}) operator(}) comment(// MRI behavior: With TZ equal to "GMT" or "UTC", Time.now) comment(// is *NOT* considered as a proper GMT/UTC time:) comment(// ENV['TZ']="GMT") comment(// Time.now.gmt? ==> false) comment(// ENV['TZ']="UTC") comment(// Time.now.utc? ==> false) comment(// Hence, we need to adjust for that.) keyword(if) operator(()stringoperator(.)ident(equalsIgnoreCase)operator(()ident(zone)operator(\)) operator(||) stringoperator(.)ident(equalsIgnoreCase)operator(()ident(zone)operator(\))operator(\)) operator({) ident(zone) operator(=) string operator(+) ident(zone)operator(;) operator(}) ident(DateTimeZone) ident(dtz) operator(=) ident(DateTimeZone)operator(.)ident(forTimeZone)operator(()pre_type(TimeZone)operator(.)ident(getTimeZone)operator(()ident(zone)operator(\))operator(\))operator(;) ident(runtime)operator(.)ident(getLocalTimezoneCache)operator(()operator(\))operator(.)ident(put)operator(()ident(originalZone)operator(,) ident(dtz)operator(\))operator(;) keyword(return) ident(dtz)operator(;) operator(}) operator(}) directive(public) ident(RubyTime)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) operator(}) directive(public) ident(RubyTime)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(rubyClass)operator(,) ident(DateTime) ident(dt)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(rubyClass)operator(\))operator(;) local_variable(this)operator(.)ident(dt) operator(=) ident(dt)operator(;) operator(}) comment(// We assume that these two time instances) comment(// occurred at the same time.) directive(private) directive(static) directive(final) type(long) ident(BASE_TIME_MILLIS) operator(=) pre_type(System)operator(.)ident(currentTimeMillis)operator(()operator(\))operator(;) directive(private) directive(static) directive(final) type(long) ident(BASE_TIME_NANOS) operator(=) pre_type(System)operator(.)ident(nanoTime)operator(()operator(\))operator(;) directive(private) directive(static) ident(ObjectAllocator) ident(TIME_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) type(long) ident(usecsPassed) operator(=) operator(()pre_type(System)operator(.)ident(nanoTime)operator(()operator(\)) operator(-) ident(BASE_TIME_NANOS)operator(\)) operator(/) integer(1000L)operator(;) type(long) ident(millisTime) operator(=) ident(BASE_TIME_MILLIS) operator(+) ident(usecsPassed) operator(/) integer(1000L)operator(;) type(long) ident(usecs) operator(=) ident(usecsPassed) operator(%) integer(1000L)operator(;) ident(DateTimeZone) ident(dtz) operator(=) ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(;) ident(DateTime) ident(dt) operator(=) keyword(new) ident(DateTime)operator(()ident(millisTime)operator(,) ident(dtz)operator(\))operator(;) ident(RubyTime) ident(rt) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) ident(klass)operator(,) ident(dt)operator(\))operator(;) ident(rt)operator(.)ident(setUSec)operator(()ident(usecs)operator(\))operator(;) keyword(return) ident(rt)operator(;) operator(}) operator(})operator(;) directive(public) directive(static) ident(RubyClass) ident(createTimeClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyClass) ident(timeClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(TIME_ALLOCATOR)operator(\))operator(;) ident(timeClass)operator(.)ident(index) operator(=) ident(ClassIndex)operator(.)ident(TIME)operator(;) ident(runtime)operator(.)ident(setTime)operator(()ident(timeClass)operator(\))operator(;) ident(timeClass)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getComparable)operator(()operator(\))operator(\))operator(;) ident(timeClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyTime)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(timeClass)operator(;) operator(}) directive(public) type(void) ident(setUSec)operator(()type(long) ident(usec)operator(\)) operator({) local_variable(this)operator(.)ident(usec) operator(=) ident(usec)operator(;) operator(}) directive(public) type(long) ident(getUSec)operator(()operator(\)) operator({) keyword(return) ident(usec)operator(;) operator(}) directive(public) type(void) ident(updateCal)operator(()ident(DateTime) ident(dt)operator(\)) operator({) local_variable(this)operator(.)ident(dt) operator(=) ident(dt)operator(;) operator(}) directive(protected) type(long) ident(getTimeInMillis)operator(()operator(\)) operator({) keyword(return) ident(dt)operator(.)ident(getMillis)operator(()operator(\))operator(;) comment(// For JDK 1.4 we can use "cal.getTimeInMillis(\)") operator(}) directive(public) directive(static) ident(RubyTime) ident(newTime)operator(()ident(Ruby) ident(runtime)operator(,) type(long) ident(milliseconds)operator(\)) operator({) keyword(return) ident(newTime)operator(()ident(runtime)operator(,) keyword(new) ident(DateTime)operator(()ident(milliseconds)operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyTime) ident(newTime)operator(()ident(Ruby) ident(runtime)operator(,) ident(DateTime) ident(dt)operator(\)) operator({) keyword(return) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getTime)operator(()operator(\))operator(,) ident(dt)operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyTime) ident(newTime)operator(()ident(Ruby) ident(runtime)operator(,) ident(DateTime) ident(dt)operator(,) type(long) ident(usec)operator(\)) operator({) ident(RubyTime) ident(t) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getTime)operator(()operator(\))operator(,) ident(dt)operator(\))operator(;) ident(t)operator(.)ident(setUSec)operator(()ident(usec)operator(\))operator(;) keyword(return) ident(t)operator(;) operator(}) annotation(@Override) directive(public) pre_type(Class)operator(<)operator(?)operator(>) ident(getJavaClass)operator(()operator(\)) operator({) keyword(return) pre_type(Date)operator(.)ident(class)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(initialize_copy)operator(()ident(IRubyObject) ident(original)operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(original) keyword(instanceof) ident(RubyTime)operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyTime) ident(originalTime) operator(=) operator(()ident(RubyTime)operator(\)) ident(original)operator(;) comment(// We can just use dt, since it is immutable) ident(dt) operator(=) ident(originalTime)operator(.)ident(dt)operator(;) ident(usec) operator(=) ident(originalTime)operator(.)ident(usec)operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyTime) ident(succ)operator(()operator(\)) operator({) keyword(return) ident(newTime)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(dt)operator(.)ident(plusSeconds)operator(()integer(1)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyTime) ident(gmtime)operator(()operator(\)) operator({) ident(dt) operator(=) ident(dt)operator(.)ident(withZone)operator(()ident(DateTimeZone)operator(.)ident(UTC)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyTime) ident(localtime)operator(()operator(\)) operator({) ident(dt) operator(=) ident(dt)operator(.)ident(withZone)operator(()ident(getLocalTimeZone)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(gmt)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(.)ident(getID)operator(()operator(\))operator(.)ident(equals)operator(()stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyTime) ident(getgm)operator(()operator(\)) operator({) keyword(return) ident(newTime)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(dt)operator(.)ident(withZone)operator(()ident(DateTimeZone)operator(.)ident(UTC)operator(\))operator(,) ident(getUSec)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyTime) ident(getlocal)operator(()operator(\)) operator({) keyword(return) ident(newTime)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(dt)operator(.)ident(withZone)operator(()ident(getLocalTimeZone)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(,) ident(getUSec)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(RubyString) ident(strftime)operator(()ident(IRubyObject) ident(format)operator(\)) operator({) directive(final) ident(RubyDateFormat) ident(rubyDateFormat) operator(=) keyword(new) ident(RubyDateFormat)operator(()stringoperator(,) pre_type(Locale)operator(.)ident(US)operator(\))operator(;) ident(rubyDateFormat)operator(.)ident(applyPattern)operator(()ident(format)operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(rubyDateFormat)operator(.)ident(setDateTime)operator(()ident(dt)operator(\))operator(;) pre_type(String) ident(result) operator(=) ident(rubyDateFormat)operator(.)ident(format)operator(()pre_constant(null)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string=)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_ge)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(cmp)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\)) operator(>=) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_ge)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_gt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(cmp)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\)) operator(>) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_gt)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_le)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(cmp)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\)) operator(<=) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_le)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_lt)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()ident(cmp)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\)) operator(<) integer(0)operator(\))operator(;) operator(}) keyword(return) ident(RubyComparable)operator(.)ident(op_lt)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(other)operator(\))operator(;) operator(}) directive(private) type(int) ident(cmp)operator(()ident(RubyTime) ident(other)operator(\)) operator({) type(long) ident(millis) operator(=) ident(getTimeInMillis)operator(()operator(\))operator(;) type(long) ident(millis_other) operator(=) ident(other)operator(.)ident(getTimeInMillis)operator(()operator(\))operator(;) type(long) ident(usec_other) operator(=) ident(other)operator(.)ident(usec)operator(;) keyword(if) operator(()ident(millis) operator(>) ident(millis_other) operator(||) operator(()ident(millis) operator(==) ident(millis_other) operator(&&) ident(usec) operator(>) ident(usec_other)operator(\))operator(\)) operator({) keyword(return) integer(1)operator(;) operator(}) keyword(else) keyword(if) operator(()ident(millis) operator(<) ident(millis_other) operator(||) operator(()ident(millis) operator(==) ident(millis_other) operator(&&) ident(usec) operator(<) ident(usec_other)operator(\))operator(\)) operator({) keyword(return) operator(-)integer(1)operator(;) operator(}) keyword(return) integer(0)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_plus)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) type(long) ident(time) operator(=) ident(getTimeInMillis)operator(()operator(\))operator(;) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) type(long) ident(adjustment) operator(=) operator(()type(long)operator(\)) operator(()ident(RubyNumeric)operator(.)ident(num2dbl)operator(()ident(other)operator(\)) operator(*) integer(1000000)operator(\))operator(;) type(int) ident(micro) operator(=) operator(()type(int)operator(\)) operator(()ident(adjustment) operator(%) integer(1000)operator(\))operator(;) ident(adjustment) operator(=) ident(adjustment) operator(/) integer(1000)operator(;) ident(time) operator(+=) ident(adjustment)operator(;) ident(RubyTime) ident(newTime) operator(=) keyword(new) ident(RubyTime)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) ident(newTime)operator(.)ident(dt) operator(=) keyword(new) ident(DateTime)operator(()ident(time)operator(\))operator(.)ident(withZone)operator(()ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(\))operator(;) ident(newTime)operator(.)ident(setUSec)operator(()ident(micro)operator(\))operator(;) keyword(return) ident(newTime)operator(;) operator(}) directive(private) ident(IRubyObject) ident(opMinus)operator(()ident(RubyTime) ident(other)operator(\)) operator({) type(long) ident(time) operator(=) ident(getTimeInMillis)operator(()operator(\)) operator(*) integer(1000) operator(+) ident(getUSec)operator(()operator(\))operator(;) ident(time) operator(-=) ident(other)operator(.)ident(getTimeInMillis)operator(()operator(\)) operator(*) integer(1000) operator(+) ident(other)operator(.)ident(getUSec)operator(()operator(\))operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(time) operator(/) float(1000000.0)operator(\))operator(;) comment(// float number of seconds) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_minus)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) keyword(return) ident(opMinus)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\))operator(;) type(long) ident(time) operator(=) ident(getTimeInMillis)operator(()operator(\))operator(;) type(long) ident(adjustment) operator(=) operator(()type(long)operator(\)) operator(()ident(RubyNumeric)operator(.)ident(num2dbl)operator(()ident(other)operator(\)) operator(*) integer(1000000)operator(\))operator(;) type(int) ident(micro) operator(=) operator(()type(int)operator(\)) operator(()ident(adjustment) operator(%) integer(1000)operator(\))operator(;) ident(adjustment) operator(=) ident(adjustment) operator(/) integer(1000)operator(;) ident(time) operator(-=) ident(adjustment)operator(;) ident(RubyTime) ident(newTime) operator(=) keyword(new) ident(RubyTime)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(getMetaClass)operator(()operator(\))operator(\))operator(;) ident(newTime)operator(.)ident(dt) operator(=) keyword(new) ident(DateTime)operator(()ident(time)operator(\))operator(.)ident(withZone)operator(()ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(\))operator(;) ident(newTime)operator(.)ident(setUSec)operator(()ident(micro)operator(\))operator(;) keyword(return) ident(newTime)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(op_eqq)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(return) operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_SPACESHIP)operator(,) string)delimiter(")>operator(,) ident(other)operator(\))operator(\)) operator(==) integer(0)operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) string)delimiter(")>operator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(op_cmp)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(cmp)operator(()operator(()ident(RubyTime)operator(\)) ident(other)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(eql_p)operator(()ident(IRubyObject) ident(other)operator(\)) operator({) keyword(if) operator(()ident(other) keyword(instanceof) ident(RubyTime)operator(\)) operator({) ident(RubyTime) ident(otherTime) operator(=) operator(()ident(RubyTime)operator(\))ident(other)operator(;) keyword(return) operator(()ident(usec) operator(==) ident(otherTime)operator(.)ident(usec) operator(&&) ident(getTimeInMillis)operator(()operator(\)) operator(==) ident(otherTime)operator(.)ident(getTimeInMillis)operator(()operator(\))operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyString) ident(asctime)operator(()operator(\)) operator({) ident(DateTimeFormatter) ident(simpleDateFormat)operator(;) keyword(if) operator(()ident(dt)operator(.)ident(getDayOfMonth)operator(()operator(\)) operator(<) integer(10)operator(\)) operator({) ident(simpleDateFormat) operator(=) ident(ONE_DAY_CTIME_FORMATTER)operator(;) operator(}) keyword(else) operator({) ident(simpleDateFormat) operator(=) ident(TWO_DAY_CTIME_FORMATTER)operator(;) operator(}) pre_type(String) ident(result) operator(=) ident(simpleDateFormat)operator(.)ident(print)operator(()ident(dt)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_s)operator(()operator(\)) operator({) ident(DateTimeFormatter) ident(simpleDateFormat)operator(;) keyword(if) operator(()ident(dt)operator(.)ident(getZone)operator(()operator(\)) operator(==) ident(DateTimeZone)operator(.)ident(UTC)operator(\)) operator({) ident(simpleDateFormat) operator(=) ident(TO_S_UTC_FORMATTER)operator(;) operator(}) keyword(else) operator({) ident(simpleDateFormat) operator(=) ident(TO_S_FORMATTER)operator(;) operator(}) pre_type(String) ident(result) operator(=) ident(simpleDateFormat)operator(.)ident(print)operator(()ident(dt)operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyArray) ident(to_a)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()keyword(new) ident(IRubyObject)type([]) operator({) ident(sec)operator(()operator(\))operator(,) ident(min)operator(()operator(\))operator(,) ident(hour)operator(()operator(\))operator(,) ident(mday)operator(()operator(\))operator(,) ident(month)operator(()operator(\))operator(,) ident(year)operator(()operator(\))operator(,) ident(wday)operator(()operator(\))operator(,) ident(yday)operator(()operator(\))operator(,) ident(isdst)operator(()operator(\))operator(,) ident(zone)operator(()operator(\)) operator(})operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyFloat) ident(to_f)operator(()operator(\)) operator({) type(long) ident(time) operator(=) ident(getTimeInMillis)operator(()operator(\))operator(;) ident(time) operator(=) ident(time) operator(*) integer(1000) operator(+) ident(usec)operator(;) keyword(return) ident(RubyFloat)operator(.)ident(newFloat)operator(()ident(getRuntime)operator(()operator(\))operator(,) ident(time) operator(/) float(1000000.0)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(to_i)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(getTimeInMillis)operator(()operator(\)) operator(/) integer(1000)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(usec)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getMillisOfSecond)operator(()operator(\)) operator(*) integer(1000) operator(+) ident(getUSec)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) type(void) ident(setMicroseconds)operator(()type(long) ident(mic)operator(\)) operator({) type(long) ident(millis) operator(=) ident(getTimeInMillis)operator(()operator(\)) operator(%) integer(1000)operator(;) type(long) ident(withoutMillis) operator(=) ident(getTimeInMillis)operator(()operator(\)) operator(-) ident(millis)operator(;) ident(withoutMillis) operator(+=) operator(()ident(mic) operator(/) integer(1000)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withMillis)operator(()ident(withoutMillis)operator(\))operator(;) ident(usec) operator(=) ident(mic) operator(%) integer(1000)operator(;) operator(}) directive(public) type(long) ident(microseconds)operator(()operator(\)) operator({) keyword(return) ident(getTimeInMillis)operator(()operator(\)) operator(%) integer(1000) operator(*) integer(1000) operator(+) ident(usec)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(sec)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getSecondOfMinute)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(min)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getMinuteOfHour)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(hour)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getHourOfDay)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(mday)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getDayOfMonth)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(month)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getMonthOfYear)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(year)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getYear)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(wday)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(()ident(dt)operator(.)ident(getDayOfWeek)operator(()operator(\))operator(%)integer(7)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyInteger) ident(yday)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(dt)operator(.)ident(getDayOfYear)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyInteger) ident(gmt_offset)operator(()operator(\)) operator({) type(int) ident(offset) operator(=) ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(.)ident(getOffsetFromLocal)operator(()ident(dt)operator(.)ident(getMillis)operator(()operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(()type(int)operator(\))operator(()ident(offset)operator(/)integer(1000)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(\)) directive(public) ident(RubyBoolean) ident(isdst)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newBoolean)operator(()operator(!)ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(.)ident(isStandardOffset)operator(()ident(dt)operator(.)ident(getMillis)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(RubyString) ident(zone)operator(()operator(\)) operator({) pre_type(String) ident(zone) operator(=) ident(dt)operator(.)ident(getZone)operator(()operator(\))operator(.)ident(getShortName)operator(()ident(dt)operator(.)ident(getMillis)operator(()operator(\))operator(\))operator(;) keyword(if)operator(()ident(zone)operator(.)ident(equals)operator(()stringoperator(\))operator(\)) operator({) ident(zone) operator(=) stringoperator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(zone)operator(\))operator(;) operator(}) directive(public) type(void) ident(setDateTime)operator(()ident(DateTime) ident(dt)operator(\)) operator({) local_variable(this)operator(.)ident(dt) operator(=) ident(dt)operator(;) operator(}) directive(public) ident(DateTime) ident(getDateTime)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(dt)operator(;) operator(}) directive(public) pre_type(Date) ident(getJavaDate)operator(()operator(\)) operator({) keyword(return) local_variable(this)operator(.)ident(dt)operator(.)ident(toDate)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyFixnum) ident(hash)operator(()operator(\)) operator({) comment(// modified to match how hash is calculated in 1.8.2) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()operator(()type(int)operator(\))operator(()operator(()operator(()ident(dt)operator(.)ident(getMillis)operator(()operator(\)) operator(/) integer(1000)operator(\)) operator(^) ident(microseconds)operator(()operator(\))operator(\)) operator(<)operator(<) integer(1)operator(\)) operator(>)operator(>) integer(1)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyString) ident(dump)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(RubyString) ident(str) operator(=) operator(()ident(RubyString)operator(\)) ident(mdump)operator(()keyword(new) ident(IRubyObject)type([]) operator({) local_variable(this) operator(})operator(\))operator(;) ident(str)operator(.)ident(syncVariables)operator(()local_variable(this)operator(.)ident(getVariableList)operator(()operator(\))operator(\))operator(;) keyword(return) ident(str)operator(;) operator(}) directive(public) ident(RubyObject) ident(mdump)operator(()directive(final) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(RubyTime) ident(obj) operator(=) operator(()ident(RubyTime)operator(\))ident(args)operator([)integer(0)operator(])operator(;) ident(DateTime) ident(dateTime) operator(=) ident(obj)operator(.)ident(dt)operator(.)ident(withZone)operator(()ident(DateTimeZone)operator(.)ident(UTC)operator(\))operator(;) type(byte) ident(dumpValue)type([]) operator(=) keyword(new) type(byte)operator([)integer(8)operator(])operator(;) type(int) ident(pe) operator(=) hex(0x1) operator(<)operator(<) integer(31) operator(|) operator(()ident(dateTime)operator(.)ident(getYear)operator(()operator(\))operator(-)integer(1900)operator(\)) operator(<)operator(<) integer(14) operator(|) operator(()ident(dateTime)operator(.)ident(getMonthOfYear)operator(()operator(\))operator(-)integer(1)operator(\)) operator(<)operator(<) integer(10) operator(|) ident(dateTime)operator(.)ident(getDayOfMonth)operator(()operator(\)) operator(<)operator(<) integer(5) operator(|) ident(dateTime)operator(.)ident(getHourOfDay)operator(()operator(\))operator(;) type(int) ident(se) operator(=) ident(dateTime)operator(.)ident(getMinuteOfHour)operator(()operator(\)) operator(<)operator(<) integer(26) operator(|) ident(dateTime)operator(.)ident(getSecondOfMinute)operator(()operator(\)) operator(<)operator(<) integer(20) operator(|) operator(()ident(dateTime)operator(.)ident(getMillisOfSecond)operator(()operator(\)) operator(*) integer(1000) operator(+) operator(()type(int)operator(\))ident(usec)operator(\))operator(;) comment(// dump usec, not msec) keyword(for)operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) integer(4)operator(;) ident(i)operator(++)operator(\)) operator({) ident(dumpValue)operator([)ident(i)operator(]) operator(=) operator(()type(byte)operator(\))operator(()ident(pe) operator(&) hex(0xFF)operator(\))operator(;) ident(pe) operator(>)operator(>)operator(>=) integer(8)operator(;) operator(}) keyword(for)operator(()type(int) ident(i) operator(=) integer(4)operator(;) ident(i) operator(<) integer(8) operator(;)ident(i)operator(++)operator(\)) operator({) ident(dumpValue)operator([)ident(i)operator(]) operator(=) operator(()type(byte)operator(\))operator(()ident(se) operator(&) hex(0xFF)operator(\))operator(;) ident(se) operator(>)operator(>)operator(>=) integer(8)operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(obj)operator(.)ident(getRuntime)operator(()operator(\))operator(,) keyword(new) ident(ByteList)operator(()ident(dumpValue)operator(,)pre_constant(false)operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) comment(/* Time class methods */) directive(public) directive(static) ident(IRubyObject) ident(s_new)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyTime) ident(time) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) keyword(new) ident(DateTime)operator(()ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) ident(time)operator(.)ident(callInit)operator(()ident(args)operator(,)ident(block)operator(\))operator(;) keyword(return) ident(time)operator(;) operator(}) comment(/** * @deprecated Use {@link #newInstance(ThreadContext, IRubyObject\)} */) annotation(@Deprecated) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(newInstance)operator(()ident(context)operator(,) ident(recv)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(backtrace) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(newInstance)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) operator(()operator(()ident(RubyClass)operator(\)) ident(recv)operator(\))operator(.)ident(allocate)operator(()operator(\))operator(;) ident(obj)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseCallSites)operator(()operator(\))operator([)ident(RubyClass)operator(.)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(obj)operator(\))operator(;) keyword(return) ident(obj)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(at)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) directive(final) ident(RubyTime) ident(time)operator(;) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyTime)operator(\)) operator({) ident(RubyTime) ident(other) operator(=) operator(()ident(RubyTime)operator(\)) ident(arg)operator(;) ident(time) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) ident(other)operator(.)ident(dt)operator(\))operator(;) ident(time)operator(.)ident(setUSec)operator(()ident(other)operator(.)ident(getUSec)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(time) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) keyword(new) ident(DateTime)operator(()integer(0L)operator(,) ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) type(long) ident(seconds) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg)operator(\))operator(;) type(long) ident(millisecs) operator(=) integer(0)operator(;) type(long) ident(microsecs) operator(=) integer(0)operator(;) comment(// In the case of two arguments, MRI will discard the portion of) comment(// the first argument after a decimal point (i.e., "floor"\).) comment(// However in the case of a single argument, any portion after) comment(// the decimal point is honored.) keyword(if) operator(()ident(arg) keyword(instanceof) ident(RubyFloat)operator(\)) operator({) type(double) ident(dbl) operator(=) operator(()operator(()ident(RubyFloat)operator(\)) ident(arg)operator(\))operator(.)ident(getDoubleValue)operator(()operator(\))operator(;) type(long) ident(micro) operator(=) operator(()type(long)operator(\)) operator(()operator(()ident(dbl) operator(-) ident(seconds)operator(\)) operator(*) integer(1000000)operator(\))operator(;) ident(millisecs) operator(=) ident(micro) operator(/) integer(1000)operator(;) ident(microsecs) operator(=) ident(micro) operator(%) integer(1000)operator(;) operator(}) ident(time)operator(.)ident(setUSec)operator(()ident(microsecs)operator(\))operator(;) ident(time)operator(.)ident(dt) operator(=) ident(time)operator(.)ident(dt)operator(.)ident(withMillis)operator(()ident(seconds) operator(*) integer(1000) operator(+) ident(millisecs)operator(\))operator(;) operator(}) ident(time)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseCallSites)operator(()operator(\))operator([)ident(RubyClass)operator(.)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(time)operator(\))operator(;) keyword(return) ident(time)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(at)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(arg1)operator(,) ident(IRubyObject) ident(arg2)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyTime) ident(time) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) keyword(new) ident(DateTime)operator(()integer(0L)operator(,) ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(\))operator(\))operator(;) type(long) ident(seconds) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg1)operator(\))operator(;) type(long) ident(millisecs) operator(=) integer(0)operator(;) type(long) ident(microsecs) operator(=) integer(0)operator(;) type(long) ident(tmp) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(arg2)operator(\))operator(;) ident(millisecs) operator(=) ident(tmp) operator(/) integer(1000)operator(;) ident(microsecs) operator(=) ident(tmp) operator(%) integer(1000)operator(;) ident(time)operator(.)ident(setUSec)operator(()ident(microsecs)operator(\))operator(;) ident(time)operator(.)ident(dt) operator(=) ident(time)operator(.)ident(dt)operator(.)ident(withMillis)operator(()ident(seconds) operator(*) integer(1000) operator(+) ident(millisecs)operator(\))operator(;) ident(time)operator(.)ident(getMetaClass)operator(()operator(\))operator(.)ident(getBaseCallSites)operator(()operator(\))operator([)ident(RubyClass)operator(.)ident(CS_IDX_INITIALIZE)operator(])operator(.)ident(call)operator(()ident(context)operator(,) ident(time)operator(\))operator(;) keyword(return) ident(time)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(9)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyTime) ident(new_local)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(createTime)operator(()ident(recv)operator(,) ident(args)operator(,) pre_constant(false)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(9)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyTime) ident(new_utc)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(createTime)operator(()ident(recv)operator(,) ident(args)operator(,) pre_constant(true)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyTime) ident(load)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(from)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(s_mload)operator(()ident(recv)operator(,) operator(()ident(RubyTime)operator(\))operator(()operator(()operator(()ident(RubyClass)operator(\))ident(recv)operator(\))operator(.)ident(allocate)operator(()operator(\))operator(\))operator(,) ident(from)operator(\))operator(;) operator(}) directive(protected) directive(static) ident(RubyTime) ident(s_mload)operator(()ident(IRubyObject) ident(recv)operator(,) ident(RubyTime) ident(time)operator(,) ident(IRubyObject) ident(from)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(DateTime) ident(dt) operator(=) keyword(new) ident(DateTime)operator(()ident(DateTimeZone)operator(.)ident(UTC)operator(\))operator(;) type(byte)type([]) ident(fromAsBytes) operator(=) pre_constant(null)operator(;) ident(fromAsBytes) operator(=) ident(from)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getBytes)operator(()operator(\))operator(;) keyword(if)operator(()ident(fromAsBytes)operator(.)ident(length) operator(!=) integer(8)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) type(int) ident(p)operator(=)integer(0)operator(;) type(int) ident(s)operator(=)integer(0)operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) integer(4)operator(;) ident(i)operator(++)operator(\)) operator({) ident(p) operator(|=) operator(()operator(()type(int)operator(\))ident(fromAsBytes)operator([)ident(i)operator(]) operator(&) hex(0xFF)operator(\)) operator(<)operator(<) operator(()integer(8) operator(*) ident(i)operator(\))operator(;) operator(}) keyword(for) operator(()type(int) ident(i) operator(=) integer(4)operator(;) ident(i) operator(<) integer(8)operator(;) ident(i)operator(++)operator(\)) operator({) ident(s) operator(|=) operator(()operator(()type(int)operator(\))ident(fromAsBytes)operator([)ident(i)operator(]) operator(&) hex(0xFF)operator(\)) operator(<)operator(<) operator(()integer(8) operator(*) operator(()ident(i) operator(-) integer(4)operator(\))operator(\))operator(;) operator(}) keyword(if) operator(()operator(()ident(p) operator(&) operator(()integer(1)operator(<)operator(<)integer(31)operator(\))operator(\)) operator(==) integer(0)operator(\)) operator({) ident(dt) operator(=) ident(dt)operator(.)ident(withMillis)operator(()ident(p) operator(*) integer(1000L) operator(+) ident(s)operator(\))operator(;) operator(}) keyword(else) operator({) ident(p) operator(&=) operator(~)operator(()integer(1)operator(<)operator(<)integer(31)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withYear)operator(()operator(()operator(()ident(p) operator(>)operator(>)operator(>) integer(14)operator(\)) operator(&) hex(0xFFFF)operator(\)) operator(+) integer(1900)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withMonthOfYear)operator(()operator(()operator(()ident(p) operator(>)operator(>)operator(>) integer(10)operator(\)) operator(&) hex(0xF)operator(\)) operator(+) integer(1)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withDayOfMonth)operator(()operator(()operator(()ident(p) operator(>)operator(>)operator(>) integer(5)operator(\)) operator(&) hex(0x1F)operator(\))operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withHourOfDay)operator(()operator(()ident(p) operator(&) hex(0x1F)operator(\))operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withMinuteOfHour)operator(()operator(()operator(()ident(s) operator(>)operator(>)operator(>) integer(26)operator(\)) operator(&) hex(0x3F)operator(\))operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withSecondOfMinute)operator(()operator(()operator(()ident(s) operator(>)operator(>)operator(>) integer(20)operator(\)) operator(&) hex(0x3F)operator(\))operator(\))operator(;) comment(// marsaling dumps usec, not msec) ident(dt) operator(=) ident(dt)operator(.)ident(withMillisOfSecond)operator(()operator(()ident(s) operator(&) hex(0xFFFFF)operator(\)) operator(/) integer(1000)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(withZone)operator(()ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(\))operator(;) ident(time)operator(.)ident(setUSec)operator(()operator(()ident(s) operator(&) hex(0xFFFFF)operator(\)) operator(%) integer(1000)operator(\))operator(;) operator(}) ident(time)operator(.)ident(setDateTime)operator(()ident(dt)operator(\))operator(;) keyword(return) ident(time)operator(;) operator(}) directive(private) directive(static) directive(final) pre_type(String)type([]) ident(MONTHS) operator(=) operator({)stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(})operator(;) directive(private) directive(static) directive(final) pre_type(Map)operator(<)pre_type(String)operator(,) pre_type(Integer)operator(>) ident(MONTHS_MAP) operator(=) keyword(new) pre_type(HashMap)operator(<)pre_type(String)operator(,) pre_type(Integer)operator(>)operator(()operator(\))operator(;) directive(static) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(i) operator(<) ident(MONTHS)operator(.)ident(length)operator(;) ident(i)operator(++)operator(\)) operator({) ident(MONTHS_MAP)operator(.)ident(put)operator(()ident(MONTHS)operator([)ident(i)operator(])operator(,) ident(i) operator(+) integer(1)operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) directive(final) type(int)type([]) ident(time_min) operator(=) operator({)integer(1)operator(,) integer(0)operator(,) integer(0)operator(,) integer(0)operator(,) pre_type(Integer)operator(.)ident(MIN_VALUE)operator(})operator(;) directive(private) directive(static) directive(final) type(int)type([]) ident(time_max) operator(=) operator({)integer(31)operator(,) integer(23)operator(,) integer(59)operator(,) integer(60)operator(,) pre_type(Integer)operator(.)ident(MAX_VALUE)operator(})operator(;) directive(private) directive(static) directive(final) type(int) ident(ARG_SIZE) operator(=) integer(7)operator(;) directive(private) directive(static) ident(RubyTime) ident(createTime)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) type(boolean) ident(gmt)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) type(int) ident(len) operator(=) ident(ARG_SIZE)operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(10)operator(\)) operator({) ident(args) operator(=) keyword(new) ident(IRubyObject)type([]) operator({) ident(args)operator([)integer(5)operator(])operator(,) ident(args)operator([)integer(4)operator(])operator(,) ident(args)operator([)integer(3)operator(])operator(,) ident(args)operator([)integer(2)operator(])operator(,) ident(args)operator([)integer(1)operator(])operator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(runtime)operator(.)ident(getNil)operator(()operator(\)) operator(})operator(;) operator(}) keyword(else) operator({) comment(// MRI accepts additional wday argument which appears to be ignored.) ident(len) operator(=) ident(args)operator(.)ident(length)operator(;) keyword(if) operator(()ident(len) operator(<) ident(ARG_SIZE)operator(\)) operator({) ident(IRubyObject)type([]) ident(newArgs) operator(=) keyword(new) ident(IRubyObject)operator([)ident(ARG_SIZE)operator(])operator(;) pre_type(System)operator(.)ident(arraycopy)operator(()ident(args)operator(,) integer(0)operator(,) ident(newArgs)operator(,) integer(0)operator(,) ident(args)operator(.)ident(length)operator(\))operator(;) keyword(for) operator(()type(int) ident(i) operator(=) ident(len)operator(;) ident(i) operator(<) ident(ARG_SIZE)operator(;) ident(i)operator(++)operator(\)) operator({) ident(newArgs)operator([)ident(i)operator(]) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) ident(args) operator(=) ident(newArgs)operator(;) ident(len) operator(=) ident(ARG_SIZE)operator(;) operator(}) operator(}) keyword(if) operator(()ident(args)operator([)integer(0)operator(]) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(args)operator([)integer(0)operator(]) operator(=) ident(RubyNumeric)operator(.)ident(str2inum)operator(()ident(runtime)operator(,) operator(()ident(RubyString)operator(\)) ident(args)operator([)integer(0)operator(])operator(,) integer(10)operator(,) pre_constant(false)operator(\))operator(;) operator(}) type(int) ident(year) operator(=) operator(()type(int)operator(\)) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) type(int) ident(month) operator(=) integer(1)operator(;) keyword(if) operator(()ident(len) operator(>) integer(1)operator(\)) operator({) keyword(if) operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(tmp) operator(=) ident(args)operator([)integer(1)operator(])operator(.)ident(checkStringType)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(tmp)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) pre_type(String) ident(monthString) operator(=) ident(tmp)operator(.)ident(toString)operator(()operator(\))operator(.)ident(toLowerCase)operator(()operator(\))operator(;) pre_type(Integer) ident(monthInt) operator(=) ident(MONTHS_MAP)operator(.)ident(get)operator(()ident(monthString)operator(\))operator(;) keyword(if) operator(()ident(monthInt) operator(!=) pre_constant(null)operator(\)) operator({) ident(month) operator(=) ident(monthInt)operator(;) operator(}) keyword(else) operator({) keyword(try) operator({) ident(month) operator(=) pre_type(Integer)operator(.)ident(parseInt)operator(()ident(monthString)operator(\))operator(;) operator(}) keyword(catch) operator(()exception(NumberFormatException) ident(nfExcptn)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) operator(}) operator(}) keyword(else) operator({) ident(month) operator(=) operator(()type(int)operator(\)) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) operator(}) keyword(if) operator(()integer(1) operator(>) ident(month) operator(||) ident(month) operator(>) integer(12)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()string operator(+) ident(month)operator(\))operator(;) operator(}) operator(}) type(int)type([]) ident(int_args) operator(=) operator({) integer(1)operator(,) integer(0)operator(,) integer(0)operator(,) integer(0)operator(,) integer(0)operator(,) integer(0) operator(})operator(;) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(;) ident(int_args)operator(.)ident(length) operator(>=) ident(i) operator(+) integer(2)operator(;) ident(i)operator(++)operator(\)) operator({) keyword(if) operator(()operator(!)ident(args)operator([)ident(i) operator(+) integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(if) operator(()operator(!)operator(()ident(args)operator([)ident(i) operator(+) integer(2)operator(]) keyword(instanceof) ident(RubyNumeric)operator(\))operator(\)) operator({) ident(args)operator([)ident(i) operator(+) integer(2)operator(]) operator(=) ident(args)operator([)ident(i) operator(+) integer(2)operator(])operator(.)ident(callMethod)operator(() ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) stringoperator(\))operator(;) operator(}) type(long) ident(value) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)ident(i) operator(+) integer(2)operator(])operator(\))operator(;) keyword(if) operator(()ident(time_min)operator([)ident(i)operator(]) operator(>) ident(value) operator(||) ident(value) operator(>) ident(time_max)operator([)ident(i)operator(])operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(int_args)operator([)ident(i)operator(]) operator(=) operator(()type(int)operator(\)) ident(value)operator(;) operator(}) operator(}) keyword(if) operator(()integer(0) operator(<=) ident(year) operator(&&) ident(year) operator(<) integer(39)operator(\)) operator({) ident(year) operator(+=) integer(2000)operator(;) operator(}) keyword(else) keyword(if) operator(()integer(69) operator(<=) ident(year) operator(&&) ident(year) operator(<) integer(139)operator(\)) operator({) ident(year) operator(+=) integer(1900)operator(;) operator(}) ident(DateTimeZone) ident(dtz)operator(;) keyword(if) operator(()ident(gmt)operator(\)) operator({) ident(dtz) operator(=) ident(DateTimeZone)operator(.)ident(UTC)operator(;) operator(}) keyword(else) operator({) ident(dtz) operator(=) ident(getLocalTimeZone)operator(()ident(runtime)operator(\))operator(;) operator(}) ident(DateTime) ident(dt)operator(;) comment(// set up with min values and then add to allow rolling over) keyword(try) operator({) ident(dt) operator(=) keyword(new) ident(DateTime)operator(()ident(year)operator(,) integer(1)operator(,) integer(1)operator(,) integer(0)operator(,) integer(0) operator(,) integer(0)operator(,) integer(0)operator(,) ident(dtz)operator(\))operator(;) ident(dt) operator(=) ident(dt)operator(.)ident(plusMonths)operator(()ident(month) operator(-) integer(1)operator(\)) operator(.)ident(plusDays)operator(()ident(int_args)operator([)integer(0)operator(]) operator(-) integer(1)operator(\)) operator(.)ident(plusHours)operator(()ident(int_args)operator([)integer(1)operator(])operator(\)) operator(.)ident(plusMinutes)operator(()ident(int_args)operator([)integer(2)operator(])operator(\)) operator(.)ident(plusSeconds)operator(()ident(int_args)operator([)integer(3)operator(])operator(\))operator(;) operator(}) keyword(catch) operator(()ident(org)operator(.)ident(joda)operator(.)ident(time)operator(.)ident(IllegalFieldValueException) ident(e)operator(\)) operator({) keyword(throw) ident(runtime)operator(.)ident(newArgumentError)operator(()stringoperator(\))operator(;) operator(}) ident(RubyTime) ident(time) operator(=) keyword(new) ident(RubyTime)operator(()ident(runtime)operator(,) operator(()ident(RubyClass)operator(\)) ident(recv)operator(,) ident(dt)operator(\))operator(;) comment(// Ignores usec if 8 args (for compatibility with parsedate\) or if not supplied.) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(8) operator(&&) operator(!)ident(args)operator([)integer(6)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) type(int) ident(usec) operator(=) ident(int_args)operator([)integer(4)operator(]) operator(%) integer(1000)operator(;) type(int) ident(msec) operator(=) ident(int_args)operator([)integer(4)operator(]) operator(/) integer(1000)operator(;) keyword(if) operator(()ident(int_args)operator([)integer(4)operator(]) operator(<) integer(0)operator(\)) operator({) ident(msec) operator(-=) integer(1)operator(;) ident(usec) operator(+=) integer(1000)operator(;) operator(}) ident(time)operator(.)ident(dt) operator(=) ident(dt)operator(.)ident(withMillis)operator(()ident(dt)operator(.)ident(getMillis)operator(()operator(\)) operator(+) ident(msec)operator(\))operator(;) ident(time)operator(.)ident(setUSec)operator(()ident(usec)operator(\))operator(;) operator(}) ident(time)operator(.)ident(callInit)operator(()ident(IRubyObject)operator(.)ident(NULL_ARRAY)operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(time)operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2004 Charles O Nutter * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.internal.runtime.methods.DynamicMethod)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) comment(/** * * Note: This was renamed from UnboundMethod.java * * @author jpetersen */) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) type(class) class(RubyUnboundMethod) directive(extends) ident(RubyMethod) operator({) directive(protected) ident(RubyUnboundMethod)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getUnboundMethod)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) directive(static) ident(RubyUnboundMethod) ident(newUnboundMethod)operator(() ident(RubyModule) ident(implementationModule)operator(,) pre_type(String) ident(methodName)operator(,) ident(RubyModule) ident(originModule)operator(,) pre_type(String) ident(originName)operator(,) ident(DynamicMethod) ident(method)operator(\)) operator({) ident(RubyUnboundMethod) ident(newMethod) operator(=) keyword(new) ident(RubyUnboundMethod)operator(()ident(implementationModule)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(;) ident(newMethod)operator(.)ident(implementationModule) operator(=) ident(implementationModule)operator(;) ident(newMethod)operator(.)ident(methodName) operator(=) ident(methodName)operator(;) ident(newMethod)operator(.)ident(originModule) operator(=) ident(originModule)operator(;) ident(newMethod)operator(.)ident(originName) operator(=) ident(originName)operator(;) ident(newMethod)operator(.)ident(method) operator(=) ident(method)operator(;) keyword(return) ident(newMethod)operator(;) operator(}) directive(public) directive(static) ident(RubyClass) ident(defineUnboundMethodClass)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) comment(// TODO: NOT_ALLOCATABLE_ALLOCATOR is probably ok here. Confirm. JRUBY-415) ident(RubyClass) ident(newClass) operator(=) ident(runtime)operator(.)ident(defineClass)operator(()stringoperator(,) ident(runtime)operator(.)ident(getMethod)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(runtime)operator(.)ident(setUnboundMethod)operator(()ident(newClass)operator(\))operator(;) ident(newClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyUnboundMethod)operator(.)ident(class)operator(\))operator(;) keyword(return) ident(newClass)operator(;) operator(}) comment(/** * @see org.jruby.RubyMethod#call(IRubyObject[]\) */) annotation(@JRubyMethod)operator(()ident(name) operator(=) operator({)stringoperator(,) stringoperator(})operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(call)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) comment(/** * @see org.jruby.RubyMethod#unbind(\) */) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) annotation(@Override) directive(public) ident(RubyUnboundMethod) ident(unbind)operator(()ident(Block) ident(block)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(RubyMethod) ident(bind)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(aReceiver)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(receiverClass) operator(=) ident(aReceiver)operator(.)ident(getMetaClass)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(originModule)operator(.)ident(isInstance)operator(()ident(aReceiver)operator(\))operator(\)) operator({) keyword(if) operator(()ident(originModule) keyword(instanceof) ident(MetaClass)operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(receiverClass) keyword(instanceof) ident(MetaClass) operator(&&) ident(receiverClass)operator(.)ident(getMethods)operator(()operator(\))operator(.)ident(containsKey)operator(()ident(originName)operator(\))operator(\)) operator({) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(originName) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(() operator(!)operator(()ident(originModule)operator(.)ident(isModule)operator(()operator(\)) operator(?) ident(originModule)operator(.)ident(isInstance)operator(()ident(aReceiver)operator(\)) operator(:) ident(aReceiver)operator(.)ident(getType)operator(()operator(\)) operator(==) ident(originModule)operator(\))operator(\)) operator({) comment(// FIX replace type(\) == ... with isInstanceOf(...\)) keyword(throw) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(originModule)operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(RubyMethod)operator(.)ident(newMethod)operator(()ident(implementationModule)operator(,) ident(methodName)operator(,) ident(receiverClass)operator(,) ident(originName)operator(,) ident(method)operator(,) ident(aReceiver)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) annotation(@Override) directive(public) ident(RubyMethod) ident(rbClone)operator(()operator(\)) operator({) keyword(return) ident(newUnboundMethod)operator(()ident(implementationModule)operator(,) ident(methodName)operator(,) ident(originModule)operator(,) ident(originName)operator(,) ident(method)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) annotation(@Override) directive(public) ident(IRubyObject) ident(to_proc)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) local_variable(super)operator(.)ident(to_proc)operator(()ident(context)operator(,) ident(unusedBlock)operator(\))operator(;) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2007 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.Iterator)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.Map)operator(;) keyword(import) include(java.util.regex.Pattern)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.javasupport.JavaEmbedUtils)operator(;) keyword(import) include(org.jruby.javasupport.JavaUtil)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.MethodIndex)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.yaml.JRubyRepresenter)operator(;) keyword(import) include(org.jruby.yaml.JRubyConstructor)operator(;) keyword(import) include(org.jruby.yaml.JRubySerializer)operator(;) keyword(import) include(org.jruby.util.IOInputStream)operator(;) keyword(import) include(org.jruby.util.IOOutputStream)operator(;) keyword(import) include(org.jvyamlb.Representer)operator(;) keyword(import) include(org.jvyamlb.Constructor)operator(;) keyword(import) include(org.jvyamlb.ParserImpl)operator(;) keyword(import) include(org.jvyamlb.PositioningParserImpl)operator(;) keyword(import) include(org.jvyamlb.Scanner)operator(;) keyword(import) include(org.jvyamlb.ScannerImpl)operator(;) keyword(import) include(org.jvyamlb.Composer)operator(;) keyword(import) include(org.jvyamlb.ComposerImpl)operator(;) keyword(import) include(org.jvyamlb.PositioningScannerImpl)operator(;) keyword(import) include(org.jvyamlb.PositioningComposerImpl)operator(;) keyword(import) include(org.jvyamlb.Serializer)operator(;) keyword(import) include(org.jvyamlb.ResolverImpl)operator(;) keyword(import) include(org.jvyamlb.EmitterImpl)operator(;) keyword(import) include(org.jvyamlb.exceptions.YAMLException)operator(;) keyword(import) include(org.jvyamlb.YAMLConfig)operator(;) keyword(import) include(org.jvyamlb.YAML)operator(;) keyword(import) include(org.jvyamlb.PositioningScanner)operator(;) keyword(import) include(org.jvyamlb.Positionable)operator(;) keyword(import) include(org.jvyamlb.Position)operator(;) comment(/** * @author Ola Bini */) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyYAML) operator({) directive(public) directive(static) ident(RubyModule) ident(createYAMLModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(result) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyYAML)operator(.)ident(class)operator(\))operator(;) ident(RubyClass) ident(obj) operator(=) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(;) ident(RubyClass) ident(clazz) operator(=) ident(runtime)operator(.)ident(getClassClass)operator(()operator(\))operator(;) ident(RubyClass) ident(hash) operator(=) ident(runtime)operator(.)ident(getHash)operator(()operator(\))operator(;) ident(RubyClass) ident(array) operator(=) ident(runtime)operator(.)ident(getArray)operator(()operator(\))operator(;) ident(RubyClass) ident(struct) operator(=) ident(runtime)operator(.)ident(getStructClass)operator(()operator(\))operator(;) ident(RubyClass) ident(exception) operator(=) ident(runtime)operator(.)ident(getException)operator(()operator(\))operator(;) ident(RubyClass) ident(string) operator(=) ident(runtime)operator(.)ident(getString)operator(()operator(\))operator(;) ident(RubyClass) ident(symbol) operator(=) ident(runtime)operator(.)ident(getSymbol)operator(()operator(\))operator(;) ident(RubyClass) ident(range) operator(=) ident(runtime)operator(.)ident(getRange)operator(()operator(\))operator(;) ident(RubyClass) ident(regexp) operator(=) ident(runtime)operator(.)ident(getRegexp)operator(()operator(\))operator(;) ident(RubyClass) ident(time) operator(=) ident(runtime)operator(.)ident(getTime)operator(()operator(\))operator(;) ident(RubyClass) ident(date) operator(=) ident(runtime)operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(fixnum) operator(=) ident(runtime)operator(.)ident(getFixnum)operator(()operator(\))operator(;) ident(RubyClass) ident(bignum) operator(=) ident(runtime)operator(.)ident(getBignum)operator(()operator(\))operator(;) ident(RubyClass) ident(flt) operator(=) ident(runtime)operator(.)ident(getFloat)operator(()operator(\))operator(;) ident(RubyClass) ident(trueClass) operator(=) ident(runtime)operator(.)ident(getTrueClass)operator(()operator(\))operator(;) ident(RubyClass) ident(falseClass) operator(=) ident(runtime)operator(.)ident(getFalseClass)operator(()operator(\))operator(;) ident(RubyClass) ident(nilClass) operator(=) ident(runtime)operator(.)ident(getNilClass)operator(()operator(\))operator(;) ident(clazz)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLClassMethods)operator(.)ident(class)operator(\))operator(;) ident(obj)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLObjectMethods)operator(.)ident(class)operator(\))operator(;) ident(hash)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLHashMethods)operator(.)ident(class)operator(\))operator(;) ident(array)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLArrayMethods)operator(.)ident(class)operator(\))operator(;) ident(struct)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLStructMethods)operator(.)ident(class)operator(\))operator(;) ident(exception)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLExceptionMethods)operator(.)ident(class)operator(\))operator(;) ident(string)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLStringMethods)operator(.)ident(class)operator(\))operator(;) ident(symbol)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLSymbolMethods)operator(.)ident(class)operator(\))operator(;) ident(range)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLRangeMethods)operator(.)ident(class)operator(\))operator(;) ident(regexp)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLRegexpMethods)operator(.)ident(class)operator(\))operator(;) ident(time)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLTimeMethods)operator(.)ident(class)operator(\))operator(;) ident(date)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLDateMethods)operator(.)ident(class)operator(\))operator(;) ident(bignum)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLNumericMethods)operator(.)ident(class)operator(\))operator(;) ident(fixnum)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLNumericMethods)operator(.)ident(class)operator(\))operator(;) ident(flt)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLNumericMethods)operator(.)ident(class)operator(\))operator(;) ident(trueClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLTrueMethods)operator(.)ident(class)operator(\))operator(;) ident(falseClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLFalseMethods)operator(.)ident(class)operator(\))operator(;) ident(nilClass)operator(.)ident(defineAnnotatedMethods)operator(()ident(YAMLNilMethods)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(setObjectToYamlMethod)operator(()ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(searchMethod)operator(()stringoperator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dump)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(IRubyObject) ident(obj) operator(=) ident(args)operator([)integer(0)operator(])operator(;) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(val) operator(=) ident(runtime)operator(.)ident(newArray)operator(()ident(obj)operator(\))operator(;) keyword(if)operator(()ident(args)operator(.)ident(length)operator(>)integer(1)operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(self)operator(,)stringoperator(,) ident(val)operator(,) ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(self)operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(,) ident(val)operator(\))operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dump_all)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(RubyArray) ident(objs) operator(=) operator(()ident(RubyArray)operator(\))ident(args)operator([)integer(0)operator(])operator(;) ident(IRubyObject) ident(io) operator(=) pre_constant(null)operator(;) ident(IRubyObject) ident(io2) operator(=) pre_constant(null)operator(;) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(2) operator(&&) ident(args)operator([)integer(1)operator(]) operator(!=) pre_constant(null) operator(&&) operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(io) operator(=) ident(args)operator([)integer(1)operator(])operator(;) operator(}) ident(YAMLConfig) ident(cfg) operator(=) ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(;) ident(IOOutputStream) ident(iox) operator(=) pre_constant(null)operator(;) keyword(if)operator(()pre_constant(null) operator(==) ident(io)operator(\)) operator({) ident(io2) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(iox) operator(=) keyword(new) ident(IOOutputStream)operator(()ident(io2)operator(\))operator(;) operator(}) keyword(else) operator({) ident(iox) operator(=) keyword(new) ident(IOOutputStream)operator(()ident(io)operator(\))operator(;) operator(}) ident(Serializer) ident(ser) operator(=) keyword(new) ident(JRubySerializer)operator(()keyword(new) ident(EmitterImpl)operator(()ident(iox)operator(,)ident(cfg)operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(,)ident(cfg)operator(\))operator(;) keyword(try) operator({) ident(ser)operator(.)ident(open)operator(()operator(\))operator(;) ident(Representer) ident(r) operator(=) keyword(new) ident(JRubyRepresenter)operator(()ident(ser)operator(,) ident(cfg)operator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) ident(objs)operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;)ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(r)operator(.)ident(represent)operator(()ident(iter)operator(.)ident(next)operator(()operator(\))operator(\))operator(;) operator(}) ident(ser)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newIOErrorFromException)operator(()ident(e)operator(\))operator(;) operator(}) keyword(if)operator(()pre_constant(null) operator(==) ident(io)operator(\)) operator({) ident(io2)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(return) ident(io2)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) keyword(else) operator({) keyword(return) ident(io)operator(;) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(parse_internal)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(boolean) ident(debug) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(check_yaml_port)operator(()ident(arg)operator(\))operator(;) pre_type(Scanner) ident(scn) operator(=) pre_constant(null)operator(;) keyword(try) operator({) keyword(if)operator(()ident(io) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) ident(Composer) ident(ctor) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningComposerImpl)operator(()keyword(new) ident(PositioningParserImpl)operator(()operator(()ident(PositioningScanner)operator(\))ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ComposerImpl)operator(()keyword(new) ident(ParserImpl)operator(()ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\)) operator(;) keyword(if)operator(()ident(ctor)operator(.)ident(checkNode)operator(()operator(\))operator(\)) operator({) keyword(return) ident(JavaEmbedUtils)operator(.)ident(javaToRuby)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(ctor)operator(.)ident(getNode)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()ident(YAMLException) ident(e)operator(\)) operator({) keyword(if)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) pre_type(Position)operator(.)ident(Range) ident(range) operator(=) operator(()operator(()ident(Positionable)operator(\))ident(e)operator(\))operator(.)ident(getRange)operator(()operator(\))operator(;) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(range)operator(.)ident(start) operator(+) string operator(+) ident(range)operator(.)ident(end) operator(+) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(boolean) ident(debug) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(check_yaml_port)operator(()ident(arg)operator(\))operator(;) pre_type(Scanner) ident(scn) operator(=) pre_constant(null)operator(;) keyword(try) operator({) keyword(if)operator(()ident(io) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) pre_type(Constructor) ident(ctor) operator(=) ident(debug) operator(?) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(PositioningComposerImpl)operator(()keyword(new) ident(PositioningParserImpl)operator(()operator(()ident(PositioningScanner)operator(\))ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(:) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(ComposerImpl)operator(()keyword(new) ident(ParserImpl)operator(()ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(;) keyword(if)operator(()ident(ctor)operator(.)ident(checkData)operator(()operator(\))operator(\)) operator({) keyword(return) ident(JavaEmbedUtils)operator(.)ident(javaToRuby)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(ctor)operator(.)ident(getData)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()ident(YAMLException) ident(e)operator(\)) operator({) keyword(if)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) pre_type(Position)operator(.)ident(Range) ident(range) operator(=) operator(()operator(()ident(Positionable)operator(\))ident(e)operator(\))operator(.)ident(getRange)operator(()operator(\))operator(;) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(range)operator(.)ident(start) operator(+) string operator(+) ident(range)operator(.)ident(end) operator(+) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load_file)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,)stringoperator(,) ident(arg)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(IRubyObject) ident(val) operator(=) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(io)operator(\))operator(;) ident(io)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(return) ident(val)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(each_document)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) type(boolean) ident(debug) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(arg)operator(;) pre_type(Scanner) ident(scn) operator(=) pre_constant(null)operator(;) keyword(try) operator({) keyword(if)operator(()ident(io) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) pre_type(Constructor) ident(ctor) operator(=) ident(debug) operator(?) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(PositioningComposerImpl)operator(()keyword(new) ident(PositioningParserImpl)operator(()operator(()ident(PositioningScanner)operator(\))ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(:) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(ComposerImpl)operator(()keyword(new) ident(ParserImpl)operator(()ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(;) keyword(while)operator(()ident(ctor)operator(.)ident(checkData)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(JavaEmbedUtils)operator(.)ident(javaToRuby)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(ctor)operator(.)ident(getData)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()ident(YAMLException) ident(e)operator(\)) operator({) keyword(if)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) pre_type(Position)operator(.)ident(Range) ident(range) operator(=) operator(()operator(()ident(Positionable)operator(\))ident(e)operator(\))operator(.)ident(getRange)operator(()operator(\))operator(;) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(range)operator(.)ident(start) operator(+) string operator(+) ident(range)operator(.)ident(end) operator(+) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load_documents)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(,) ident(Block) ident(block)operator(\)) operator({) type(boolean) ident(debug) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(check_yaml_port)operator(()ident(arg)operator(\))operator(;) pre_type(Scanner) ident(scn) operator(=) pre_constant(null)operator(;) keyword(try) operator({) keyword(if)operator(()ident(io) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) pre_type(Constructor) ident(ctor) operator(=) ident(debug) operator(?) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(PositioningComposerImpl)operator(()keyword(new) ident(PositioningParserImpl)operator(()operator(()ident(PositioningScanner)operator(\))ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(:) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(ComposerImpl)operator(()keyword(new) ident(ParserImpl)operator(()ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(;) keyword(while)operator(()ident(ctor)operator(.)ident(checkData)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(JavaEmbedUtils)operator(.)ident(javaToRuby)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(ctor)operator(.)ident(getData)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(catch)operator(()ident(YAMLException) ident(e)operator(\)) operator({) keyword(if)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) pre_type(Position)operator(.)ident(Range) ident(range) operator(=) operator(()operator(()ident(Positionable)operator(\))ident(e)operator(\))operator(.)ident(getRange)operator(()operator(\))operator(;) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(range)operator(.)ident(start) operator(+) string operator(+) ident(range)operator(.)ident(end) operator(+) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(load_stream)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) type(boolean) ident(debug) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(d) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(arg)operator(;) pre_type(Scanner) ident(scn) operator(=) pre_constant(null)operator(;) keyword(try) operator({) keyword(if)operator(()ident(io) keyword(instanceof) ident(RubyString)operator(\)) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()operator(()operator(()ident(RubyString)operator(\))ident(io)operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(scn) operator(=) ident(debug) operator(?) keyword(new) ident(PositioningScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\)) operator(:) keyword(new) ident(ScannerImpl)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) pre_type(Constructor) ident(ctor) operator(=) ident(debug) operator(?) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(PositioningComposerImpl)operator(()keyword(new) ident(PositioningParserImpl)operator(()operator(()ident(PositioningScanner)operator(\))ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(:) keyword(new) ident(JRubyConstructor)operator(()ident(self)operator(,) keyword(new) ident(ComposerImpl)operator(()keyword(new) ident(ParserImpl)operator(()ident(scn)operator(,)ident(YAML)operator(.)ident(config)operator(()operator(\))operator(.)ident(version)operator(()stringoperator(\))operator(\))operator(,)keyword(new) ident(ResolverImpl)operator(()operator(\))operator(\))operator(\)) operator(;) keyword(while)operator(()ident(ctor)operator(.)ident(checkData)operator(()operator(\))operator(\)) operator({) keyword(if)operator(()ident(d)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(d) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(d)operator(\))operator(;) operator(}) ident(d)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(JavaEmbedUtils)operator(.)ident(javaToRuby)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(ctor)operator(.)ident(getData)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(d)operator(;) operator(}) keyword(catch)operator(()ident(YAMLException) ident(e)operator(\)) operator({) keyword(if)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getDebug)operator(()operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) pre_type(Position)operator(.)ident(Range) ident(range) operator(=) operator(()operator(()ident(Positionable)operator(\))ident(e)operator(\))operator(.)ident(getRange)operator(()operator(\))operator(;) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(range)operator(.)ident(start) operator(+) string operator(+) ident(range)operator(.)ident(end) operator(+) string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(dump_stream)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(stream) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(,)ident(j)operator(=)ident(args)operator(.)ident(length)operator(;)ident(i)operator(<)ident(j)operator(;)ident(i)operator(++)operator(\)) operator({) ident(stream)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) keyword(return) ident(stream)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(quick_emit_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(block)operator(.)ident(yield)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) comment(// @JRubyMethod(name = "quick_emit_node", rest = true, module = true, visibility = Visibility.PRIVATE\)) directive(public) directive(static) ident(IRubyObject) ident(quick_emit)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) comment(// prepares IO port type for load (ported from ext/syck/rubyext.c\)) directive(private) directive(static) ident(IRubyObject) ident(check_yaml_port)operator(()ident(IRubyObject) ident(port)operator(\)) operator({) keyword(if) operator(()ident(port) keyword(instanceof) ident(RubyString)operator(\)) operator({) comment(// OK) operator(}) keyword(else) keyword(if) operator(()ident(port)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) keyword(if) operator(()ident(port)operator(.)ident(respondsTo)operator(()stringoperator(\))operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(port)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(port)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(throw) ident(port)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()stringoperator(\))operator(;) operator(}) keyword(return) ident(port)operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLHashMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(hash_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(ThreadContext) ident(context) operator(=) ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLObjectMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_to_yaml_properties)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_to_yaml_style)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(Map) ident(mep) operator(=) operator(()pre_type(Map)operator(\))operator(()keyword(new) ident(RubyHash)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) ident(RubyArray) ident(props) operator(=) operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) ident(props)operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(String) ident(m) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(mep)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_to_yaml)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(obj_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(self)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLClassMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(class_to_yaml)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) operator({) keyword(throw) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newTypeError)operator(()string operator(+) ident(self)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLArrayMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(array_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLStructMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(struct_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(Map) ident(mep) operator(=) operator(()pre_type(Map)operator(\))operator(()keyword(new) ident(RubyHash)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;)ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) ident(IRubyObject) ident(key) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(key)operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)ident(MethodIndex)operator(.)ident(AREF)operator(,) stringoperator(,) ident(key)operator(\))operator(\))operator(;) operator(}) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(String) ident(m) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(mep)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(struct_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(self)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLExceptionMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(exception_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(Map) ident(mep) operator(=) operator(()pre_type(Map)operator(\))operator(()keyword(new) ident(RubyHash)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(String) ident(m) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(mep)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(exception_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()string operator(+) ident(self)operator(.)ident(getType)operator(()operator(\))operator(.)ident(getName)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) directive(private) directive(static) directive(final) pre_type(Pattern) ident(AFTER_NEWLINE) operator(=) pre_type(Pattern)operator(.)ident(compile)operator(()stringoperator(,) pre_type(Pattern)operator(.)ident(DOTALL)operator(\))operator(;) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLStringMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(string_is_complex)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\)) operator(||) operator(()operator(()pre_type(List)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(isEmpty)operator(()operator(\)) operator(||) ident(AFTER_NEWLINE)operator(.)ident(matcher)operator(()ident(self)operator(.)ident(toString)operator(()operator(\))operator(\))operator(.)ident(find)operator(()operator(\))operator(\)) operator(?) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(string_is_binary)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(if)operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(EMPTY_P)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(return) ident(self)operator(.)ident(toString)operator(()operator(\))operator(.)ident(indexOf)operator(()stringoperator(\)) operator(!=) operator(-)integer(1) operator(?) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(private) directive(static) ident(JRubyRepresenter) ident(into)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(IRubyObject) ident(jobj) operator(=) ident(arg)operator(.)ident(getInstanceVariables)operator(()operator(\))operator(.)ident(fastGetInstanceVariable)operator(()stringoperator(\))operator(;) keyword(if)operator(()ident(jobj) operator(!=) pre_constant(null)operator(\)) operator({) keyword(return) operator(()ident(JRubyRepresenter)operator(\))operator(()operator(()operator(()ident(org)operator(.)ident(jruby)operator(.)ident(javasupport)operator(.)ident(JavaObject)operator(\))ident(jobj)operator(\))operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(string_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(Ruby) ident(rt) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(;) keyword(if)operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(rt)operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(rt)operator(.)ident(newArray)operator(()ident(self)operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(,) ident(rt)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(,) ident(rt)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) operator(}) keyword(if)operator(()operator(()operator(()pre_type(List)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(isEmpty)operator(()operator(\))operator(\)) operator({) ident(JRubyRepresenter) ident(rep) operator(=) ident(into)operator(()ident(arg)operator(\))operator(;) keyword(if)operator(()ident(rep) operator(!=) pre_constant(null)operator(\)) operator({) keyword(try) operator({) keyword(return) ident(JavaUtil)operator(.)ident(convertJavaToRuby)operator(()ident(rt)operator(,)ident(rep)operator(.)ident(scalar)operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(,)ident(self)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(,)ident(self)operator(.)ident(toString)operator(()operator(\))operator(.)ident(startsWith)operator(()stringoperator(\)) operator(?) string operator(:) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) keyword(catch)operator(()exception(IOException) ident(e)operator(\)) operator({) keyword(throw) ident(rt)operator(.)ident(newIOErrorFromException)operator(()ident(e)operator(\))operator(;) operator(}) operator(}) keyword(else) operator({) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(,) ident(self)operator(.)ident(toString)operator(()operator(\))operator(.)ident(startsWith)operator(()stringoperator(\)) operator(?) ident(rt)operator(.)ident(newString)operator(()stringoperator(\)) operator(:) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) pre_type(Map) ident(mep) operator(=) operator(()pre_type(Map)operator(\))operator(()keyword(new) ident(RubyHash)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,)ident(rt)operator(.)ident(newString)operator(()ident(self)operator(.)ident(toString)operator(()operator(\))operator(\))operator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(String) ident(m) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(mep)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLSymbolMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(symbol_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(symbol_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLNumericMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(numeric_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(String) ident(val) operator(=) ident(self)operator(.)ident(toString)operator(()operator(\))operator(;) keyword(if)operator(()stringoperator(.)ident(equals)operator(()ident(val)operator(\))operator(\)) operator({) ident(val) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if)operator(()stringoperator(.)ident(equals)operator(()ident(val)operator(\))operator(\)) operator({) ident(val) operator(=) stringoperator(;) operator(}) keyword(else) keyword(if)operator(()stringoperator(.)ident(equals)operator(()ident(val)operator(\))operator(\)) operator({) ident(val) operator(=) stringoperator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(val)operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLRangeMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(range_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) pre_type(Map) ident(mep) operator(=) operator(()pre_type(Map)operator(\))operator(()keyword(new) ident(RubyHash)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) keyword(for)operator(()pre_type(Iterator) ident(iter) operator(=) operator(()operator(()ident(RubyArray)operator(\))ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(.)ident(getList)operator(()operator(\))operator(.)ident(iterator)operator(()operator(\))operator(;) ident(iter)operator(.)ident(hasNext)operator(()operator(\))operator(;)operator(\)) operator({) pre_type(String) ident(m) operator(=) ident(iter)operator(.)ident(next)operator(()operator(\))operator(.)ident(toString)operator(()operator(\))operator(;) ident(mep)operator(.)ident(put)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(.)ident(substring)operator(()integer(1)operator(\))operator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(m)operator(\))operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) operator(()ident(IRubyObject)operator(\))ident(mep)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLRegexpMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(regexp_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLTimeMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(time_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) ident(IRubyObject) ident(tz) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(IRubyObject) ident(difference_sign) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(self) operator(=) ident(self)operator(.)ident(dup)operator(()operator(\))operator(;) keyword(if)operator(()operator(!)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(IRubyObject) ident(utc_same_instant) operator(=) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(IRubyObject) ident(utc_same_writing) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getTime)operator(()operator(\))operator(,) stringoperator(,) keyword(new) ident(IRubyObject)type([])operator({) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,)ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(})operator(\))operator(;) ident(IRubyObject) ident(difference_to_utc) operator(=) ident(utc_same_writing)operator(.)ident(callMethod)operator(()ident(context)operator(,)ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(utc_same_instant)operator(\))operator(;) ident(IRubyObject) ident(absolute_difference)operator(;) keyword(if)operator(()ident(difference_to_utc)operator(.)ident(callMethod)operator(()ident(context)operator(,)ident(MethodIndex)operator(.)ident(OP_LT)operator(,) stringoperator(,) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(difference_sign) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(absolute_difference) operator(=) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)ident(MethodIndex)operator(.)ident(OP_MINUS)operator(,) stringoperator(,) ident(difference_to_utc)operator(\))operator(;) operator(}) keyword(else) operator({) ident(difference_sign) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) ident(absolute_difference) operator(=) ident(difference_to_utc)operator(;) operator(}) ident(IRubyObject) ident(difference_minutes) operator(=) ident(absolute_difference)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(60)operator(\))operator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(;) ident(tz) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArrayNoCopy)operator(()keyword(new) ident(IRubyObject)type([])operator({)ident(difference_sign)operator(,)ident(difference_minutes)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(60)operator(\))operator(\))operator(,)ident(difference_minutes)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()integer(60)operator(\))operator(\))operator(})operator(\))operator(\))operator(;) operator(}) ident(IRubyObject) ident(standard) operator(=) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) keyword(if)operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(.)ident(isTrue)operator(()operator(\))operator(\)) operator({) ident(standard) operator(=) ident(standard)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(\))operator(\))operator(;) operator(}) ident(standard) operator(=) ident(standard)operator(.)ident(callMethod)operator(()ident(context)operator(,)ident(MethodIndex)operator(.)ident(OP_PLUS)operator(,) stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(.)ident(callMethod)operator(()ident(context)operator(,)stringoperator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(tz)operator(\))operator(\))operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(standard)operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLDateMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(date_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLTrueMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(true_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLFalseMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,) stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) ident(MethodIndex)operator(.)ident(TO_S)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) directive(static) ident(IRubyObject) ident(false_taguri)operator(()ident(IRubyObject) ident(self)operator(\)) operator({) keyword(return) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(YAMLNilMethods) operator({) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(nil_to_yaml_node)operator(()ident(IRubyObject) ident(self)operator(,) ident(IRubyObject) ident(arg)operator(\)) operator({) ident(ThreadContext) ident(context) operator(=) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(;) keyword(return) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(arg)operator(,)stringoperator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(,) ident(self)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()stringoperator(\))operator(,) ident(self)operator(.)ident(callMethod)operator(()ident(context)operator(,) stringoperator(\))operator(\))operator(;) operator(}) operator(}) operator(})comment(// RubyYAML) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2006 Ola Bini * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(java.io.InputStream)operator(;) keyword(import) include(java.io.IOException)operator(;) keyword(import) include(java.util.List)operator(;) keyword(import) include(java.util.ArrayList)operator(;) keyword(import) include(java.util.zip.GZIPInputStream)operator(;) keyword(import) include(java.util.zip.GZIPOutputStream)operator(;) keyword(import) include(org.jruby.anno.FrameField)operator(;) keyword(import) include(org.jruby.anno.JRubyMethod)operator(;) keyword(import) include(org.jruby.anno.JRubyClass)operator(;) keyword(import) include(org.jruby.anno.JRubyModule)operator(;) keyword(import) include(org.jruby.exceptions.RaiseException)operator(;) keyword(import) include(org.jruby.javasupport.util.RuntimeHelpers)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.ObjectAllocator)operator(;) keyword(import) include(org.jruby.runtime.ThreadContext)operator(;) keyword(import) include(org.jruby.runtime.Visibility)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.util.IOInputStream)operator(;) keyword(import) include(org.jruby.util.IOOutputStream)operator(;) keyword(import) include(org.jruby.util.CRC32Ext)operator(;) keyword(import) include(org.jruby.util.Adler32Ext)operator(;) keyword(import) include(org.jruby.util.ZlibInflate)operator(;) keyword(import) include(org.jruby.util.ZlibDeflate)operator(;) keyword(import) include(org.jruby.util.ByteList)operator(;) annotation(@JRubyModule)operator(()ident(name)operator(=)stringoperator(\)) directive(public) type(class) class(RubyZlib) operator({) comment(/** Create the Zlib module and add it to the Ruby runtime. * */) directive(public) directive(static) ident(RubyModule) ident(createZlibModule)operator(()ident(Ruby) ident(runtime)operator(\)) operator({) ident(RubyModule) ident(result) operator(=) ident(runtime)operator(.)ident(defineModule)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(gzfile) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(RubyGzipFile)operator(.)ident(GZIPFILE_ALLOCATOR)operator(\))operator(;) ident(gzfile)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyGzipFile)operator(.)ident(class)operator(\))operator(;) ident(RubyClass) ident(gzreader) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(gzfile)operator(,) ident(RubyGzipReader)operator(.)ident(GZIPREADER_ALLOCATOR)operator(\))operator(;) ident(gzreader)operator(.)ident(includeModule)operator(()ident(runtime)operator(.)ident(getEnumerable)operator(()operator(\))operator(\))operator(;) ident(gzreader)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyGzipReader)operator(.)ident(class)operator(\))operator(;) ident(RubyClass) ident(standardError) operator(=) ident(runtime)operator(.)ident(getStandardError)operator(()operator(\))operator(;) ident(RubyClass) ident(zlibError) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(standardError)operator(,) ident(standardError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(gzreader)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(RubyClass) ident(gzwriter) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(gzfile)operator(,) ident(RubyGzipWriter)operator(.)ident(GZIPWRITER_ALLOCATOR)operator(\))operator(;) ident(gzwriter)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyGzipWriter)operator(.)ident(class)operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(8)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(9)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(3)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(255)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(11)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(8)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(4)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(13)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(7)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(6)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(12)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(11)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(5)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(9)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(10)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(2)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(3)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(4)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(0)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(1)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()operator(-)integer(1)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(9)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineConstant)operator(()stringoperator(,)ident(runtime)operator(.)ident(newFixnum)operator(()integer(15)operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineAnnotatedMethods)operator(()ident(RubyZlib)operator(.)ident(class)operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(RubyClass) ident(gzError) operator(=) ident(gzfile)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(zlibError)operator(,) ident(zlibError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(gzfile)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(gzError)operator(,) ident(gzError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(gzfile)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(gzError)operator(,) ident(gzError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) ident(gzfile)operator(.)ident(defineClassUnder)operator(()stringoperator(,)ident(gzError)operator(,) ident(gzError)operator(.)ident(getAllocator)operator(()operator(\))operator(\))operator(;) comment(// ZStream actually *isn't* allocatable) ident(RubyClass) ident(zstream) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(,) ident(ObjectAllocator)operator(.)ident(NOT_ALLOCATABLE_ALLOCATOR)operator(\))operator(;) ident(zstream)operator(.)ident(defineAnnotatedMethods)operator(()ident(ZStream)operator(.)ident(class)operator(\))operator(;) ident(zstream)operator(.)ident(undefineMethod)operator(()stringoperator(\))operator(;) ident(RubyClass) ident(infl) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(zstream)operator(,) ident(Inflate)operator(.)ident(INFLATE_ALLOCATOR)operator(\))operator(;) ident(infl)operator(.)ident(defineAnnotatedMethods)operator(()ident(Inflate)operator(.)ident(class)operator(\))operator(;) ident(RubyClass) ident(defl) operator(=) ident(result)operator(.)ident(defineClassUnder)operator(()stringoperator(,) ident(zstream)operator(,) ident(Deflate)operator(.)ident(DEFLATE_ALLOCATOR)operator(\))operator(;) ident(defl)operator(.)ident(defineAnnotatedMethods)operator(()ident(Deflate)operator(.)ident(class)operator(\))operator(;) ident(runtime)operator(.)ident(getKernel)operator(()operator(\))operator(.)ident(callMethod)operator(()ident(runtime)operator(.)ident(getCurrentContext)operator(()operator(\))operator(,)stringoperator(,)ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(StreamEnd) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(StreamError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(BufError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(NeedDict) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(MemError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(VersionError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(DataError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(zlib_version)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyModule)operator(\))ident(recv)operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(version)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) keyword(return) operator(()operator(()ident(RubyModule)operator(\))ident(recv)operator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(crc32)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(0)operator(,)integer(2)operator(\))operator(;) type(long) ident(crc) operator(=) integer(0)operator(;) ident(ByteList) ident(bytes) operator(=) pre_constant(null)operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(bytes) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(crc) operator(=) ident(RubyNumeric)operator(.)ident(num2long)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) ident(CRC32Ext) ident(ext) operator(=) keyword(new) ident(CRC32Ext)operator(()operator(()type(int)operator(\))ident(crc)operator(\))operator(;) keyword(if) operator(()ident(bytes) operator(!=) pre_constant(null)operator(\)) operator({) ident(ext)operator(.)ident(update)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(ext)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(2)operator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(adler32)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(0)operator(,)integer(2)operator(\))operator(;) type(int) ident(adler) operator(=) integer(1)operator(;) ident(ByteList) ident(bytes) operator(=) pre_constant(null)operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(bytes) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) ident(adler) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) ident(Adler32Ext) ident(ext) operator(=) keyword(new) ident(Adler32Ext)operator(()ident(adler)operator(\))operator(;) keyword(if) operator(()ident(bytes) operator(!=) pre_constant(null)operator(\)) operator({) ident(ext)operator(.)ident(update)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) comment(// it's safe since adler.update doesn't modify the array) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(ext)operator(.)ident(getValue)operator(()operator(\))operator(\))operator(;) operator(}) directive(private) directive(final) directive(static) type(long)type([]) ident(crctab) operator(=) keyword(new) type(long)type([])operator({) integer(0L)operator(,) integer(1996959894L)operator(,) integer(3993919788L)operator(,) integer(2567524794L)operator(,) integer(124634137L)operator(,) integer(1886057615L)operator(,) integer(3915621685L)operator(,) integer(2657392035L)operator(,) integer(249268274L)operator(,) integer(2044508324L)operator(,) integer(3772115230L)operator(,) integer(2547177864L)operator(,) integer(162941995L)operator(,) integer(2125561021L)operator(,) integer(3887607047L)operator(,) integer(2428444049L)operator(,) integer(498536548L)operator(,) integer(1789927666L)operator(,) integer(4089016648L)operator(,) integer(2227061214L)operator(,) integer(450548861L)operator(,) integer(1843258603L)operator(,) integer(4107580753L)operator(,) integer(2211677639L)operator(,) integer(325883990L)operator(,) integer(1684777152L)operator(,) integer(4251122042L)operator(,) integer(2321926636L)operator(,) integer(335633487L)operator(,) integer(1661365465L)operator(,) integer(4195302755L)operator(,) integer(2366115317L)operator(,) integer(997073096L)operator(,) integer(1281953886L)operator(,) integer(3579855332L)operator(,) integer(2724688242L)operator(,) integer(1006888145L)operator(,) integer(1258607687L)operator(,) integer(3524101629L)operator(,) integer(2768942443L)operator(,) integer(901097722L)operator(,) integer(1119000684L)operator(,) integer(3686517206L)operator(,) integer(2898065728L)operator(,) integer(853044451L)operator(,) integer(1172266101L)operator(,) integer(3705015759L)operator(,) integer(2882616665L)operator(,) integer(651767980L)operator(,) integer(1373503546L)operator(,) integer(3369554304L)operator(,) integer(3218104598L)operator(,) integer(565507253L)operator(,) integer(1454621731L)operator(,) integer(3485111705L)operator(,) integer(3099436303L)operator(,) integer(671266974L)operator(,) integer(1594198024L)operator(,) integer(3322730930L)operator(,) integer(2970347812L)operator(,) integer(795835527L)operator(,) integer(1483230225L)operator(,) integer(3244367275L)operator(,) integer(3060149565L)operator(,) integer(1994146192L)operator(,) integer(31158534L)operator(,) integer(2563907772L)operator(,) integer(4023717930L)operator(,) integer(1907459465L)operator(,) integer(112637215L)operator(,) integer(2680153253L)operator(,) integer(3904427059L)operator(,) integer(2013776290L)operator(,) integer(251722036L)operator(,) integer(2517215374L)operator(,) integer(3775830040L)operator(,) integer(2137656763L)operator(,) integer(141376813L)operator(,) integer(2439277719L)operator(,) integer(3865271297L)operator(,) integer(1802195444L)operator(,) integer(476864866L)operator(,) integer(2238001368L)operator(,) integer(4066508878L)operator(,) integer(1812370925L)operator(,) integer(453092731L)operator(,) integer(2181625025L)operator(,) integer(4111451223L)operator(,) integer(1706088902L)operator(,) integer(314042704L)operator(,) integer(2344532202L)operator(,) integer(4240017532L)operator(,) integer(1658658271L)operator(,) integer(366619977L)operator(,) integer(2362670323L)operator(,) integer(4224994405L)operator(,) integer(1303535960L)operator(,) integer(984961486L)operator(,) integer(2747007092L)operator(,) integer(3569037538L)operator(,) integer(1256170817L)operator(,) integer(1037604311L)operator(,) integer(2765210733L)operator(,) integer(3554079995L)operator(,) integer(1131014506L)operator(,) integer(879679996L)operator(,) integer(2909243462L)operator(,) integer(3663771856L)operator(,) integer(1141124467L)operator(,) integer(855842277L)operator(,) integer(2852801631L)operator(,) integer(3708648649L)operator(,) integer(1342533948L)operator(,) integer(654459306L)operator(,) integer(3188396048L)operator(,) integer(3373015174L)operator(,) integer(1466479909L)operator(,) integer(544179635L)operator(,) integer(3110523913L)operator(,) integer(3462522015L)operator(,) integer(1591671054L)operator(,) integer(702138776L)operator(,) integer(2966460450L)operator(,) integer(3352799412L)operator(,) integer(1504918807L)operator(,) integer(783551873L)operator(,) integer(3082640443L)operator(,) integer(3233442989L)operator(,) integer(3988292384L)operator(,) integer(2596254646L)operator(,) integer(62317068L)operator(,) integer(1957810842L)operator(,) integer(3939845945L)operator(,) integer(2647816111L)operator(,) integer(81470997L)operator(,) integer(1943803523L)operator(,) integer(3814918930L)operator(,) integer(2489596804L)operator(,) integer(225274430L)operator(,) integer(2053790376L)operator(,) integer(3826175755L)operator(,) integer(2466906013L)operator(,) integer(167816743L)operator(,) integer(2097651377L)operator(,) integer(4027552580L)operator(,) integer(2265490386L)operator(,) integer(503444072L)operator(,) integer(1762050814L)operator(,) integer(4150417245L)operator(,) integer(2154129355L)operator(,) integer(426522225L)operator(,) integer(1852507879L)operator(,) integer(4275313526L)operator(,) integer(2312317920L)operator(,) integer(282753626L)operator(,) integer(1742555852L)operator(,) integer(4189708143L)operator(,) integer(2394877945L)operator(,) integer(397917763L)operator(,) integer(1622183637L)operator(,) integer(3604390888L)operator(,) integer(2714866558L)operator(,) integer(953729732L)operator(,) integer(1340076626L)operator(,) integer(3518719985L)operator(,) integer(2797360999L)operator(,) integer(1068828381L)operator(,) integer(1219638859L)operator(,) integer(3624741850L)operator(,) integer(2936675148L)operator(,) integer(906185462L)operator(,) integer(1090812512L)operator(,) integer(3747672003L)operator(,) integer(2825379669L)operator(,) integer(829329135L)operator(,) integer(1181335161L)operator(,) integer(3412177804L)operator(,) integer(3160834842L)operator(,) integer(628085408L)operator(,) integer(1382605366L)operator(,) integer(3423369109L)operator(,) integer(3138078467L)operator(,) integer(570562233L)operator(,) integer(1426400815L)operator(,) integer(3317316542L)operator(,) integer(2998733608L)operator(,) integer(733239954L)operator(,) integer(1555261956L)operator(,) integer(3268935591L)operator(,) integer(3050360625L)operator(,) integer(752459403L)operator(,) integer(1541320221L)operator(,) integer(2607071920L)operator(,) integer(3965973030L)operator(,) integer(1969922972L)operator(,) integer(40735498L)operator(,) integer(2617837225L)operator(,) integer(3943577151L)operator(,) integer(1913087877L)operator(,) integer(83908371L)operator(,) integer(2512341634L)operator(,) integer(3803740692L)operator(,) integer(2075208622L)operator(,) integer(213261112L)operator(,) integer(2463272603L)operator(,) integer(3855990285L)operator(,) integer(2094854071L)operator(,) integer(198958881L)operator(,) integer(2262029012L)operator(,) integer(4057260610L)operator(,) integer(1759359992L)operator(,) integer(534414190L)operator(,) integer(2176718541L)operator(,) integer(4139329115L)operator(,) integer(1873836001L)operator(,) integer(414664567L)operator(,) integer(2282248934L)operator(,) integer(4279200368L)operator(,) integer(1711684554L)operator(,) integer(285281116L)operator(,) integer(2405801727L)operator(,) integer(4167216745L)operator(,) integer(1634467795L)operator(,) integer(376229701L)operator(,) integer(2685067896L)operator(,) integer(3608007406L)operator(,) integer(1308918612L)operator(,) integer(956543938L)operator(,) integer(2808555105L)operator(,) integer(3495958263L)operator(,) integer(1231636301L)operator(,) integer(1047427035L)operator(,) integer(2932959818L)operator(,) integer(3654703836L)operator(,) integer(1088359270L)operator(,) integer(936918000L)operator(,) integer(2847714899L)operator(,) integer(3736837829L)operator(,) integer(1202900863L)operator(,) integer(817233897L)operator(,) integer(3183342108L)operator(,) integer(3401237130L)operator(,) integer(1404277552L)operator(,) integer(615818150L)operator(,) integer(3134207493L)operator(,) integer(3453421203L)operator(,) integer(1423857449L)operator(,) integer(601450431L)operator(,) integer(3009837614L)operator(,) integer(3294710456L)operator(,) integer(1567103746L)operator(,) integer(711928724L)operator(,) integer(3020668471L)operator(,) integer(3272380065L)operator(,) integer(1510334235L)operator(,) integer(755167117)operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(module) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(crc_table)operator(()ident(IRubyObject) ident(recv)operator(\)) operator({) pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(ll) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()ident(crctab)operator(.)ident(length)operator(\))operator(;) keyword(for)operator(()type(int) ident(i)operator(=)integer(0)operator(;)ident(i)operator(<)ident(crctab)operator(.)ident(length)operator(;)ident(i)operator(++)operator(\)) operator({) ident(ll)operator(.)ident(add)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(crctab)operator([)ident(i)operator(])operator(\))operator(\))operator(;) operator(}) keyword(return) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(ll)operator(\))operator(;) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) directive(abstract) type(class) class(ZStream) directive(extends) ident(RubyObject) operator({) directive(protected) type(boolean) ident(closed) operator(=) pre_constant(false)operator(;) directive(protected) type(boolean) ident(ended) operator(=) pre_constant(false)operator(;) directive(protected) type(boolean) ident(finished) operator(=) pre_constant(false)operator(;) directive(protected) directive(abstract) type(int) ident(internalTotalOut)operator(()operator(\))operator(;) directive(protected) directive(abstract) type(boolean) ident(internalStreamEndP)operator(()operator(\))operator(;) directive(protected) directive(abstract) type(void) ident(internalEnd)operator(()operator(\))operator(;) directive(protected) directive(abstract) type(void) ident(internalReset)operator(()operator(\))operator(;) directive(protected) directive(abstract) type(int) ident(internalAdler)operator(()operator(\))operator(;) directive(protected) directive(abstract) ident(IRubyObject) ident(internalFinish)operator(()operator(\)) directive(throws) exception(Exception)operator(;) directive(protected) directive(abstract) type(int) ident(internalTotalIn)operator(()operator(\))operator(;) directive(protected) directive(abstract) type(void) ident(internalClose)operator(()operator(\))operator(;) directive(public) ident(ZStream)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(flush_next_out)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(total_out)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(internalTotalOut)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(stream_end_p)operator(()operator(\)) operator({) keyword(return) ident(internalStreamEndP)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(data_type)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(fastGetConstant)operator(()stringoperator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(closed_p)operator(()operator(\)) operator({) keyword(return) ident(closed) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(ended_p)operator(()operator(\)) operator({) keyword(return) ident(ended) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(end)operator(()operator(\)) operator({) keyword(if)operator(()operator(!)ident(ended)operator(\)) operator({) ident(internalEnd)operator(()operator(\))operator(;) ident(ended) operator(=) pre_constant(true)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(reset)operator(()operator(\)) operator({) ident(internalReset)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(avail_out)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_avail_out)operator(()ident(IRubyObject) ident(p1)operator(\)) operator({) keyword(return) ident(p1)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(adler)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(internalAdler)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(finish)operator(()operator(\)) directive(throws) exception(Exception) operator({) keyword(if)operator(()operator(!)ident(finished)operator(\)) operator({) ident(finished) operator(=) pre_constant(true)operator(;) keyword(return) ident(internalFinish)operator(()operator(\))operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(avail_in)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(flush_next_in)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(total_in)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(internalTotalIn)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(finished_p)operator(()operator(\)) operator({) keyword(return) ident(finished) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) operator({) keyword(if)operator(()operator(!)ident(closed)operator(\)) operator({) ident(internalClose)operator(()operator(\))operator(;) ident(closed) operator(=) pre_constant(true)operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Inflate) directive(extends) ident(ZStream) operator({) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(INFLATE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(Inflate)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(s_inflate)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(string)operator(\)) directive(throws) exception(Exception) operator({) keyword(return) ident(ZlibInflate)operator(.)ident(s_inflate)operator(()ident(recv)operator(,)ident(string)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) directive(public) ident(Inflate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) ident(ZlibInflate) ident(infl)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(_initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(infl) operator(=) keyword(new) ident(ZlibInflate)operator(()local_variable(this)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(append)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) ident(infl)operator(.)ident(append)operator(()ident(arg)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sync_point_p)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(sync_point)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_dictionary)operator(()ident(IRubyObject) ident(arg)operator(\)) directive(throws) exception(Exception) operator({) keyword(return) ident(infl)operator(.)ident(set_dictionary)operator(()ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(inflate)operator(()ident(IRubyObject) ident(string)operator(\)) directive(throws) exception(Exception) operator({) keyword(return) ident(infl)operator(.)ident(inflate)operator(()ident(string)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(sync)operator(()ident(IRubyObject) ident(string)operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(sync)operator(()ident(string)operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalTotalOut)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(getTotalOut)operator(()operator(\))operator(;) operator(}) directive(protected) type(boolean) ident(internalStreamEndP)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(finished)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalEnd)operator(()operator(\)) operator({) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(end)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalReset)operator(()operator(\)) operator({) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(reset)operator(()operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalAdler)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(getAdler)operator(()operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(internalFinish)operator(()operator(\)) directive(throws) exception(Exception) operator({) ident(infl)operator(.)ident(finish)operator(()operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finished_p)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(finished)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalTotalIn)operator(()operator(\)) operator({) keyword(return) ident(infl)operator(.)ident(getInflater)operator(()operator(\))operator(.)ident(getTotalIn)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalClose)operator(()operator(\)) operator({) ident(infl)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Deflate) directive(extends) ident(ZStream) operator({) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(DEFLATE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(Deflate)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(s_deflate)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(1)operator(,)integer(1)operator(\))operator(;) type(int) ident(level) operator(=) operator(-)integer(1)operator(;) keyword(if)operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(level) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(return) ident(ZlibDeflate)operator(.)ident(s_deflate)operator(()ident(recv)operator(,)ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(,)ident(level)operator(\))operator(;) operator(}) directive(public) ident(Deflate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) ident(ZlibDeflate) ident(defl)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(4)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(_initialize)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(0)operator(,)integer(4)operator(\))operator(;) type(int) ident(level) operator(=) operator(-)integer(1)operator(;) type(int) ident(window_bits) operator(=) integer(15)operator(;) type(int) ident(memlevel) operator(=) integer(8)operator(;) type(int) ident(strategy) operator(=) integer(0)operator(;) keyword(if)operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(level) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(window_bits) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(args)operator([)integer(2)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(memlevel) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(2)operator(])operator(\))operator(;) operator(}) keyword(if)operator(()operator(!)ident(args)operator([)integer(3)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(strategy) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(3)operator(])operator(\))operator(;) operator(}) ident(defl) operator(=) keyword(new) ident(ZlibDeflate)operator(()local_variable(this)operator(,)ident(level)operator(,)ident(window_bits)operator(,)ident(memlevel)operator(,)ident(strategy)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(append)operator(()ident(IRubyObject) ident(arg)operator(\)) directive(throws) exception(Exception) operator({) ident(defl)operator(.)ident(append)operator(()ident(arg)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(2)operator(\)) directive(public) ident(IRubyObject) ident(params)operator(()ident(IRubyObject) ident(level)operator(,) ident(IRubyObject) ident(strategy)operator(\)) operator({) ident(defl)operator(.)ident(params)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(level)operator(\))operator(,)ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(strategy)operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_dictionary)operator(()ident(IRubyObject) ident(arg)operator(\)) directive(throws) exception(Exception) operator({) keyword(return) ident(defl)operator(.)ident(set_dictionary)operator(()ident(arg)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(flush)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) type(int) ident(flush) operator(=) integer(2)operator(;) comment(// SYNC_FLUSH) keyword(if)operator(()ident(args)operator(.)ident(length) operator(==) integer(1)operator(\)) operator({) keyword(if)operator(()operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(flush) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) operator(}) operator(}) keyword(return) ident(defl)operator(.)ident(flush)operator(()ident(flush)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(deflate)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(Exception) operator({) ident(args) operator(=) ident(Arity)operator(.)ident(scanArgs)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(args)operator(,)integer(1)operator(,)integer(1)operator(\))operator(;) type(int) ident(flush) operator(=) integer(0)operator(;) comment(// NO_FLUSH) keyword(if)operator(()operator(!)ident(args)operator([)integer(1)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(flush) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(1)operator(])operator(\))operator(;) operator(}) keyword(return) ident(defl)operator(.)ident(deflate)operator(()ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(,)ident(flush)operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalTotalOut)operator(()operator(\)) operator({) keyword(return) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(getTotalOut)operator(()operator(\))operator(;) operator(}) directive(protected) type(boolean) ident(internalStreamEndP)operator(()operator(\)) operator({) keyword(return) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(finished)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalEnd)operator(()operator(\)) operator({) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(end)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalReset)operator(()operator(\)) operator({) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(reset)operator(()operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalAdler)operator(()operator(\)) operator({) keyword(return) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(getAdler)operator(()operator(\))operator(;) operator(}) directive(protected) ident(IRubyObject) ident(internalFinish)operator(()operator(\)) directive(throws) exception(Exception) operator({) keyword(return) ident(defl)operator(.)ident(finish)operator(()operator(\))operator(;) operator(}) directive(protected) type(int) ident(internalTotalIn)operator(()operator(\)) operator({) keyword(return) ident(defl)operator(.)ident(getDeflater)operator(()operator(\))operator(.)ident(getTotalIn)operator(()operator(\))operator(;) operator(}) directive(protected) type(void) ident(internalClose)operator(()operator(\)) operator({) ident(defl)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(RubyGzipFile) directive(extends) ident(RubyObject) operator({) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(CRCError) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(NoFooter) directive(extends) exception(Error) operator({)operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(LengthError) directive(extends) exception(Error) operator({)operator(}) directive(private) directive(static) ident(IRubyObject) ident(wrap)operator(()ident(ThreadContext) ident(context)operator(,) ident(RubyGzipFile) ident(instance)operator(,) ident(IRubyObject) ident(io)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()ident(block)operator(.)ident(isGiven)operator(()operator(\))operator(\)) operator({) keyword(try) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(instance)operator(\))operator(;) keyword(return) ident(instance)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) keyword(finally) operator({) keyword(if) operator(()operator(!)ident(instance)operator(.)ident(isClosed)operator(()operator(\))operator(\)) ident(instance)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) operator(}) keyword(return) ident(io)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(wrap)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(io)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyGzipFile) ident(instance)operator(;) comment(// TODO: People extending GzipWriter/reader will break. Find better way here.) keyword(if) operator(()ident(recv) operator(==) ident(runtime)operator(.)ident(getModule)operator(()stringoperator(\))operator(.)ident(getClass)operator(()stringoperator(\))operator(\)) operator({) ident(instance) operator(=) ident(RubyGzipWriter)operator(.)ident(newGzipWriter)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(io) operator(})operator(,) ident(block)operator(\))operator(;) operator(}) keyword(else) operator({) ident(instance) operator(=) ident(RubyGzipReader)operator(.)ident(newInstance)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([]) operator({) ident(io) operator(})operator(,) ident(block)operator(\))operator(;) operator(}) keyword(return) ident(wrap)operator(()ident(context)operator(,) ident(instance)operator(,) ident(io)operator(,) ident(block)operator(\))operator(;) operator(}) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(GZIPFILE_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyGzipFile)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyGzipFile) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyGzipFile) ident(result) operator(=) operator(()ident(RubyGzipFile)operator(\)) ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(result)operator(.)ident(callInit)operator(()keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(,) ident(block)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) directive(protected) type(boolean) ident(closed) operator(=) pre_constant(false)operator(;) directive(protected) type(boolean) ident(finished) operator(=) pre_constant(false)operator(;) directive(private) type(int) ident(os_code) operator(=) integer(255)operator(;) directive(private) type(int) ident(level) operator(=) operator(-)integer(1)operator(;) directive(private) pre_type(String) ident(orig_name)operator(;) directive(private) pre_type(String) ident(comment)operator(;) directive(protected) ident(IRubyObject) ident(realIo)operator(;) directive(private) ident(IRubyObject) ident(mtime)operator(;) directive(public) ident(RubyGzipFile)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) ident(mtime) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(os_code)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(os_code)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(closed_p)operator(()operator(\)) operator({) keyword(return) ident(closed) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) directive(protected) type(boolean) ident(isClosed)operator(()operator(\)) operator({) keyword(return) ident(closed)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(orig_name)operator(()operator(\)) operator({) keyword(return) ident(orig_name) operator(==) pre_constant(null) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(orig_name)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(to_io)operator(()operator(\)) operator({) keyword(return) ident(realIo)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(comment)operator(()operator(\)) operator({) keyword(return) ident(comment) operator(==) pre_constant(null) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(newString)operator(()ident(comment)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(crc)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(mtime)operator(()operator(\)) operator({) keyword(return) ident(mtime)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(sync)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(finish)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()operator(!)ident(finished)operator(\)) operator({) comment(//io.finish(\);) operator(}) ident(finished) operator(=) pre_constant(true)operator(;) keyword(return) ident(realIo)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(return) pre_constant(null)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(level)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(level)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_sync)operator(()ident(IRubyObject) ident(ignored)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(,) ident(include)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(RubyGzipReader) directive(extends) ident(RubyGzipFile) operator({) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(Error) operator({)operator(}) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(GZIPREADER_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyGzipReader)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyGzipReader) ident(newInstance)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyGzipReader) ident(result) operator(=) operator(()ident(RubyGzipReader)operator(\))ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(result)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject) ident(filename)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(io) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,) stringoperator(,) ident(filename)operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyGzipFile) ident(instance) operator(=) ident(newInstance)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(io)operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(RubyGzipFile)operator(.)ident(wrap)operator(()ident(context)operator(,) ident(instance)operator(,) ident(io)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(RubyGzipReader)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) type(int) ident(line)operator(;) directive(private) pre_type(InputStream) ident(io)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize)operator(()ident(IRubyObject) ident(io)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) ident(realIo) operator(=) ident(io)operator(;) keyword(try) operator({) local_variable(this)operator(.)ident(io) operator(=) keyword(new) pre_type(GZIPInputStream)operator(()keyword(new) ident(IOInputStream)operator(()ident(io)operator(\))operator(\))operator(;) operator(}) keyword(catch) operator(()exception(IOException) ident(e)operator(\)) operator({) ident(Ruby) ident(runtime) operator(=) ident(io)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(RubyClass) ident(errorClass) operator(=) ident(runtime)operator(.)ident(fastGetModule)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(;) keyword(throw) keyword(new) ident(RaiseException)operator(()ident(RubyException)operator(.)ident(newException)operator(()ident(runtime)operator(,) ident(errorClass)operator(,) ident(e)operator(.)ident(getMessage)operator(()operator(\))operator(\))operator(\))operator(;) operator(}) ident(line) operator(=) integer(1)operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(rewind)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(lineno)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(line)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(readline)operator(()ident(ThreadContext) ident(context)operator(\)) directive(throws) exception(IOException) operator({) ident(IRubyObject) ident(dst) operator(=) ident(gets)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(dst)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(dst)operator(;) operator(}) directive(public) ident(IRubyObject) ident(internalGets)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) ident(ByteList) ident(sep) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(sep) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) keyword(return) ident(internalSepGets)operator(()ident(sep)operator(\))operator(;) operator(}) directive(private) ident(IRubyObject) ident(internalSepGets)operator(()ident(ByteList) ident(sep)operator(\)) directive(throws) exception(IOException) operator({) ident(ByteList) ident(result) operator(=) keyword(new) ident(ByteList)operator(()operator(\))operator(;) type(int) ident(ce) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) keyword(while) operator(()ident(ce) operator(!=) operator(-)integer(1) operator(&&) ident(sep)operator(.)ident(indexOf)operator(()ident(ce)operator(\)) operator(==) operator(-)integer(1)operator(\)) operator({) ident(result)operator(.)ident(append)operator(()operator(()type(byte)operator(\))ident(ce)operator(\))operator(;) ident(ce) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) operator(}) ident(line)operator(++)operator(;) ident(result)operator(.)ident(append)operator(()ident(sep)operator(\))operator(;) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(result)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(writes) operator(=) ident(FrameField)operator(.)ident(LASTLINE)operator(\)) directive(public) ident(IRubyObject) ident(gets)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) ident(IRubyObject) ident(result) operator(=) ident(internalGets)operator(()ident(args)operator(\))operator(;) keyword(if) operator(()operator(!)ident(result)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(context)operator(.)ident(getCurrentFrame)operator(()operator(\))operator(.)ident(setLastLine)operator(()ident(result)operator(\))operator(;) operator(}) keyword(return) ident(result)operator(;) operator(}) directive(private) directive(final) directive(static) type(int) ident(BUFF_SIZE) operator(=) integer(4096)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(read)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0) operator(||) ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(ByteList) ident(val) operator(=) keyword(new) ident(ByteList)operator(()integer(10)operator(\))operator(;) type(byte)type([]) ident(buffer) operator(=) keyword(new) type(byte)operator([)ident(BUFF_SIZE)operator(])operator(;) type(int) ident(read) operator(=) ident(io)operator(.)ident(read)operator(()ident(buffer)operator(\))operator(;) keyword(while) operator(()ident(read) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(val)operator(.)ident(append)operator(()ident(buffer)operator(,)integer(0)operator(,)ident(read)operator(\))operator(;) ident(read) operator(=) ident(io)operator(.)ident(read)operator(()ident(buffer)operator(\))operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,)ident(val)operator(\))operator(;) operator(}) type(int) ident(len) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(;) keyword(if) operator(()ident(len) operator(<) integer(0)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newArgumentError)operator(()string operator(+) ident(len) operator(+) stringoperator(\))operator(;) operator(}) keyword(else) keyword(if) operator(()ident(len) operator(>) integer(0)operator(\)) operator({) type(byte)type([]) ident(buffer) operator(=) keyword(new) type(byte)operator([)ident(len)operator(])operator(;) type(int) ident(toRead) operator(=) ident(len)operator(;) type(int) ident(offset) operator(=) integer(0)operator(;) type(int) ident(read) operator(=) integer(0)operator(;) keyword(while) operator(()ident(toRead) operator(>) integer(0)operator(\)) operator({) ident(read) operator(=) ident(io)operator(.)ident(read)operator(()ident(buffer)operator(,)ident(offset)operator(,)ident(toRead)operator(\))operator(;) keyword(if) operator(()ident(read) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(break)operator(;) operator(}) ident(toRead) operator(-=) ident(read)operator(;) ident(offset) operator(+=) ident(read)operator(;) operator(}) comment(// hmm...) keyword(return) ident(RubyString)operator(.)ident(newString)operator(()ident(getRuntime)operator(()operator(\))operator(,)keyword(new) ident(ByteList)operator(()ident(buffer)operator(,)integer(0)operator(,)ident(len)operator(-)ident(toRead)operator(,)pre_constant(false)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(RubyString)operator(.)ident(newEmptyString)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_lineno)operator(()ident(IRubyObject) ident(lineArg)operator(\)) operator({) ident(line) operator(=) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(lineArg)operator(\))operator(;) keyword(return) ident(lineArg)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pos)operator(()operator(\)) operator({) keyword(return) ident(RubyFixnum)operator(.)ident(zero)operator(()ident(getRuntime)operator(()operator(\))operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(readchar)operator(()operator(\)) directive(throws) exception(IOException) operator({) type(int) ident(value) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) keyword(if) operator(()ident(value) operator(==) operator(-)integer(1)operator(\)) operator({) keyword(throw) ident(getRuntime)operator(()operator(\))operator(.)ident(newEOFError)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(getc)operator(()operator(\)) directive(throws) exception(IOException) operator({) type(int) ident(value) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) keyword(return) ident(value) operator(==) operator(-)integer(1) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(\))operator(;) operator(}) directive(private) type(boolean) ident(isEof)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(return) operator(()operator(()pre_type(GZIPInputStream)operator(\))ident(io)operator(\))operator(.)ident(available)operator(()operator(\)) operator(!=) integer(1)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()operator(!)ident(closed)operator(\)) operator({) ident(io)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(closed) operator(=) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(eof)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(return) ident(isEof)operator(()operator(\)) operator(?) ident(getRuntime)operator(()operator(\))operator(.)ident(getTrue)operator(()operator(\)) operator(:) ident(getRuntime)operator(()operator(\))operator(.)ident(getFalse)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(eof_p)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(return) ident(eof)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(unused)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(tell)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) ident(ByteList) ident(sep) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0) operator(&&) operator(!)ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(sep) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) keyword(while) operator(()operator(!)ident(isEof)operator(()operator(\))operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(internalSepGets)operator(()ident(sep)operator(\))operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(ungetc)operator(()ident(IRubyObject) ident(arg)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(readlines)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) pre_type(List)operator(<)ident(IRubyObject)operator(>) ident(array) operator(=) keyword(new) pre_type(ArrayList)operator(<)ident(IRubyObject)operator(>)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(0) operator(&&) ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(array)operator(.)ident(add)operator(()ident(read)operator(()keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(\))operator(\))operator(;) operator(}) keyword(else) operator({) ident(ByteList) ident(seperator) operator(=) operator(()operator(()ident(RubyString)operator(\))ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(0)operator(\)) operator({) ident(seperator) operator(=) ident(args)operator([)integer(0)operator(])operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) operator(}) keyword(while) operator(()operator(!)ident(isEof)operator(()operator(\))operator(\)) operator({) ident(array)operator(.)ident(add)operator(()ident(internalSepGets)operator(()ident(seperator)operator(\))operator(\))operator(;) operator(}) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newArray)operator(()ident(array)operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(frame) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(each_byte)operator(()ident(ThreadContext) ident(context)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) type(int) ident(value) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) keyword(while) operator(()ident(value) operator(!=) operator(-)integer(1)operator(\)) operator({) ident(block)operator(.)ident(yield)operator(()ident(context)operator(,) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(value)operator(\))operator(\))operator(;) ident(value) operator(=) ident(io)operator(.)ident(read)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) operator(}) annotation(@JRubyClass)operator(()ident(name)operator(=)stringoperator(,) ident(parent)operator(=)stringoperator(\)) directive(public) directive(static) type(class) class(RubyGzipWriter) directive(extends) ident(RubyGzipFile) operator({) directive(protected) directive(static) directive(final) ident(ObjectAllocator) ident(GZIPWRITER_ALLOCATOR) operator(=) keyword(new) ident(ObjectAllocator)operator(()operator(\)) operator({) directive(public) ident(IRubyObject) ident(allocate)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(klass)operator(\)) operator({) keyword(return) keyword(new) ident(RubyGzipWriter)operator(()ident(runtime)operator(,) ident(klass)operator(\))operator(;) operator(}) operator(})operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(RubyGzipWriter) ident(newGzipWriter)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(RubyClass) ident(klass) operator(=) operator(()ident(RubyClass)operator(\))ident(recv)operator(;) ident(RubyGzipWriter) ident(result) operator(=) operator(()ident(RubyGzipWriter)operator(\))ident(klass)operator(.)ident(allocate)operator(()operator(\))operator(;) ident(result)operator(.)ident(callInit)operator(()ident(args)operator(,) ident(block)operator(\))operator(;) keyword(return) ident(result)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(optional) operator(=) integer(2)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(meta) operator(=) pre_constant(true)operator(\)) directive(public) directive(static) ident(IRubyObject) ident(open)operator(()directive(final) ident(ThreadContext) ident(context)operator(,) ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) directive(throws) exception(IOException) operator({) ident(Ruby) ident(runtime) operator(=) ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(;) ident(IRubyObject) ident(level) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) ident(IRubyObject) ident(strategy) operator(=) ident(runtime)operator(.)ident(getNil)operator(()operator(\))operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(1)operator(\)) operator({) ident(level) operator(=) ident(args)operator([)integer(1)operator(])operator(;) keyword(if) operator(()ident(args)operator(.)ident(length) operator(>) integer(2)operator(\)) ident(strategy) operator(=) ident(args)operator([)integer(2)operator(])operator(;) operator(}) ident(IRubyObject) ident(io) operator(=) ident(RuntimeHelpers)operator(.)ident(invoke)operator(()ident(context)operator(,) ident(runtime)operator(.)ident(getFile)operator(()operator(\))operator(,) stringoperator(,) ident(args)operator([)integer(0)operator(])operator(,) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(\))operator(;) ident(RubyGzipFile) ident(instance) operator(=) ident(newGzipWriter)operator(()ident(recv)operator(,) keyword(new) ident(IRubyObject)type([])operator({)ident(io)operator(,) ident(level)operator(,) ident(strategy)operator(})operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) keyword(return) ident(RubyGzipFile)operator(.)ident(wrap)operator(()ident(context)operator(,) ident(instance)operator(,) ident(io)operator(,) ident(block)operator(\))operator(;) operator(}) directive(public) ident(RubyGzipWriter)operator(()ident(Ruby) ident(runtime)operator(,) ident(RubyClass) ident(type)operator(\)) operator({) local_variable(super)operator(()ident(runtime)operator(,) ident(type)operator(\))operator(;) operator(}) directive(private) pre_type(GZIPOutputStream) ident(io)operator(;) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(,) ident(frame) operator(=) pre_constant(true)operator(,) ident(visibility) operator(=) pre_type(Visibility)operator(.)ident(PRIVATE)operator(\)) directive(public) ident(IRubyObject) ident(initialize2)operator(()ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) directive(throws) exception(IOException) operator({) ident(realIo) operator(=) operator(()ident(RubyObject)operator(\))ident(args)operator([)integer(0)operator(])operator(;) local_variable(this)operator(.)ident(io) operator(=) keyword(new) pre_type(GZIPOutputStream)operator(()keyword(new) ident(IOOutputStream)operator(()ident(args)operator([)integer(0)operator(])operator(\))operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(close)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()operator(!)ident(closed)operator(\)) operator({) ident(io)operator(.)ident(close)operator(()operator(\))operator(;) operator(}) local_variable(this)operator(.)ident(closed) operator(=) pre_constant(true)operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(append)operator(()ident(IRubyObject) ident(p1)operator(\)) directive(throws) exception(IOException) operator({) local_variable(this)operator(.)ident(write)operator(()ident(p1)operator(\))operator(;) keyword(return) local_variable(this)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(printf)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) ident(write)operator(()ident(RubyKernel)operator(.)ident(sprintf)operator(()ident(context)operator(,) local_variable(this)operator(,) ident(args)operator(\))operator(\))operator(;) keyword(return) ident(context)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(print)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(!=) integer(0)operator(\)) operator({) keyword(for) operator(()type(int) ident(i) operator(=) integer(0)operator(,) ident(j) operator(=) ident(args)operator(.)ident(length)operator(;) ident(i) operator(<) ident(j)operator(;) ident(i)operator(++)operator(\)) operator({) ident(write)operator(()ident(args)operator([)ident(i)operator(])operator(\))operator(;) operator(}) operator(}) ident(IRubyObject) ident(sep) operator(=) ident(getRuntime)operator(()operator(\))operator(.)ident(getGlobalVariables)operator(()operator(\))operator(.)ident(get)operator(()stringoperator(\))operator(;) keyword(if) operator(()operator(!)ident(sep)operator(.)ident(isNil)operator(()operator(\))operator(\)) operator({) ident(write)operator(()ident(sep)operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(pos)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_orig_name)operator(()ident(IRubyObject) ident(ignored)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_comment)operator(()ident(IRubyObject) ident(ignored)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(putc)operator(()ident(IRubyObject) ident(p1)operator(\)) directive(throws) exception(IOException) operator({) ident(io)operator(.)ident(write)operator(()ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(p1)operator(\))operator(\))operator(;) keyword(return) ident(p1)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(rest) operator(=) pre_constant(true)operator(\)) directive(public) ident(IRubyObject) ident(puts)operator(()ident(ThreadContext) ident(context)operator(,) ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) ident(RubyStringIO) ident(sio) operator(=) operator(()ident(RubyStringIO)operator(\))ident(getRuntime)operator(()operator(\))operator(.)ident(fastGetClass)operator(()stringoperator(\))operator(.)ident(newInstance)operator(()ident(context)operator(,) keyword(new) ident(IRubyObject)operator([)integer(0)operator(])operator(,) ident(Block)operator(.)ident(NULL_BLOCK)operator(\))operator(;) ident(sio)operator(.)ident(puts)operator(()ident(context)operator(,) ident(args)operator(\))operator(;) ident(write)operator(()ident(sio)operator(.)ident(string)operator(()operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) directive(public) ident(IRubyObject) ident(finish)operator(()operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()operator(!)ident(finished)operator(\)) operator({) ident(io)operator(.)ident(finish)operator(()operator(\))operator(;) operator(}) ident(finished) operator(=) pre_constant(true)operator(;) keyword(return) ident(realIo)operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(optional) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(flush)operator(()ident(IRubyObject)type([]) ident(args)operator(\)) directive(throws) exception(IOException) operator({) keyword(if) operator(()ident(args)operator(.)ident(length) operator(==) integer(0) operator(||) ident(args)operator([)integer(0)operator(])operator(.)ident(isNil)operator(()operator(\)) operator(||) ident(RubyNumeric)operator(.)ident(fix2int)operator(()ident(args)operator([)integer(0)operator(])operator(\)) operator(!=) integer(0)operator(\)) operator({) comment(// Zlib::NO_FLUSH) ident(io)operator(.)ident(flush)operator(()operator(\))operator(;) operator(}) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(set_mtime)operator(()ident(IRubyObject) ident(ignored)operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(\)) directive(public) ident(IRubyObject) ident(tell)operator(()operator(\)) operator({) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(getNil)operator(()operator(\))operator(;) operator(}) annotation(@JRubyMethod)operator(()ident(name) operator(=) stringoperator(,) ident(required) operator(=) integer(1)operator(\)) directive(public) ident(IRubyObject) ident(write)operator(()ident(IRubyObject) ident(p1)operator(\)) directive(throws) exception(IOException) operator({) ident(ByteList) ident(bytes) operator(=) ident(p1)operator(.)ident(convertToString)operator(()operator(\))operator(.)ident(getByteList)operator(()operator(\))operator(;) ident(io)operator(.)ident(write)operator(()ident(bytes)operator(.)ident(unsafeBytes)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(begin)operator(()operator(\))operator(,) ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) keyword(return) ident(getRuntime)operator(()operator(\))operator(.)ident(newFixnum)operator(()ident(bytes)operator(.)ident(length)operator(()operator(\))operator(\))operator(;) operator(}) operator(}) operator(}) comment(/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.0 (the "License"\); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C\) 2002 Jan Arne Petersen * Copyright (C\) 2002-2004 Anders Bengtsson * Copyright (C\) 2004 Thomas E Enebo * Copyright (C\) 2004 Stefan Matthias Aust * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"\), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"\), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/) keyword(package) ident(org)operator(.)ident(jruby)operator(;) keyword(import) include(org.jruby.runtime.Arity)operator(;) keyword(import) include(org.jruby.runtime.Block)operator(;) keyword(import) include(org.jruby.runtime.builtin.IRubyObject)operator(;) keyword(import) include(org.jruby.runtime.callback.Callback)operator(;) comment(/** * * @author jpetersen */) directive(public) directive(final) type(class) class(TopSelfFactory) operator({) comment(/** * Constructor for TopSelfFactory. */) directive(private) ident(TopSelfFactory)operator(()operator(\)) operator({) local_variable(super)operator(()operator(\))operator(;) operator(}) directive(public) directive(static) ident(IRubyObject) ident(createTopSelf)operator(()directive(final) ident(Ruby) ident(runtime)operator(\)) operator({) ident(IRubyObject) ident(topSelf) operator(=) keyword(new) ident(RubyObject)operator(()ident(runtime)operator(,) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(\))operator(;) ident(topSelf)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) comment(/** * @see org.jruby.runtime.callback.Callback#execute(IRubyObject, IRubyObject[]\) */) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(newString)operator(()stringoperator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.callback.Callback#getArity(\) */) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(noArguments)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) comment(// The following three methods must be defined fast, since they expect to modify the current frame) comment(// (i.e. they expect no frame will be allocated for them\). JRUBY-1185.) ident(topSelf)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastPrivateMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) comment(/** * @see org.jruby.runtime.callback.Callback#execute(IRubyObject, IRubyObject[]\) */) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(block)operator(\)) operator({) ident(runtime)operator(.)ident(secure)operator(()integer(4)operator(\))operator(;) keyword(return) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(include)operator(()ident(args)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.callback.Callback#getArity(\) */) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(optional)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(topSelf)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastPrivateMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) comment(/** * @see org.jruby.runtime.callback.Callback#execute(IRubyObject, IRubyObject[]\) */) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(rbPublic)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.callback.Callback#getArity(\) */) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(optional)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) ident(topSelf)operator(.)ident(getSingletonClass)operator(()operator(\))operator(.)ident(defineFastPrivateMethod)operator(()stringoperator(,) keyword(new) pre_type(Callback)operator(()operator(\)) operator({) comment(/** * @see org.jruby.runtime.callback.Callback#execute(IRubyObject, IRubyObject[]\) */) directive(public) ident(IRubyObject) ident(execute)operator(()ident(IRubyObject) ident(recv)operator(,) ident(IRubyObject)type([]) ident(args)operator(,) ident(Block) ident(unusedBlock)operator(\)) operator({) keyword(return) ident(runtime)operator(.)ident(getObject)operator(()operator(\))operator(.)ident(rbPrivate)operator(()ident(recv)operator(.)ident(getRuntime)operator(()operator(\))operator(.)ident(getCurrentContext)operator(()operator(\))operator(,) ident(args)operator(\))operator(;) operator(}) comment(/** * @see org.jruby.runtime.callback.Callback#getArity(\) */) directive(public) ident(Arity) ident(getArity)operator(()operator(\)) operator({) keyword(return) ident(Arity)operator(.)ident(optional)operator(()operator(\))operator(;) operator(}) operator(})operator(\))operator(;) keyword(return) ident(topSelf)operator(;) operator(}) operator(})