JavaResolver.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 28 Jan 2015 03:12:08 +0100
branchcvs_MAIN
changeset 3360 1a8899091305
parent 3324 a58245c0e83a
child 3412 df11bb428463
permissions -rw-r--r--
Merged with mercurial revision cb6c15e66be (594 changesets total) Merged changesets: - 69af63cd04a3: Jan Vrany, 2013-09-06 10:36 +0100: Added JarFileTests to test signed jars. - d87e89dd5276: Jan Vrany, 2013-09-10 10:34 +0100: Removed packages from subProjects, makefiles uodated. - 13f5be2bf83b: Jan Vrany, 2013-09-15 01:44 +0100: Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD) - 7d1a1fb5b01a: Jan Vrany, 2013-09-15 02:16 +0100: Merged 272689c14005 and 13f5be2bf83b. - 3d97124aebf5: Jan Vrany, 2013-09-16 01:04 +0100: Fixes for syntax highlighting. - f56049613ff3: Jan Vrany, 2013-09-16 14:09 +0100: Initial support for live code checker / lint. - e20dd8496371: Jan Vrany, 2013-09-17 11:22 +0100: Initial support for source code indexing (for semi-modal navigation) - 7cb269d572d3: Jan Vrany, 2013-09-17 12:19 +0100: Added link to Jenkins. - 83f8416e153c: Jan Vrany, 2013-09-20 02:03 +0100: Cleanup. Change source API in `Java` to return stream rather than string. - a633a2e8e67e: Jan Vrany, 2013-09-20 02:13 +0100: Make sure eclipse Parser is initialized before actually start parsing. - b34398d8856b: Jan Vrany, 2013-09-20 10:56 +0100: Bugfix: JavaClass>>source: check for missing source. - 5c458398e060: Jan Vrany, 2013-09-20 10:57 +0100: Fixes for JavaLintService/Highlighter: correctly flush previous problems... - a9ac61c2c454: Jan Vrany, 2013-09-21 05:23 +0100: Fixes for Java syntax highlighting and checking. - 8ff7a8f45a9f: Jan Vrany, 2013-09-22 10:33 +0100: Fix in JavaClassReloader: do not transfer compiler problems... - 0db3e311a7e7: Jan Vrany, 2013-09-22 19:32 +0100: - JavaMethodDeclarationNode - 7c283887f8c4: Jan Vrany, 2013-09-22 19:35 +0100: Fixes. - 08ef7d05987b: Jan Vrany, 2013-09-23 10:03 +0100: Update JavaLintService after rename of SmallSense::SyntaxHighlightingService... - ba792256b173: Jan Vrany, 2013-09-24 00:11 +0100: Added initial version of Jabber Client demo application. - 718fab8ca4cf: Jan Vrany, 2013-09-24 01:56 +0100: Do not load libj2pcks11.so/dll but do not bark when it's loaded. - d68db9271133: Jan Vrany, 2013-09-24 01:59 +0100: Removed examples/jabber from subprojects. - ddc68c69915a: Jan Vrany, 2013-09-24 12:45 +0100: Improvements for Java code navigation. - bf52a1e5701b: Jan Vrany, 2013-09-25 10:27 +0100: Support for implementors/senders menu. - 825b27484850: Jan Vrany, 2013-09-25 16:11 +0100: Added JavaPackage>>#compiler / #source methods... - f5f21ffdbfd9: Jan Vrany, 2013-09-26 09:11 +0100: More fixes for semi-modal navigation. - 18d2c83ecb3c: Jan Vrany, 2013-09-26 09:15 +0100: Added parse tree inspector tab to JavaSourceDocument to ease debugging. - 7638771efcbe: Jan Vrany, 2013-09-28 01:49 +0100: Fix in JavaClass>>source. - bdabb1cf8408: Jan Vrany, 2013-10-01 14:17 +0100: Some more fixes for semi-modal navigation. - 1b698ca5f0fd: Jan Vrany, 2013-10-01 23:36 +0100: More fixes for semi-modal navigation - 4756cc015954: Jan Vrany, 2013-10-02 00:59 +0100: Fix in JavaSourceDocument>>#inspector2TabParseTreeInspector - added missing notNil - 09774212044f: Jan Vrany, 2013-10-02 12:31 +0100: Another fix for semimodal navigation - d82859be4462: Marcel Hlopko, 2013-09-10 00:11 +0200: remove findResolvedStaticValue from JavaFieldRef2, not used anymore - 3d4c32e21475: Marcel Hlopko, 2013-09-10 00:14 +0200: add JavaClass>>canCacheReferences - fc8ef16dcb5c: Marcel Hlopko, 2013-09-12 23:43 +0200: add JavaClass>>hasMultipleVersions - fa96e547c9a5: Marcel Hlopko, 2013-09-12 23:44 +0200: set cleanCacheFlag in JavaFieldRef when multiple java class versions present - b097de8f18b1: Marcel Hlopko, 2013-09-12 23:47 +0200: merge heads - ad96da73c612: Marcel Hlopko, 2013-09-12 23:53 +0200: merge heads - 630363041ceb: Marcel Hlopko, 2013-09-13 22:11 +0200: tiny refactoring - e3092c16bcce: Marcel Hlopko, 2013-09-19 23:24 +0200: add cleanCacheFlag to JavaFieldRef2 - 7cdd959123dd: Marcel Hlopko, 2013-09-20 00:10 +0200: fix reloading tests (now they fail where expected) - c6f2c3b4a45b: Marcel Hlopko, 2013-09-22 21:12 +0200: merge heads - 2158564a90d1: Marcel Hlopko, 2013-10-01 22:58 +0200: temporarily add JavaConstantPool>>invalidateReferencesForClass - 6659925a80a4: Marcel Hlopko, 2013-10-01 23:06 +0200: tiny fix in reloading tests - 66f842986836: Marcel Hlopko, 2013-10-02 22:07 +0200: cleanup multiple Java class versions handling - 06599146279d: Marcel Hlopko, 2013-10-02 23:33 +0200: fix JavaClassReloader>>invalidate - 7d5ffec2f654: Marcel Hlopko, 2013-10-02 23:35 +0200: run ObjectMemory>>garbageCollect before and after each Java reloading test - 0216e0808608: Jan Vrany, 2013-10-03 15:30 +0100: Bugfix: Added missing JavaSocket>>timeout: - 241e36a125a9: Jan Vrany, 2013-10-03 17:36 +0100: Added java support code for stx:libjava/libtool - d4914ffbb0cf: Jan Vrany, 2013-10-03 20:07 +0100: Fix in JavaSourceHighlighter: save full tree in sourceIndex. - b25c8b9e886a: Jan Vrany, 2013-10-04 08:59 +0100: Highlighter cleanup, addes support for Groovy. - e6109bd7dfd2: Jan Vrany, 2013-10-04 12:22 +0100: Problem highlighting optimization/cleanup. - b530c3f48cd3: Jan Vrany, 2013-10-04 12:49 +0100: Changed display string for Java methods. - 6a57107d168a: Jan Vrany, 2013-10-04 17:02 +0100: Improvement in interop/java extensions. - 662204c99509: Jan Vrany, 2013-10-05 00:57 +0100: Oops, fixed interop for extensions defined on interfaces. - f3cfee185a72: Jan Vrany, 2013-10-05 01:01 +0100: Fix for GroovyEvaluator - cec025d0f359: Jan Vrany, 2013-10-05 01:11 +0100: Oops, fix for resolving. - 92ae91b29303: Jan Vrany, 2013-10-05 01:27 +0100: Added some common collection methods to java.util.Collection... - f0c1243363d8: Jan Vrany, 2013-10-05 01:50 +0100: Improvement in GroovyEvaluator: add receiver's instance variables to accessible variables. - 6936cde374d2: Jan Vrany, 2013-10-05 23:36 +0100: Fix in Java parser: set source level to 1.6 or 1.7 depending on running system. - 2fdee4f9e146: Jan Vrany, 2013-10-05 23:37 +0100: Added Java files required by interop tests. - b2fa940b8184: Jan Vrany, 2013-10-06 00:01 +0100: Fixed tests JavaFieldRefTests>>testCorrectResolving - 24e508459735: Jan Vrany, 2013-10-06 00:03 +0100: Merged 2fdee4f9e146 (tools support and fixes) and 7d5ffec2f654 (multivers fixes) - 62c767616a13: Jan Vrany, 2013-10-06 22:37 +0100: Fixed stupid bug in JavaFieldRef2 (did not correctly set type to R_DOUBLE for double fields) - b9c510a2234e: Jan Vrany, 2013-10-06 22:39 +0100: Merged 62c767616a13 and 24e508459735 - ba98473322b9: Jan Vrany, 2013-10-07 11:06 +0100: Fix in JavaToolbox>>#displayStringForSelector:in:withClassName: - 43370b378bf9: Jan Vrany, 2013-10-07 11:27 +0100: Added lost extension MessageSend>>navigateToUsing: - c4bd856eeb26: Jan Vrany, 2013-10-07 11:29 +0100: Oops, fixed MessageSend>>navigateToUsing: extension. Sigh... - 41d1af53f1eb: Jan Vrany, 2013-10-07 11:54 +0100: Fix in JavaVM>>standardThreadGroup - 46f6ef83cce6: Jan Vrany, 2013-10-07 19:16 +0100: More extensions for List - 13b4f59e3b0a: Jan Vrany, 2013-10-08 07:05 +0100: Fixes in parsing/highlighting. - e3b939ba5a5d: Jan Vrany, 2013-10-08 09:25 +0100: Fix in JavaSourceDocument>>initializeSourceRefsInMethods - match methods using their descriptors... - 7072f7fb65f6: Jan Vrany, 2013-10-08 09:28 +0100: Support for generic (parametrized) types in source indexer. - 8542f6311dcc: Jan Vrany, 2013-10-08 10:02 +0100: Merged 7072f7fb65f6 and e3b939ba5a5d - 7cd5e50a6c5a: Jan Vrany, 2013-10-08 11:13 +0100: Load java extension methods silently. - b00543ba4599: Jan Vrany, 2013-10-08 14:06 +0100: Added #first, #second, ... extensions to the List interface - 342fbc21cc23: Jan Vrany, 2013-10-08 14:08 +0100: Small fix in JavaMethod>>argAndVarNamesInContext: - 1c7b69664136: Jan Vrany, 2013-10-08 18:04 +0100: Fixes in JavaSourceHighlighter: - 681e5db578ad: Jan Vrany, 2013-10-08 19:16 +0100: Cleanup - remove old tools (parsers/parse nodes...) - 4b819ed57eeb: Jan Vrany, 2013-10-09 11:30 +0100: Oops, cleanup commit swept way to much. Restored Java extension containers for AST nodes. - 6d3bac6f72c7: Jan Vrany, 2013-10-09 23:37 +0100: Fix in stx.libjava.tools.text.Highligter - do not override parseClassBodyDeclarations()... - 7fb4ad65d417: Jan Vrany, 2013-10-09 23:38 +0100: build.xml files fixed. - 6fa1bcf9c997: Jan Vrany, 2013-10-10 00:08 +0100: JavaClass>>#name vs. #binaryName refactoring - 881eb22c2724: Jan Vrany, 2013-10-10 01:03 +0100: Bugfix in JavaClass>>nameSpaceName: all classes loaded by primordial, ext or system class loader should go to JAVA namespace. - 36f000314bcd: Jan Vrany, 2013-10-10 10:42 +0100: Fix in mixed exception handling. - 5157d3aea2c5: Jan Vrany, 2013-10-10 10:49 +0100: Merged 6fa1bcf9c997 (classname refactoring) and 7fb4ad65d417 (main) - 16c497edc69d: Jan Vrany, 2013-10-10 10:50 +0100: Merged 5157d3aea2c5 and 36f000314bcd (mixed exception handling fix) - d4ebf2a7c399: Jan Vrany, 2013-10-10 11:00 +0100: Merged 16c497edc69d and 881eb22c2724 (fix in JavaClass>>nameSpaceName - 5ea0697eef5f: Jan Vrany, 2013-10-10 11:25 +0100: Hack for old VM JavaClass>>binaryName:numStatic: - 96f3e2254489: Marcel Hlopko, 2013-10-08 19:02 +0200: remove JavaConstantPool#ConstantPools weak array, use JavaVM registry instead - 9e7d690fdc68: Marcel Hlopko, 2013-10-10 16:53 +0200: add blank requestRecompile & requestReload methods - 06e68d6098db: Jan Vrany, 2013-10-10 16:48 +0100: Added JavaObject>#instanceOf: - 90bcc3f41a0a: Jan Vrany, 2013-10-11 10:16 +0100: Merged 06e68d6098db and 9e7d690fdc68 (Marcel's fixes) - e4f0dcc42f4a: Jan Vrany, 2013-10-11 11:33 +0100: Fixed logging of monitor-related events - honour JavaVM.MonitorTrace flag. - 3680bdc3ef00: Jan Vrany, 2013-10-11 18:34 +0100: Merged 5ea0697eef5f and e4f0dcc42f4a (monitor trace fixes) - 76893aac6a7e: Marcel Hlopko, 2013-10-12 15:53 +0200: add JavaFieldRef>>reresolveForVersion: javaClass - 1ab75f8aa9de: Marcel Hlopko, 2013-10-12 18:10 +0200: small cleanup - ad2948878d56: Marcel Hlopko, 2013-10-12 18:13 +0200: fix stupid test and voila - hierarchy tests passing :) - 751597d0526a: Marcel Hlopko, 2013-10-12 21:01 +0200: do not migrate instances when type of the field is generalized - d030cf717ca2: Marcel Hlopko, 2013-10-12 21:03 +0200: temporarily ignore type inconsistencies on return values - 6d2d593cb29e: Marcel Hlopko, 2013-10-12 21:52 +0200: rename reresolveForVersion to resolveForVersion - cace5e1f84f3: Marcel Hlopko, 2013-10-13 12:04 +0200: experimenting with fieldRef resolving for particular class version - a31c3f2902d7: Marcel Hlopko, 2013-10-13 12:31 +0200: jv please revide, I probably broke something and this only fixes a symptom. - b9fadb7c9a1f: Marcel Hlopko, 2013-10-13 14:54 +0200: move resolveForVersion moved to JavaClassRef2 - a141e4ea784d: Marcel Hlopko, 2013-10-13 16:22 +0200: ensure JavaClassRef2>>resolveForVersionOf:or: chooses class specified by the reference - 83f90bb755e8: Marcel Hlopko, 2013-10-13 16:23 +0200: fix hierarchy reloading test so it is type safe. - 853c11fe1ce8: Marcel Hlopko, 2013-10-13 20:55 +0200: wire in requestRecompile sends - c62aa3987316: Marcel Hlopko, 2013-10-13 20:56 +0200: fix another field reloading tests - 36690c744edb: Marcel Hlopko, 2013-10-13 21:11 +0200: fix field visibility reloading text so surprising behavior is even more visible - and CALLING FOR HELP :) - 47083445aaf9: Jan Vrany, 2013-10-14 08:45 +0100: Merged 3680bdc3ef00 and 36690c744edb (Marcel's reloading fixes) - 095a83d77fe3: Jan Vrany, 2013-10-14 15:18 +0100: Added #creator for mixed exception handling. - ca49798e0a5d: Jan Vrany, 2013-10-14 19:11 +0100: More fixes for new naming scheme - cfd4ec1ffa22: Jan Vrany, 2013-10-14 23:17 +0100: Reverted back Marcel's change in JavaCompiler: pass plain Smalltalk string. - 7d803d440e44: Jan Vrany, 2013-10-14 23:18 +0100: Fix in JavaClassReloaderTests>>register: (send #binaryName instead of #name) - 10c0fcf2d304: Jan Vrany, 2013-10-14 23:29 +0100: Fix JavaClassReloader for new naming (#name -> #binaryName) - 3a85f55763e2: Jan Vrany, 2013-10-15 02:33 +0100: Implemented JavaClassReloader>>#requestReload & #requestRecompile (part 1) - af4e7f1dd33e: Jan Vrany, 2013-10-15 02:34 +0100: Implemented JavaClassReloader>>#requestReload & #requestRecompile (part 3) - 192833bfdba1: Jan Vrany, 2013-10-15 15:30 +0100: Implemented stx.libjava.tools.environment.Environment.cleanup() - 3d942fb39104: Jan Vrany, 2013-10-15 15:31 +0100: Removed eclipse-runtime from stx:libjava/libs dependencies... - 7bd41088bd64: Jan Vrany, 2013-10-15 17:58 +0100: Fix in JavaCompiler>>#compile:register:notifying: (send #binaryName instead of #name) - c330ff3eb374: Jan Vrany, 2013-10-15 23:40 +0100: Fix in JavaClassReloader (recompilation) - 50b4916dd8d2: Jan Vrany, 2013-10-16 01:20 +0100: Fixes for Java method tracing/counting. - 916f3eedc505: Jan Vrany, 2013-10-16 09:09 +0100: Fix in JavaClassReloader - when updating class, also update attributes and annotations. - d92f88db7514: Jan Vrany, 2013-10-16 10:05 +0100: Improved JavaClassReader to read InnerClasses and MissingTypes attributes. - 1eaa3f10540b: Jan Vrany, 2013-10-16 10:48 +0100: Removed JavaSingleClassReloaderTests, tests merged in JavaClassReloaderTests. - 90724c4fa7f8: Jan Vrany, 2013-10-16 14:15 +0100: Fix to recompile erroneous classes upon reload. - 4b11c2089443: Jan Vrany, 2013-10-17 02:02 +0100: Removed obsolete tests... - b8187695c8cd: Jan Vrany, 2013-10-17 02:05 +0100: Added JavaMethod>>#interpretWithReceiver:arguments: - 948160ac3435: Jan Vrany, 2013-10-17 02:24 +0100: Fix in JavaCompiler>>#recompile: when recompiling, use class's original class loader. - 3ed529d88338: Jan Vrany, 2013-10-17 11:11 +0100: Recompilation fixed (avoid endless recursion) - 3084c43f20a1: Jan Vrany, 2013-10-18 16:54 +0100: Introduced GroovyScanner with support for Groovy-only tokens... - e62187297585: Jan Vrany, 2013-10-18 16:55 +0100: Fix in JavaSourceDocument - care for types with no method declarations - d8458cc3aabe: Jan Vrany, 2013-10-19 17:38 +0100: Make JavaVM>>#loadClassesIn: to work with .jar files as well. - 7bcde178eee7: Jan Vrany, 2013-10-20 00:07 +0100: Fix in JavaSourceHighlighter: do full highlighting for applications spawn from the debugger. - 5f7f5fca111a: Jan Vrany, 2013-10-21 08:31 +0100: Fix stx.libjava.tools.Source#getFileName(): always return a name to avoid NPE. - 83a135e3ef74: Jan Vrany, 2013-10-21 08:32 +0100: Call CompilationUnitDeclaration#analyseCde() to perform flow analysis... - a4c9642a6a67: Jan Vrany, 2013-10-21 10:39 +0100: Bugfix in JavaScannerBase>>:syntaxError:position:to: - raise ParseError. - dc03c9cd404a: Jan Vrany, 2013-10-22 00:07 +0100: Optimization in JavaLintService: cache language of the code view in an instvar. - 781c4bed22d0: Jan Vrany, 2013-10-22 03:44 +0100: Added JavaScannerBase>>#tokenName for compativility with smalltalk Scanner. - a284a338f355: Jan Vrany, 2013-10-22 14:57 +0100: Fixed a very. very nasty bug in wait(). - 64b02ee49807: Jan Vrany, 2013-10-22 18:50 +0100: Addes synchronization in JavaClass>>classInit. - 38bc44ad0f95: Jan Vrany, 2013-10-22 23:21 +0100: More fixes after Java class name refactoring. - 2f98edaf6aba: Jan Vrany, 2013-10-23 00:49 +0100: Removed JavaContext>>#argsAndVars - context inspector should show `this` as well. - 5b492b74975f: Jan Vrany, 2013-10-23 10:50 +0100: Bugfix in JavaMethod>>lineNumber (missing return) - a988e67e4dea: Jan Vrany, 2013-10-23 12:25 +0100: Fix in native java.lang.Class#forName0() - 96f3d8a73343: Jan Vrany, 2013-10-24 23:19 +0100: Fixed JavaLintService>>#unregister - break dependencies when unregistering - 60ed1d160ea5: Jan Vrany, 2013-10-26 17:56 +0100: Fix in JavaClassReloader - ignore non-Java methods when recompiling users of removed method. - 80bc02e62077: Jan Vrany, 2013-10-26 18:05 +0100: - JavaClassReloader - 272f9a99e3db: Jan Vrany, 2013-10-26 21:29 +0100: Fix in JavaSourceHighlighter::Indexer - allow for null variable binding. - 75e3fb8a615f: Jan Vrany, 2013-10-27 09:43 +0000: Fix in JavaSourceHighlighter>>doLexicalHighlightingOnly: care for window groups with no main view - 70df89fe0af0: Jan Vrany, 2013-10-27 10:28 +0000: Fix in JavaSourceDocument>>#initializeSourceRefsInMethods - 20d65bcdae80: Jan Vrany, 2013-10-28 10:42 +0000: Refactored JavaObject>>#doesNotUnderstand: refacttored to provide better UX in debugger - 1dbc311e1d74: Jan Vrany, 2013-10-28 11:29 +0000: Bugfix JavaClassReloader: handle missing/mis-spelled classes. - 894e894aa511: Jan Vrany, 2013-10-28 11:39 +0000: Fix in JavaClassReloader>>updateOldClass: update old method only if class of the method is the same. - edaa0c80646e: Marcel Hlopko, 2013-10-28 15:36 +0100: fix JavaBehavior>>hasMultipleVersions - 21a756977e9f: Marcel Hlopko, 2013-10-28 15:37 +0100: add Java reloading tests - fields in parent, GCing unused class versions - ec6e8825f168: Jan Vrany, 2013-10-31 07:53 -0300: Fix in stx.libjava.tools.text.Highlighter: do not try resolve fields when binding is null. - b7070e447ed0: Jan Vrany, 2013-11-05 17:52 +0000: Fixes for displaying local variables in debugger. - 89c09ec6e109: Jan Vrany, 2013-11-06 23:31 +0000: Fix for JavaTestsLoader (after JavaClass>>name refactoring) - 8005b7c3e51a: Jan Vrany, 2013-11-06 23:33 +0000: Fix in stx.libjava.tools.text.Highlighter: do not try resolve QualifiedNameReference when binding is null - 3a7d18c7fe40: Jan Vrany, 2013-11-06 23:40 +0000: Merged 8005b7c3e51a and 21a756977e9f - 3dd946439657: Jan Vrany, 2013-11-07 18:48 +0000: Fix in JavaClass>>#javaUnwrap: care for nil/null. - 503761e88b38: Jan Vrany, 2013-11-08 10:11 +0000: Fixes for Mauve tests. - 064418faa2e3: Jan Vrany, 2013-11-11 09:48 +0000: Another pass over Mauve tests. - 2fae1fd966be: Jan Vrany, 2013-11-11 17:27 +0000: Added JavaRelease>>system which uses default system Java installation. - f6e83cfb4d0f: Jan Vrany, 2013-11-11 21:20 +0000: Added natives required by OpenJDK 7, update 25. - 69560c0ea583: Jan Vrany, 2013-11-11 21:32 +0000: Oops, fix in JavaNativeMethodImpl_OpenJDK6>>invoke:receiver:arguments:context:constructor: - a38c23f77e42: Jan Vrany, 2013-11-11 22:05 +0000: Fixed native java.io.*FileSystem#createFileExclusively - 7d69859368db: Jan Vrany, 2013-11-11 22:33 +0000: Oops, fixed mispelled arg name in JavaNativeMethodImpl_OpenJDK6. - 1f4c3054998c: Jan Vrany, 2013-11-12 01:31 +0000: Native java.lang.Object#clone() refactored to use ACX_CLOENABLE flag. - ac252847cc04: Jan Vrany, 2013-11-12 02:14 +0000: Oops, fix in isCloneable - if ACX_CLONEABLE is not set, always check interfaces. - 3d8a63dbf6dd: Jan Vrany, 2013-11-12 11:17 +0000: Oops, fix for JavaClass>>isCloneable - handle subclasses of a class that implements Cloneable. - e634189c444e: Jan Vrany, 2013-11-13 11:13 +0000: Another pass over java.io.* natives. Fixes for OpenJDK 7. - e2fc5ead5542: Jan Vrany, 2013-11-14 01:25 +0000: Fix in Float/LargeInteger>>javaBox: - d4ef0fe45599: Jan Vrany, 2013-11-14 12:06 +0000: Fix in JUnitTestCaseProxy>>#testSelectors. - 36e0682339ed: Jan Vrany, 2013-11-14 23:24 +0000: Fixed natives to convert float/double to int/long bits and other way around... - 85ccd41f883c: Jan Vrany, 2013-11-14 14:50 -0800: Fixes and (void) natives for shared-memory JDI transport. - 9fd2ea0570fe: Jan Vrany, 2013-11-15 11:01 +0000: Merged 36e0682339ed and 85ccd41f883c - 0be6bc618029: Jan Vrany, 2013-11-15 15:17 +0000: When accessing Java source in .har, try uncompress it using ZipArchive first... - 0479c114bcc0: Jan Vrany, 2013-11-15 22:39 +0000: Merged 9fd2ea0570fe and 0be6bc618029 - a77c05c8cd68: Jan Vrany, 2013-11-15 23:00 +0000: Fix in JavaVM for exception debugging. - 223fb480e1fb: Jan Vrany, 2013-11-15 23:01 +0000: Fix for OpenJDK7 native _java_util_zip_ZipFile_getEntryBytes:_: _: _: - b8295c72dd53: Jan Vrany, 2013-11-18 14:00 +0000: Added tests for FREM/DREM and ?AND and ?OR. - 08a14f3553a2: Jan Vrany, 2013-11-18 14:53 +0000: Fix in JavaVM>>#unpark: (typo) - b919ffd3d2a6: Jan Vrany, 2013-11-18 22:08 +0000: Fixed classpath for stx:libjava/libs eclipse project (removed obsolete libs) - 8c690545a18d: Jan Vrany, 2013-11-18 23:04 +0000: Fix in JavaCodeLibrary>>classPathOn: - allow for sources-only libraries. - e215dba1f0fb: Jan Vrany, 2013-11-18 23:07 +0000: Fix in JavaClassReader for concurrent access to zipa archives. - 54787b966373: Jan Vrany, 2013-11-18 23:08 +0000: Added Java code bundle with Tomcat sources to ease debugging. - 7c556b58cd4b: Jan Vrany, 2013-11-19 00:44 +0000: Fixes in ApacheTomcat6 (misspelled class name) + build files regenerated - 969166ba9c7c: Jan Vrany, 2013-11-19 00:45 +0000: Merged 7c556b58cd4b and 08a14f3553a2 - 1fc9ae49376d: Jan Vrany, 2013-11-19 00:46 +0000: Merged 969166ba9c7c and 54787b966373 - 7a439bd8ae5b: Jan Vrany, 2013-11-19 10:01 +0000: Added JavaCompilerForSmalltalkExtensionsOnly for environments without full JavaCompiler... - 65d127f0c9c1: Jan Vrany, 2013-11-19 10:20 +0000: Fix in interop - make sure the class is initialized when invoking static method. - c464794e5fa2: Jan Vrany, 2013-11-19 11:29 +0000: Added signal handlers to ApacheTomcat6 startup class. - 3f4853b3c30d: Jan Vrany, 2013-11-20 10:00 +0000: Calls to fdlim functions embedded into natives, JavaMathSupport removed. - 451954b79f93: Jan Vrany, 2013-11-20 10:42 +0000: Fixes for Tomcat 6 startup. - c342efcd1bcb: Jan Vrany, 2013-11-20 16:13 +0000: Oops, added missing class JavaCompilerForSmalltalkExtensionsOnly. - c39cbf09ea3d: Jan Vrany, 2013-11-20 16:40 +0000: Fixes for Java reflection on Smalltalk classes. - cc9cf6c073bd: Jan Vrany, 2013-11-20 16:41 +0000: Merged c342efcd1bcb and c39cbf09ea3d - d0b831020baa: Jan Vrany, 2013-11-20 17:31 +0000: Fixes for Tomcat example: allow Workspace WEBAPP to run without JavaScript loaded. - 98971af93e31: Jan Vrany, 2013-11-20 23:45 +0000: Fix in JavaVM>>#initializeSystemPropertiesInto: be careful when initializing stx.libjava.tests... - 5f8f0ac505a5: Jan Vrany, 2013-11-22 10:33 +0000: Fix in JavaClassReader>>#readClass:from:ignoring: (fix wrong code for zar refcounting) - e5fc3aaad7a2: Jan Vrany, 2013-11-23 10:19 +0000: Build support files for tomcat6 laucnher fixed - af30789878ce: Jan Vrany, 2013-11-26 21:19 +0000: Temporary class loading race-condition workaround. - 448a12efa893: Jan Vrany, 2013-11-26 21:21 +0000: Fix in Mauve DoubleTest. - ec1be126d72e: Jan Vrany, 2013-11-26 23:04 +0000: Fixes in Java source highlighting - boot Java if not already. - 590fd4bf22a8: Jan Vrany, 2013-11-27 00:29 +0000: Hack in JavaSourceHighlighter for JImport expecco plugin. - ff6465e92d95: Jan Vrany, 2013-12-03 00:17 +0000: Flush JavaClassRegistry's notifier when flushing classes. - 7c542571c7c1: Jan Vrany, 2013-12-03 00:37 +0000: Added interop tests for constructors. - f5b13d9b249b: Jan Vrany, 2013-12-03 01:14 +0000: Added all stubs for native methods from recent OpenJDK 6. - 55692310d4e6: Jan Vrany, 2013-12-06 22:10 +0000: Fix in JavaVM>>monitorEnter:in: inflate thinlock using #getMonitor. - 17be352f0130: Jan Vrany, 2013-12-08 00:41 +0000: Added lockWord to JavaBehavior to enable thinlocking for static methods and resolver. - 02b58c7079ac: Jan Vrany, 2013-12-08 22:36 +0000: Added JavaObject>>synchronized: and JavaClass>>synchronized: - bbd626006ab0: Jan Vrany, 2013-12-09 23:52 +0000: Access to ZipEntryCache synchronized to avoid races. - 3e837849ce3e: Jan Vrany, 2013-12-10 10:46 +0000: Bugfix: fixed premature freeing of zip entry causing zip entry. - d133d35e293b: Jan Vrany, 2013-12-10 22:33 +0000: Class loading refactoring (part 1) - 86e181f74199: Jan Vrany, 2013-12-10 23:04 +0000: Class loading refactoring (part 2) - 83d32dc4fcea: Jan Vrany, 2013-12-10 23:20 +0000: Class loading refactoring (part 3) - 2397022c7057: Jan Vrany, 2013-12-12 15:30 +0000: Bugfix in JavaRelease::OracleJDK7>>validateJavaHome2: - 7c3b2a89f173: Jan Vrany, 2013-12-18 00:02 +0100: Use system class loader when loading class for JavaClassAccessor. - bac7022ca26a: Jan Vrany, 2013-12-18 12:03 +0100: Merged 7c3b2a89f173 and 80a1a085a982 (branch performance-optimizations) - afd174546057: Jan Vrany, 2013-12-18 14:52 +0100: Post-merge fixes. - 8ffaaa45f964: Jan Vrany, 2013-12-23 22:49 +0100: Fix in Java>>flushClasses: do not use Smalltalk>>removeKey: - d4963adcb114: Jan Vrany, 2013-12-23 22:59 +0100: Added JavaClass>>synchronized: that uses thinlocks. - 38f0943c97a4: Jan Vrany, 2013-12-23 23:14 +0100: Fix in JavaRef2>>#resolve: resolving is now synchronized on class. - c9408352a572: Jan Vrany, 2014-01-07 13:44 +0100: Fix in JavaClass>>#perform:onReceiver:from:ifNotFound: pass selector/sender when evaluatinh method using Method>>valueWith:... - a44d1fa11204: Jan Vrany, 2014-01-14 09:49 +0000: Fix in JavaSourceHighlighter>>#formatClassDefinition:in: - care for formatting class side... - 3d6c08acf4cd: Jan Vrany, 2014-01-18 11:43 +0000: Fixed native #_sun_reflect_Reflection_getCallerClass:_: to work with new JIT compilation scheme. - 64ec2085e797: Jan Vrany, 2014-01-18 21:42 +0000: Better printOn: / printString: fpr JavaMethodRef2 - 36b5b06398b5: Jan Vrany, 2014-01-18 21:44 +0000: Fix in ByteArray>>_CHECKCAST:/_INSTANCEOF: (typo/copy paste error) - ec1f7113fac0: Jan Vrany, 2014-01-18 21:47 +0000: Added _INVOKE*R: methods used by new JIT compiler. - a384a02381c0: Jan Vrany, 2014-01-20 14:04 +0000: Update JavaLookup to work with new JIT-compilation scheme... - c3005d991df7: Jan Vrany, 2014-01-20 14:06 +0000: JavaRef2>>invalidate/invalidateForClass: moved from experiments to stx:libjava - f44a7499454b: Jan Vrany, 2014-01-20 15:11 +0000: Added _GETFIELD_R:_:/ _GETSTATIC_R: / _PUTFIELD_R:_:_: / _PUTSTATIC_R:_: (used by new JIT code) - c69ab7aefc53: Jan Vrany, 2014-01-20 23:08 +0000: Fixed _GETSTATIC_R: / _PUTSTATIC_R: - initialize class if not already. - 604d4f079e66: Jan Vrany, 2014-01-21 11:28 +0000: Fix in JavaClass>>basicNew initialize class if not already. - 5c86c719a79b: Jan Vrany, 2014-01-21 14:44 +0000: Fix in JavaLookup::Smalltalk2Java: match Unicode16/32String to java.lang.String when calling Java method from Smalltalk. - 673487527490: Jan Vrany, 2014-01-22 15:02 +0000: Fix in JUnitTestCaseProxy>>performTest. - 3947e2e8f8d9: Jan Vrany, 2014-01-22 15:28 +0000: Added new native JavaNativeMethodImpl_OpenJDK6>>#_java_lang_Class_getDeclaringClass0: - 3f59f05b601e: Jan Vrany, 2014-01-23 16:16 +0000: Added tests from GETFIELD/PUTFIELD and INVOKE*. - 369b56b7f766: Jan Vrany, 2014-01-23 23:10 +0000: Merged 3f59f05b601e and 64ec2085e797 - 6b521f99c43b: Jan Vrany, 2014-01-27 14:00 +0000: Moved JavaCompilerTests to stx:libtool. - 1badaa4fa024: Jan Vrany, 2014-01-28 11:23 +0000: Added support for new MULTIANEWARRAY implementation. - ed6c057accab: Jan Vrany, 2014-01-28 11:23 +0000: Added tests for MULTIANEWARRAY instruction - 593add70a2cd: Jan Vrany, 2014-01-28 14:43 +0000: Added _MULTIANEWARRAY* methods to suppott new MULTIANEWARRAY implementation. - 21011804a910: Jan Vrany, 2014-01-29 17:27 +0000: Fixed _GETFIELD_R: / _PUTFIELD_R: to throw NPE when an object is nil. - c45e84ee0baf: Jan Vrany, 2014-01-30 23:40 +0000: Fix in method ref: initialize class if not already, removed breakpoints... - 732f9db2a195: Jan Vrany, 2014-01-31 09:19 +0000: Cleanup & refactoring of constant pool references (JavaRef2 hierarchy) - ed8cd8e5a16d: Jan Vrany, 2014-01-31 12:41 +0000: Added JavaBooleanArray to represent boolean[]. - 53644e5c7d2b: Jan Vrany, 2014-01-31 17:17 +0000: Rename __ACC_BREAKPNT to __ACX_BREAKPNT, there's no such constant in JVM spec. - 4f0cd5c93d1b: Jan Vrany, 2014-02-03 09:25 +0000: Fixed some java.io.WinNT/Win32FileSystem natives. - 7472dbd72ef7: Jan Vrany, 2014-02-05 09:08 +0000: Fixed native _java_net_Inet4AddressImpl_lookupAllHostAddr:_: - 7702920fa03a: Jan Vrany, 2014-02-05 14:01 +0100: Added tests for reflection on arrays. More tests for shift instructions. - 220f5d25933a: Jan Vrany, 2014-02-05 15:13 +0100: Merged 7702920fa03a and 1badaa4fa024 - fe87c228905c: Jan Vrany, 2014-02-05 15:22 +0100: Merged 220f5d25933a and 7472dbd72ef7 - 08d798b4ef80: Jan Vrany, 2014-02-05 16:26 +0100: Added run-all.rb scrip to run all tests on several different configurations - a80a2d7fc0e1: Jan Vrany, 2014-02-05 16:28 +0100: Added XMPP Chat example (shown at Smalltalks 2013) - c1ec15d94457: Marcel Hlopko, 2014-01-25 21:35 +0100: fix javaHome for oracle-7 - c9f0019485ff: Marcel Hlopko, 2014-01-25 21:47 +0100: get rid of old mh breakpoint - 659fb25645b0: Marcel Hlopko, 2014-01-26 17:15 +0100: fix constant pool content tests - 394676d5c68e: Marcel Hlopko, 2013-12-12 16:42 +0100: fix typo in JavaRelease - c1c82d3baae7: Jan Vrany, 2014-02-06 10:38 +0100: Use Ant+Ivy instead of Maven to download libraries in stx:libjava/libs - 8fcf6cde056e: Jan Vrany, 2014-02-06 10:45 +0100: Merged c1c82d3baae7 and 394676d5c68e - 414e6567b574: Jan Vrany, 2014-02-06 10:48 +0100: Merged 8fcf6cde056e and 659fb25645b0 - 024e71f1142e: Jan Vrany, 2014-02-06 11:10 +0100: Merged Claus's Java release definition for OS X into JavaRelease::AppleJDK6. - 8b3f1f16a660: Jan Vrany, 2014-02-06 14:06 +0100: Fix in JavaRelease::AppleJDK6 - removed JavaVMData pool - 7ff48afbef00: Jan Vrany, 2014-02-07 09:07 +0100: Fixes in natives for non-TRADITIONAL_STACK machines. - c04668cd040d: Jan Vrany, 2014-02-07 09:49 +0100: Natives cleaned up a bit. - e7c286435bfe: Jan Vrany, 2014-02-11 16:29 +0000: Fixed tests'run-all.rb to run under Windows as well. - 39a55d1baeff: Jan Vrany, 2014-02-11 20:21 +0000: Yet another cleanup of java.io.FileSystem mess. - 506844f3740e: Jan Vrany, 2014-02-11 21:52 +0000: Reduced dimensions on MULTIANEWARRAY#test_incomplete_02 to avoid 2-pass compressing GC. - 31dc5184bf9a: Jan Vrany, 2014-02-12 10:30 +0000: Workaround in JavaRelease::OpenJDK7>>searchForSourcePath for Debian boxes. - 93a610491bf8: Jan Vrany, 2014-02-12 11:10 +0000: Fixes in java.io,Win32FileSystem - added listDrives0() native. - e2137bf62524: Jan Vrany, 2014-02-12 12:39 +0000: Fix in JUnit/TestletTestCaseProxy. - 2efe1601724c: Jan Vrany, 2014-02-12 15:37 +0000: Merged 31dc5184bf9a and e2137bf62524 - aed7115ce6e8: Jan Vrany, 2014-02-12 20:47 +0000: Fix in JavaRelease::OpenJDK6>>searchForSourcePath. - 3bc512cb6649: Jan Vrany, 2014-02-12 21:28 +0000: Branch development merged into default. - f17a68612f53: Jan Vrany, 2014-02-13 08:54 +0000: Fake-merged bdf545540de0 into 3bc512cb6649 to get rid of second head. - 5f69bed172fe: Jan Vrany, 2014-02-17 15:22 +0100: Fix in JavaRelease::AppleJDK6 - should be available only on OS X. - 590aa6c3cb24: Jan Vrany, 2014-02-19 10:21 +0000: Improvements and fixes in GroovyEvaluator. - b5001e1fb06c: Jan Vrany, 2014-02-20 22:54 +0000: More compatibility extensions for java.util.List - a7a3fdc9d6b7: Jan Vrany, 2014-02-25 17:01 +0000: Fixes in java.util.List>>indexOf: & identityIndexOf: - 36a4e9ab4d00: Jan Vrany, 2014-03-04 13:36 +0000: Skip all workspace tests in GroovyEvaluatorTests when there's no display connection... - 66e0970661db: Jan Vrany, 2014-03-04 17:03 +0000: Removed #preRequisites, build files regenerated. - 366b8f64dc45: Jan Vrany, 2014-03-07 00:20 +0000: Eclipse projects updated. - 31ddc9aa291d: Jan Vrany, 2014-03-18 11:32 +0100: Fix in JavaRelease>>system for UNIX-like systems. - e924b175ca61: Jan Vrany, 2014-03-19 11:12 +0000: Added ThreadStopTests to tests execution abortion. - ff90519ce3ac: Jan Vrany, 2014-03-19 11:48 +0000: Interop tests refactoring. - 7a326f9f8aad: Jan Vrany, 2014-03-19 17:44 +0000: Bug fix in interop with respect to overloaded methods in subclasses. - 40beb6dad64f: Jan Vrany, 2014-03-20 14:13 +0000: Eclipse projects cleanup - b25792751803: Tomáš Heger, 2014-03-19 05:32 +0100: First implementation of ClassFileScanner. - 135c3202c5b7: Tomáš Heger, 2014-03-19 23:43 +0100: ClassFileScanner fixed, tests added. - 08238e0175ae: Tomáš Heger, 2014-03-20 10:52 +0100: Major version number verifying added. - f08a8f57d43b: Jan Vrany, 2014-03-20 14:39 +0000: Merged 08238e0175ae and 40beb6dad64f (Tom's ClassFileScanner) - 3ac5c037b13d: Jan Vrany, 2014-03-20 14:43 +0000: Fixed stx.libjava.tools.compiler.CompilerError initialization problem. - 74535b57b370: Jan Vrany, 2014-03-21 13:25 +0000: Make internal JVM processes to form a new provess group on Smalltalk VM level. - 033e56844dc9: Jan Vrany, 2014-03-25 15:36 +0000: Fixes to for JDI debugger. - d23f94ac7fd5: Jan Vrany, 2014-03-31 12:05 +0200: Made non-ASCII literals encoded using \uXXXX rather than using direct UTF8 in .java sources. - 36df3896ac57: Jan Vrany, 2014-04-01 13:41 +0200: Fixed JavaReleaser>>JDK6/JDK7 - eae56960a120: Jan Vrany, 2014-04-01 14:40 +0200: Oops, fixed syntax error (missing dot) - 642c961ea130: Jan Vrany, 2014-04-02 16:19 +0200: Fix in JavaRelease::SunJDK122. - 7e5ad1b76629: Jan Vrany, 2014-04-03 12:38 +0200: Initial stubs for Java 8 - 10b7a8f2e23c: Jan Vrany, 2014-04-03 21:00 +0200: Change JavaRelease to use output of `java -version` when validating Java installation directory. - fd92dea7b142: Jan Vrany, 2014-04-04 13:10 +0200: Bugfix in JavaVM>>initializeVM: do not deadlock caller if VM initialization failed. - cec6d766280e: Jan Vrany, 2014-04-08 09:34 +0200: Workaround for JAVA NameSpace (from Java bridge) vs JAVA JavaPackage (from STX:LIBJAVA) - ccf0bb9b983b: Jan Vrany, 2014-04-08 14:59 +0200: JavaRelease>>inDirectory refactored to not hard-code relative paths to java executable within JRE/JDK. - 824804a0ae03: Jan Vrany, 2014-04-08 16:28 +0200: Added extension java.util.Collection#anElement - f252b6759c9e: Jan Vrany, 2014-04-08 19:16 +0200: Fixed DNU in JavaReleaseTests - d64f0b5cc383: Jan Vrany, 2014-04-09 08:37 +0200: Oops, fixed condition in skipIf: in JavaReleaseTests - a3f6e540a232: Jan Vrany, 2014-04-09 10:00 +0200: Keep source along with parse tree index. - 3ac1f611b373: Jan Vrany, 2014-04-09 14:30 +0200: Fixes in GroovyLanguage - fcbadfecc4d7: Jan Vrany, 2014-04-09 17:14 +0200: Updated Groovy to 2.1.1. Download Groovy and JUnit using IVY. - dd7f7a54107b: Jan Vrany, 2014-04-09 17:29 +0200: .hgignore improved - 8c0339f8c175: Jan Vrany, 2014-04-09 18:41 +0200: Fixes for groovy. - 4bbacafb9592: Jan Vrany, 2014-04-09 18:54 +0200: Renamed JavaClassRegistry>>classesDo: to allClassesDo: - a65f7a72b3bf: Jan Vrany, 2014-04-09 21:53 +0200: JavaCodeBundle>>standardPackageBundleFor: improved - a29506c02dcc: Jan Vrany, 2014-04-10 09:04 +0200: Minor fixes in start/stop position for local/type declaration nodes. - 3f6f3b935c17: Jan Vrany, 2014-04-10 10:10 +0200: Fixed unimplemented native java.lang.reflect.Array.get() - 7145c825db68: Jan Vrany, 2014-04-10 15:39 +0200: More work on java.lang.reflect.Array natives. - f22d5febda61: Jan Vrany, 2014-04-11 18:20 +0200: Introduced a JavaClassEnvironment - an abstract namespace-like class to keep Java classes. - 7c91a4227264: Tomáš Heger, 2014-04-04 11:38 +0200: Added the ".metadata" directory. - a6feb6da5718: Tomáš Heger, 2014-04-14 11:34 +0200: Initial implementation of a dumper of IBinaryType objects. - 92d7ca788f14: Tomáš Heger, 2014-04-14 11:35 +0200: Initial (and incomplete) implementation of Reflective* classes. - 642396977525: Tomáš Heger, 2014-04-14 12:09 +0200: Various fixes (including Honza's) regarding Reflective* classes. - a60e7d264dc2: Tomáš Heger, 2014-04-14 13:27 +0200: Unused code commented out. - db83cc770144: Tomáš Heger, 2014-04-14 13:37 +0200: Returning correct names fixed. - 7cb0df30d317: Tomáš Heger, 2014-04-14 14:38 +0200: test_06 fixed - f44978fc1abd: Jan Vrany, 2014-04-15 13:51 +0200: Added #hash and #= to JavaCodeLibraryOrBundle. - 718746a2ac28: Claus Gittinger, 2014-04-13 16:53 +0200: - JavaRelease - 76a10700c053: Claus Gittinger, 2014-04-15 01:04 +0200: - JavaObject - aa8989bbd454: Claus Gittinger, 2014-04-15 01:08 +0200: - JavaNativeMethodImpl_OpenJDK6 - eba90d210e65: Claus Gittinger, 2014-04-15 01:21 +0200: - JavaNativeMethodImpl_OpenJDK6 - 375c8ea59bad: Jan Vrany, 2014-04-15 19:01 +0200: Merged f44978fc1abd and eba90d210e65 - df5a76fdd3a6: Jan Vrany, 2014-04-15 22:22 +0200: Changed display string of JavaRelease. - e35f2fac0337: Jan Vrany, 2014-04-16 08:59 +0200: Improved JavaCodeBundle>>standardPackageBundleFor: to support layout with separated tests... - 4fbf1e915fdd: Claus Gittinger, 2014-04-16 14:28 +0200: - GroovyEvaluator - 51c43574dc90: Claus Gittinger, 2014-04-16 15:57 +0200: - JavaRelease - 99f84ab46898: Claus Gittinger, 2014-04-16 18:27 +0200: - JavaNativeMethodImpl_OpenJDK6 - ccde6af7278c: Claus Gittinger, 2014-04-16 18:53 +0200: JavaContext: - 88ad88fdeca5: Jan Vrany, 2014-04-16 19:32 +0200: Merged df5a76fdd3a6 and ccde6af7278c - 54211576c9ce: Claus Gittinger, 2014-04-16 20:14 +0200: JavaClassRef2: - 08ec1ceb01e7: Claus Gittinger, 2014-04-16 21:17 +0200: JavaLanguage: - 78e1d19eb584: Jan Vrany, 2014-04-17 07:45 +0200: Fixed JavaCompiler>>synchronizationSemaphore. - 9d79b824c1ad: Claus Gittinger, 2014-04-17 10:13 +0200: JavaRelease: - 7eef27e37553: Jan Vrany, 2014-04-17 11:56 +0200: Fixed path to Groovy jars in ant build files. - 35b8520c46f2: Jan Vrany, 2014-04-17 12:53 +0200: Oops, more fixes to ant build files. - 7bb1f4106033: Jan Vrany, 2014-04-17 16:20 +0200: Cherry-picked changes from 35b8520c46f2. - c49c94053695: Jan Vrany, 2014-04-17 16:34 +0200: Moved CompilerAdapterTests.java to tools/java/src-tests. - 5d7c92ab734b: Jan Vrany, 2014-04-17 20:16 +0200: Fixed JavaRelease class>>system - 388adc0de925: Jan Vrany, 2014-04-22 16:32 +0200: Fix in JavaClassEnvironment>>at:ifAbsent: - b1192955f5a3: Jan Vrany, 2014-04-22 22:37 +0200: Fixed native _java_lang_ClassLoader_defineClass1: _: _: _: _: _: _: _: - 158c061202f3: Jan Vrany, 2014-04-22 22:41 +0200: Merged 388adc0de925 and b1192955f5a3 - c37c50e0aa5a: Jan Vrany, 2014-04-27 21:00 +0100: Fix in containsMethodsAnnotatedWith: - do not compare binary names, compare superclasses - ebf6ad1545af: Claus Gittinger, 2014-04-30 20:29 +0200: source code access fixed for apple: - 19a2b75907ce: Claus Gittinger, 2014-04-30 22:02 +0200: new native - cf2d8949d5a5: Jan Vrany, 2014-05-05 10:10 +0100: Better coding style of JavaClass/JavaBehaviour>>setInterfaces: - 446b34b9a386: Jan Vrany, 2014-05-12 17:34 +0100: Fixed GroovyScanner w.r.t ''' multiline comments. - c0d467b37565: Jan Vrany, 2014-05-13 11:49 +0100: Changed supeclass of JavaClassEnvironment to SystemEnvironment. - a7d69709920f: Jan Vrany, 2014-05-14 00:07 +0100: Use lexical highlighting when JVM is not booted. - c4709bcca97a: Jan Vrany, 2014-05-14 16:36 +0100: Bugfix in JavaScanner - correctly handle dot a the end of input. - 7cc116da75e8: Jan Vrany, 2014-05-18 13:11 +0100: Added 'def' to keywords. - e53888146940: Jan Vrany, 2014-05-20 17:57 +0100: Added support for new constants used bu JSR 272 Invoke dynamic. - d1d41053a1c8: Jan Vrany, 2014-05-21 11:22 +0100: Mark all classes in stx:libjava/benchmark as obsolete. - 6d8f66f1ff39: Jan Vrany, 2014-05-21 16:56 +0100: [Class reader optimization 1/3]: Added JavaBenchmarkClassReader - 2c747ca6078d: Jan Vrany, 2014-05-21 17:10 +0100: [JavaClassReader optimization 2/3]: add methods at once instead of individually. - 3119ced5d03c: Jan Vrany, 2014-05-21 21:08 +0100: [JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor: - b442904eec25: Jan Vrany, 2014-05-23 22:26 +0100: Moved Context>>arg1Index to stx:libbasic. - 1f8c991bc1d2: Jan Vrany, 2014-05-27 12:49 +0100: Variaous optimizations in string manipulatios to speed up class reading. - 3cdcaf15c918: Jan Vrany, 2014-05-27 13:18 +0100: Merged 1f8c991bc1d2 and b442904eec25 - 819926f83b48: Tomáš Heger, 2014-04-14 15:46 +0200: Occurences of "assertTrue(false)" replaced by "fail()" in the tests. Useless catch block removed from test_06. - 3e12320cb6c7: Tomáš Heger, 2014-05-22 02:01 +0200: Fields, annotations and tag bits implemented. - 54d901dba381: Tomáš Heger, 2014-05-22 03:25 +0200: Generic signature dumping fixed (wrong use of the delimiter). - 84a135e483a6: Tomáš Heger, 2014-05-27 16:34 +0200: Added testcase for the ReflectiveField.getConstant() method. - d73feaf2aecc: Tomáš Heger, 2014-05-27 16:37 +0200: ReflectiveField.getConstant() implemented. It's not working yet though - any attempt to get value of a field throws IllegalAccessException. - 6451ff1e43cf: Tomáš Heger, 2014-05-27 16:55 +0200: Anonymous inner classes aren't being returned by the ReflectiveType.getMemberTypes() method anymore. - 2720184478b7: Jan Vrany, 2014-05-30 08:55 +0100: Fix in ReflectiveField.getConstant() - make field accessible if it is not. - e4470b7efc3b: Jan Vrany, 2014-05-30 09:03 +0100: Made ReflectiveField.getConstant() return always NotAConstant. - b63dbae22813: Jan Vrany, 2014-05-30 09:04 +0100: Moved CompilerAdapterTests to from src to src-tests - ba69147aea97: Jan Vrany, 2014-06-02 14:54 +0100: Better error message for VM-thrown ArrayStoreException. - e4b35ecfc645: Jan Vrany, 2014-06-02 14:58 +0100: Oops. remove Context>>arg1Index from extensions list. - c09dc2c6937b: Jan Vrany, 2014-06-02 16:38 +0200: Fix in JavaRelease - correctly detect OpenJDK6 on Linux. - ffe44966a226: Jan Vrany, 2014-06-02 15:56 +0100: Merged e4b35ecfc645 and c09dc2c6937b - 546aadb1fee1: Jan Vrany, 2014-06-02 18:30 +0200: Implemented sun.net.PortConfig.getLower0/getHigher0 natives. - b4fa505f93c5: Jan Vrany, 2014-06-04 09:52 +0100: Increated timeout for JUnit/Testlet tests. - 93cf25f66530: Jan Vrany, 2014-06-04 10:30 +0100: Do not create JavaClassAccessor for `JAVA java lang Object`-style class references. - cc0ea0656186: Jan Vrany, 2014-06-12 12:12 +0100: Fixed bug #77: Ignore unhandled ThreadDeath exceptions. - c1a47c6796fc: Jan Vrany, 2014-06-12 16:07 +0100: Increated per-process stack size limit for Groocy 2.x.x - 81791eb890eb: Jan Vrany, 2014-06-13 08:43 +0100: Bugfix in GroovyEvaluator: properly wrap primitive values. - 553b1c08b6b1: Jan Vrany, 2014-06-13 15:46 +0100: Bugfix in JavaLintService>>unregister: call super unregister at the end of the unregister method. - 012cc8eddb86: Jan Vrany, 2014-06-25 11:03 +0100: Use Semaphore>>waitWithTimeoutMs:state: instead of copy'paste version of waitWithTimeoutMs: - 4eaeba9fa910: Jan Vrany, 2014-06-25 13:58 +0100: Java source highlughter refactoring. - 72765a504e7c: Tomáš Heger, 2014-06-03 22:13 +0200: Removed unused imports. - a0139792a8cd: Tomáš Heger, 2014-06-03 22:17 +0200: Methods usable to actually dump IBinaryTypes added to IBinaryDumper -> it's executable now. Output directory is expected as the first argument, names of the classes to be dumped as the following arguments. - f25781926cca: Tomáš Heger, 2014-06-24 00:53 +0200: IBinaryDumper modified so it can dump classes from jar files. It accepts an arbitrary number of parameters - the first one is supposed to be a directory used for output and the rest are supposed to be class names and/or jar files. - e7b9ceda9923: Jan Vrany, 2014-07-02 17:53 +0100: Make ReflectiveType#getSuperclassName() to return java.lang.Object for interfaces. - fb9e5936daec: Jan Vrany, 2014-07-02 17:58 +0100: Do not dump properties known to differ for ReflectiveType and ClassReader by default. - 490a1b914f93: Jan Vrany, 2014-07-02 23:09 +0100: Renamed IBinaryDumper to BinaryDumper as I prefix denotes interface. - ade0060d3c12: Jan Vrany, 2014-07-08 12:55 +0100: Added tag expecco_2_7_0 for changeset 4eaeba9fa910 - ee329fef15db: Jan Vrany, 2014-07-10 13:54 +0100: Merged 490a1b914f93 and e35f2fac0337 - 2f2937ea3f03: Jan Vrany, 2014-07-10 16:48 +0100: Merged ade0060d3c12 and ee329fef15db - defac61e541c: Jan Vrany, 2014-07-07 23:48 +0100: stx.libjava.tools.environment.Environment.java cleanup. - 4dbc3b22d078: Jan Vrany, 2014-07-08 00:16 +0100: Fix in Environment#isPackage() - conservatively return true. - 04c5d3e67c13: Jan Vrany, 2014-07-11 16:42 +0100: Fixed ReflectiveMethod#getGenericSignature() for constructors. - e683134b3617: Jan Vrany, 2014-07-11 16:44 +0100: BinaryDumper improvements - 3aa14b90dacd: Jan Vrany, 2014-07-15 13:07 +0100: Removed code for flushing shared compiler Environment. - f041babfda85: Claus Gittinger, 2014-05-09 15:06 +0200: fixed apple-jdk searchForSourcePath (should return strings, - 7f36435f79c9: Claus Gittinger, 2014-05-29 13:12 +0200: comment characters - 36bab0a3c02b: Claus Gittinger, 2014-05-29 13:14 +0200: comment strings - f9fe8892084a: Claus Gittinger, 2014-05-29 20:31 +0200: comment strings - e8002e2c2fd9: cg, 2014-07-10 16:34 +0200: no message - a37928cf9a1b: cg, 2014-07-10 16:45 +0200: Merge - 47fda38729e0: Claus Gittinger, 2014-07-10 16:46 +0200: merge - 8f159d8e0749: Claus Gittinger, 2014-07-10 16:47 +0200: merge - b95b1843ab38: Claus Gittinger, 2014-07-18 18:30 +0200: filename vs. string - 0d4ba716d325: Jan Vrany, 2014-07-19 10:32 +0100: Merged 3aa14b90dacd and b95b1843ab38 - 21134786ad33: Jan Vrany, 2014-07-13 22:02 +0100: Environment renamed to ReflectiveEnvrionment to match naming of other classes. - 3ae04adf796f: Jan Vrany, 2014-07-19 02:01 +0100: Oops, fixed ReflectiveType#getGenericSignature() - 770c76797564: Jan Vrany, 2014-07-20 02:41 +0100: ReflectiveEnvironment#isPackage() refactored to scan classpath for packages. - fb5aefff7ae5: Jan Vrany, 2014-07-20 21:46 +0100: ReflectiveEnvironmnt#isPackage() now consult a list of classes loaded by given ClassLoader. - fb47f223848a: Jan Vrany, 2014-07-24 20:56 +0100: Merged 0d4ba716d325 and fb5aefff7ae5 - 26dd7e06c4bb: Jan Vrany, 2014-07-24 21:18 +0100: Removed classFileBytes from JavaClass. - a95e78d1d7dc: Jan Vrany, 2014-07-25 00:08 +0100: Speed optimization in ReflectiveEnvironment#isPackage() - 87cedea6290e: Jan Vrany, 2014-07-25 00:51 +0100: Got rid of JavaZipSupport. Inflater/Deflater made public. - 243dcc6b3220: Jan Vrany, 2014-07-25 01:52 +0100: Optimized java.util.zip.ZipFile#getNextEntry() - 79cde29be713: Jan Vrany, 2014-07-25 09:23 +0100: Another speed optimization in ReflectiveEnvironment#isPackage() - 99e1b2bde5de: Jan Vrany, 2014-07-25 09:53 +0100: Fix in JavaMapInspectorView (use #binaryName instead of #name) - d7978de50434: Jan Vrany, 2014-07-25 10:08 +0100: For Java objects, use standars Java toString() as value string in inspectors. - a80e78c59918: Jan Vrany, 2014-07-25 10:11 +0100: Make JavaClass>>nameWithoutNameSpacePrefix returning the lastName. - 19acb606dd69: Jan Vrany, 2014-07-28 11:49 +0100: Merged 79cde29be713 and a80e78c59918 - 2d3e5574157a: Jan Vrany, 2014-07-28 21:17 +0100: Removed jdtcore from stx:libjava/benchmark dependencies. - a725721c7855: Jan Vrany, 2014-07-28 22:40 +0100: Fix in JavaSyntaxHighlighter - resolve types even if class does not exist yet. - 3611c3493dbc: Jan Vrany, 2014-07-28 23:49 +0100: Introduced package annotation stx.libjava.annotations.Package. - 9003a9074b2c: Jan Vrany, 2014-07-30 16:34 +0100: Renamed ReflectiveEnvironment#packages to cachedIsPackageResults. Added more comments. - 945bee015640: Jan Vrany, 2014-07-31 09:30 +0100: Made JavaClass>>package returning Smalltalk/X package name from annotation, if annotated. - 3f605f43f795: Jan Vrany, 2014-08-01 14:25 +0100: Fixed JavaRelease>>validateJavaVersionString: - d9a3d685c8b9: Jan Vrany, 2014-08-01 14:27 +0100: Force a garbage collect after each run of classreader benchmark. - 304d3543242f: Jan Vrany, 2014-08-03 23:28 +0100: Cleanup in ReflectiveEnvironment: more comments & logging. - 603fdba602c4: Jan Vrany, 2014-08-03 18:16 +0100: Fixed annotation support in reflective environment (getValue() and standard tag bits) - 5260fddf10f6: Jan Vrany, 2014-08-03 23:39 +0100: Merged 304d3543242f and 603fdba602c4 - b6bced0551a9: Jan Vrany, 2014-08-03 23:43 +0100: Merged d9a3d685c8b9 and 5260fddf10f6 - 7abed44f04cc: Jan Vrany, 2014-08-03 23:46 +0100: Merged 945bee015640 and b6bced0551a9 - 9aade8151557: Jan Vrany, 2014-08-04 00:38 +0100: Added JavaSourceFileWriter>>fileOut:on:withTimestamp:... - 0b6a9ff08acd: Jan Vrany, 2014-08-04 15:43 +0100: Class reading optimization [1/4]: optimize CharacterArray class>>decodeFromJavaUTF8: - d617b4590431: Jan Vrany, 2014-08-04 16:13 +0100: (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:... - d44f099dcff0: Jan Vrany, 2014-08-04 16:47 +0100: Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor: - a4ddeef7c5e9: Jan Vrany, 2014-08-04 17:12 +0100: Class reading optimization [4/4]: defer cache flushing at class initialization time. - 189c572dbe71: Jan Vrany, 2014-08-04 23:08 +0100: Fixed getDeclaringClass() native. - a63cf3e1042f: Jan Vrany, 2014-08-05 00:11 +0100: Merged 9aade8151557 and 189c572dbe71 - 3890b120ec7f: Jan Vrany, 2014-08-05 01:02 +0100: Little tweak in ReflectiveEnvironment - a3cb415bc22b: Jan Vrany, 2014-08-05 09:27 +0100: Merged a63cf3e1042f and 3890b120ec7f - 185bbb8910e8: Jan Vrany, 2014-08-05 11:57 +0100: Fixed native java.lang.Class.getEnclosingMethod0 - ea55682eefe7: Jan Vrany, 2014-08-05 12:03 +0100: Align JavaClass>>enclosingClass with java.lang.Class.getEnclosingClass() - 4284af836b5d: Jan Vrany, 2014-08-05 20:42 +0100: Merged ea55682eefe7 and a4ddeef7c5e9 - 959071100332: Jan Vrany, 2014-08-05 21:57 +0100: Merged a3cb415bc22b and 4284af836b5d - 6cb006c63c4a: Jan Vrany, 2014-08-05 22:41 +0100: Return enclusing class's package for inner classes. Make #owningClass to return enclosing class. - 5517d6a75d40: Jan Vrany, 2014-08-06 14:24 +0100: Fix in GroovyEvaluator: care for nil values of workspace variables. - b96f863a8500: Jan Vrany, 2014-08-07 01:49 +0100: Java lint service now do dry-compilation to get more accurate problem list. - 546065d4319b: Jan Vrany, 2014-08-07 10:32 +0100: Fixed off-by-one bug in AbstractVariableDeclaration>>startPosition / endPosition extensions. - c771a69d7f7d: Jan Vrany, 2014-08-07 12:41 +0100: Removed slot JavaClass#sourceFile. - caa15c28f3a1: Jan Vrany, 2014-08-07 14:42 +0100: Fixed bad bug in realoding - do not flush type when invalidating field ref. - d3094b384e55: Jan Vrany, 2014-08-08 07:36 +0100: Fix in JavaNativeMethod: compute line number by searching the source. - c38fcee7b0da: Jan Vrany, 2014-08-08 11:02 +0100: Fixes bad bug in Java thread handling that caused memory/resource leak. - 1f63ee2cdd97: Jan Vrany, 2014-08-11 01:19 +0100: Fixed JavaClass>>fileOutAs: - 1d977d2d3abb: Jan Vrany, 2014-08-11 01:55 +0100: es to ClassLoader#classes list. - 261bad2a9657: Jan Vrany, 2014-08-11 09:46 +0100: Fixes for class unloadfing: unload inner classes first. - 93a3efa06bd1: Jan Vrany, 2014-08-11 10:55 +0100: ReflectiveEnvironment#isPackage() refactored to provide better performance. - 19fc0c196e75: Jan Vrany, 2014-08-11 10:57 +0100: Fixed typo in comment in ASTNodeComparator - dac830f75266: Jan Vrany, 2014-08-11 10:57 +0100: Merged 19fc0c196e75 and 261bad2a9657 - 3aed12bd6638: Jan Vrany, 2014-08-11 12:23 +0100: Added Echo example. - 81e439368e3d: Jan Vrany, 2014-08-11 21:26 +0100: Added option to a JavaScanner to allow for runaway string constants. - 7940d8a38e51: Jan Vrany, 2014-08-12 09:42 +0100: Oops, added missing methods. - 79fe9b2d4932: Jan Vrany, 2014-08-12 11:15 +0100: Added ASTNodeFinder, a simple visitor to locate AST node based on position in source. - dce4fa6c6dad: Jan Vrany, 2014-08-12 11:16 +0100: Merged 79fe9b2d4932 and 7940d8a38e51 - 36c8ea432a7c: Jan Vrany, 2014-08-12 13:46 +0100: Fixes in syntax hibglighting - add support for line-based highlighting - 9e60100a47c6: Jan Vrany, 2014-08-12 22:40 +0100: Fix in JavaClass>>innerClassesIgnoreUnloaded: - also return anonymous classes. - a35cc585bb5a: Jan Vrany, 2014-08-12 23:09 +0100: Fix in JavaContext>>argsAndVars: do not strip receiver (this) from arg-and-vars - 4d120f1a64f1: Jan Vrany, 2014-08-14 08:54 +0100: Fixed native java.lang.Class.getDeclaredClasses0() - 7a4491b4b7eb: Jan Vrany, 2014-08-14 08:57 +0100: Added some (unimplemented) natives for OpenJDK7's java.nio.* - 1ce74dc95339: Jan Vrany, 2014-08-14 12:24 +0100: Fix for JavaSetInspectorView (after binaryName / name refactoring ) - 1ab5987f3982: Jan Vrany, 2014-08-14 12:50 +0100: Oops, fix for class reader - remember exception table. - 7bf7a8831ed9: Jan Vrany, 2014-08-14 12:55 +0100: Fixed assertions Java>>removeThread:for: - 5c9cb5b7a35b: Jan Vrany, 2014-08-14 16:00 +0100: Merged 7bf7a8831ed9 and 9e60100a47c6 - 6a5d85f29c3a: Jan Vrany, 2014-08-16 08:13 +0100: Fixes for reloading - c8b42e8c2d6c: Jan Vrany, 2014-08-17 08:46 +0100: Fix in reloading of a method with method-level breakpoint. - 2a7558e77d4d: Jan Vrany, 2014-09-17 17:13 +0100: Changed GroovyEvaluatorTests workspace tests to run headless. - 01aa5d9b5206: Jan Vrany, 2014-09-17 17:13 +0100: Fixed comment in INVOKESPECIALX tests. - 353f4a75d558: Jan Vrany, 2014-09-18 10:00 +0100: Eclipse project settings fixed (works on 4.4 Luna) - 4e707dec1e44: Jan Vrany, 2014-09-18 11:56 +0100: Fix in GroovyScanner: honour allowRunawayString - 422e32abb28d: Jan Vrany, 2014-09-18 16:13 +0100: Fix in Java: do not flush Threads dictionary when rebooting JVM - b340178eb595: Jan Vrany, 2014-09-18 16:59 +0100: Added JavaMetaclass>>topOwningClass - 769369f7b48c: Jan Vrany, 2014-10-10 11:56 +0100: Bugfix in JavaCodeBundle: handle correclt non-exisitng packages... - 0a8b9f03ffa5: Jan Vrany, 2014-10-11 23:21 +0100: Fixed class reloader in cases a top-level class has both, nested and anonymous classes. - 16a1b7c1eccc: Jan Vrany, 2014-10-11 23:25 +0100: Eclipse projects renamec to use dotted named. - 7bd0c3fb8bfb: Jan Vrany, 2014-10-27 22:26 +0000: Fix in JavaRelease class>>system - care for broken links - e3119602c69d: Jan Vrany, 2014-11-04 08:50 +0000: Eclipse project settings fixed (again, sigh) - 03cc67fbfd3d: Jan Vrany, 2014-11-04 09:21 +0000: Added variant of native Class.forName0 as used by OpenJDK 7u71. - da769ad115e1: Jan Vrany, 2014-11-04 16:51 +0000: Merged e3119602c69d and 03cc67fbfd3d - c2c8a670bb76: Tomáš Heger, 2014-07-17 00:00 +0200: IBinaryDumper now indicates the end of dumping. - f3b26e7e56ee: Tomáš Heger, 2014-07-23 22:36 +0200: Merged with Honza's changes. - f4240f7f424a: Tomas Heger, 2014-09-10 17:28 +0200: Merged f3b26e7e56ee and c8b42e8c2d6c. - d9c528c25924: Tomas Heger, 2014-09-10 18:11 +0200: java.lang.SafeVarargs added to the supported annotations. - 98d2f92fe05b: Tomas Heger, 2014-09-10 18:17 +0200: A bug in ReflectiveType.getMemberTypes() fixed. It now returns null instead of an empty array if there are no member types. This behaviour is in compliance with the specification in the IBinaryType interface. - 645964f5513e: Tomas Heger, 2014-09-10 18:21 +0200: BinaryDumper doesn't dump SourceName for anonymous classes anymore. - a3c96c7782f1: Tomas Heger, 2014-09-18 22:33 +0200: Method ReflectiveAnnotation.getXConstant() implemented. - 225b46c95c0d: Tomas Heger, 2014-10-03 16:43 +0200: BinaryDumper has new method of dumping objects. It dumps arrays' contents and ignores an actual hashcode of the object (replaces it with a constant string), which is useful when looking for differences in dumps. - 259a03474cc4: Tomas Heger, 2014-10-03 17:15 +0200: BinaryDumper's stringToDump() method improved. It now works for empty arrays and dumps arrays' types as well. - f48973e448ab: Tomas Heger, 2014-10-03 18:14 +0200: BinaryDumper now correctly dumps methods when <clinit> is there. - 4ff24f26a19e: Tomas Heger, 2014-10-13 17:14 +0200: New class ReflectiveUtils created. General methods getXConstant() and getFieldType() moved to the new class. These are methods used by various classes. - ba5d431a3b8c: Tomas Heger, 2014-10-21 16:10 +0200: Enclosing method dumping fixed. Now it's dumped on its own row as it should be. - 0e4e6b5a86c6: Tomas Heger, 2014-10-21 16:44 +0200: If a type (ReflectiveType instance) represents a local or anonymous class within a constructor, that constructor is now returned by the ReflectiveType.getEnclosingMethod() method. - 65569ad02b60: Jan Vrany, 2014-11-05 09:03 +0000: Merged da769ad115e1 and 0e4e6b5a86c6 - 69fc19f5e37d: Jan Vrany, 2014-11-04 13:58 +0000: For Windows JDK7, make sure TwoStackSocketImpl is used - dcaeeee3e396: Jan Vrany, 2014-11-05 11:01 +0000: Implemented natives for TwoStackPlainSocketImpl - c8b892ed8c91: Jan Vrany, 2014-11-05 11:45 +0000: Merged 65569ad02b60 and dcaeeee3e396 - c536d81240a9: Tomas Heger, 2014-11-07 10:42 +0100: The getFieldType() method refactored (the actual functionality moved to new method called getSigFromName()) and new method called getNameFromSig() added. - 60ac91f62d59: Tomas Heger, 2014-11-07 10:44 +0100: A config option (dumpRuntimeInvisibleAnnots) added. With this config option set to false (which is the default value) only annotations with RetentionPolicy.RUNTIME are dumped by the BinaryDumper. - 8ca0926cc281: Tomas Heger, 2014-11-10 16:23 +0100: Functionality to find out if the annotations should be dumped (in case that they're not runtime visible) moved to a new method which is also newly used for dumping parameter annotations. - 9d8b5fb04b41: Jan Vrany, 2014-11-11 21:01 +0100: Fixed ReflectiveAnnotation on JDK6 - 34baed88b792: Jan Vrany, 2014-11-11 21:02 +0100: Merged c8b892ed8c91 and 9d8b5fb04b41 - 7a2b5c67bc0f: Jan Vrany, 2014-11-13 00:25 +0100: Fixed getXConstant() for Enums - 31b5a49df0e0: Jan Vrany, 2014-11-13 00:35 +0100: Fixed ReflectiveElementValuePair for Enum values. - a19f06fa6f09: Jan Vrany, 2014-11-13 00:49 +0100: Fixed ReflectiveAnnotation for type java.lang.invoke.MethodHandle$PolymorphicSignature. - 881799d310e3: Jan Vrany, 2014-11-13 12:18 +0100: Intern all constant pool strings. - e35a94591cb1: Jan Vrany, 2014-11-14 10:32 +0100: Updates after JavaPackage has been moved to stx:libbasic - 31188d530b64: Jan Vrany, 2014-11-16 10:25 +0000: Merged 881799d310e3 and e35a94591cb1 - c56b4d5f0c52: Marcel Hlopko, 2014-11-23 18:45 +0000: README.md edited online with Bitbucket - 3188fcb8391d: Jan Vrany, 2014-11-26 16:45 +0000: Fix in JavaClassReader>>skipAttribute: - 821170928b31: Jan Vrany, 2014-11-21 09:02 +0000: Added tag expecco_2_7_0 for changeset 31188d530b64 - d95fd165e9e3: Jan Vrany, 2014-12-01 00:20 +0000: Update for recent OpenJDK6 - 12d89689d2f2: Jan Vrany, 2014-12-01 00:48 +0000: Merge - 90f0566d8145: Jan Vrany, 2014-12-04 20:56 +0000: Extracted readMagic to alow lazy loading of constant pool. - c56313e00930: Jakub Nesveda, 2014-12-07 13:16 +0100: typo fix - e48aed9570a9: Jakub Nesveda, 2014-12-07 13:17 +0100: cc - 19e3d2dac675: Jakub Nesveda, 2014-12-07 14:25 +0100: fixed JavaRelease >> displayString for non installed or not found java releases - 1d1b9d446dd6: Jakub Nesveda, 2014-12-07 15:08 +0100: Merge - 4ac115074bce: Jan Vrany, 2014-12-07 22:55 +0000: Fixes for JavaRelase>>displayString tests. - 3aaf43a51816: Jan Vrany, 2014-12-08 18:08 +0000: Extracted magic and version detection into separate methods - 76d4443744ed: Jan Vrany, 2014-12-08 23:03 +0000: JavaClass memory optimization (part 1) - 2cf782f380f2: Jan Vrany, 2014-12-03 15:29 +0000: JavaClass memory optimization (part 2) - 10163a452c54: Jan Vrany, 2014-12-07 01:25 +0000: JavaClass memory optimization (part 3) - 14292924cac7: Jan Vrany, 2014-12-07 02:16 +0000: JavaClass memory optimization (part 4) - 1013708261a8: Jan Vrany, 2014-12-08 16:37 +0000: JavaClass memory optimization (part 5) - 87ec39ef23b8: Jan Vrany, 2014-12-08 10:26 +0000: Java settings cleanup (part 1): minor tweaks and fixes - 761c7bb5853c: Jan Vrany, 2014-12-09 14:49 +0000: Java settings cleanup (part 2): release settings refactored. - 8eb3481bfdcf: Jan Vrany, 2014-12-09 15:06 +0000: Java settings cleanup (part 3): removed user bundle editor - d9b55a42fa54: Jan Vrany, 2014-12-09 16:18 +0000: Merged 8eb3481bfdcf and 1013708261a8 - 61e9df43f8a4: Jan Vrany, 2014-12-10 09:06 +0000: Sigh, more fixes for JavaRelease>>displayString tests. - ca8cb260a3d0: Jan Vrany, 2014-12-11 00:44 +0000: Fix in JavaRelease class>>system - 1155c0d79d45: Jan Vrany, 2014-12-12 00:33 +0000: Fixed JavaClass#innerClasses, added #anonynousClasses - 777478bcd3f9: Jan Vrany, 2014-12-12 03:12 +0000: Fix in JavaSyntaxHighlighter: do resolve classes... - af659e602072: Jan Vrany, 2014-12-16 01:08 +0000: Fixes for class unloading. - ac4ecd6e586c: Jan Vrany, 2014-12-16 02:05 +0000: Minor clieanup in tools tests. - d85c559c01c6: Jan Vrany, 2014-12-16 02:42 +0000: Fixed bug in ReflectiveEnvironment#isPackage() - 8bbc18b95b78: Jan Vrany, 2014-12-16 02:49 +0000: Added JavaLintAnnotation - required by recent CodeView2 - cf7c55662e21: Jan Vrany, 2014-12-16 02:56 +0000: Merged d85c559c01c6 and 8bbc18b95b78 - b0f4e406b42d: Jan Vrany, 2014-12-17 01:20 +0000: Fix in flushing Java - flush smalltalk-to-java thread object mapping... - a467328c29fd: Jan Vrany, 2014-12-20 01:47 +0100: Fix in flushing Java - flush all dynamic proxies - b3526f83c2ff: Tomas Heger, 2014-11-16 15:08 +0100: Fixed ReflectiveUtils.getXConstant() for Classes. - 7bc74064acf3: Tomas Heger, 2014-11-18 22:54 +0100: Member filtering implemented. - ac4ade238e90: Tomas Heger, 2014-11-19 18:25 +0100: ReflectiveElementValuePair.getValue() fixed for Constant values. - 186065c6ada4: Tomas Heger, 2014-11-19 18:27 +0100: NullPointerException bug fixed in BinaryDumper.stringToDump() - bdc3f443e3c0: Tomas Heger, 2014-11-19 18:37 +0100: BinaryDumper.stringToDump() returns "null" instead of "" if null is given as a parameter. - c9cb51667da1: Tomas Heger, 2014-11-21 21:39 +0100: ReflectiveElementValuePair class tests added. - b78cacf5e303: Tomas Heger, 2014-12-11 22:47 +0100: Tests for getConstant() and getModifiers() added. - 490bd00c692c: Tomas Heger, 2014-12-11 22:53 +0100: BinaryDumper.stringToDump() now returns a String "null" for runtime invisible annotation (if the relevant config option is used). - ec683302163c: Tomas Heger, 2014-12-18 22:30 +0100: Fixed two bugs related to annotations (java.lang.annotation.Target hack improved and the problem with element-value pairs with the default value solved) - b0871eb73fd2: Tomas Heger, 2015-01-01 13:54 +0100: Minor refactoring of ReflectiveUtils. No funcionality changes. - 264b56c86880: Tomas Heger, 2015-01-04 11:25 +0100: Static variable that is no longer needed was removed from ReflectiveField. - cdab5cc716a7: Jan Vrany, 2014-12-17 00:08 +0000: Fixed bad bug in URL to to File conversion... - 00320742d075: Jan Vrany, 2015-01-05 11:00 +0100: Merged a467328c29fd and cdab5cc716a7 - 740ba227611d: Jan Vrany, 2015-01-05 11:04 +0100: Merged 00320742d075 and 264b56c86880 - a58245c0e83a: Jan Vrany, 2015-01-05 17:10 +0100: Updated copyright notices. - d9297d724fa0: Jan Vrany, 2015-01-06 11:01 +0100: Fix for D116331: Do not write to a changefile when compiling new native method - a373d416ae8c: Jan Vrany, 2015-01-11 08:03 +0000: Fix in JavaClass>>annotations - 3f9968ddacf8: Jan Vrany, 2015-01-14 11:19 +0000: Ant build files refactoring (part 1) - 327e493d2688: Jan Vrany, 2015-01-19 17:08 +0100: Ant build files refactoring (part 2) - 4c3b0badaa5f: Jan Vrany, 2015-01-20 09:42 +0100: Oops, fixed endless recursion in JavaClass>>innerClasses... - b14c58b2876c: Jan Vrany, 2015-01-20 10:41 +0100: Oops, moved stray reloading-related methods from stx:libjava/experiments to stx:libjava. - ee36f2088d60: Jan Vrany, 2015-01-20 10:49 +0100: JavaClassReloaderTests moved from stx:libjava/experiments to stx:libjava - 7aa6c098fb82: Jan Vrany, 2015-01-21 09:09 +0100: Repository cleanup (1/7): removed esug2012 and thesis directories. - 81e0e61fa317: Jan Vrany, 2015-01-21 09:30 +0100: Repository cleanup (2/7): removed smaCC directory. - 297cc823a07a: Jan Vrany, 2015-01-21 10:02 +0100: Repository cleanup (3/7): removed obsolete eclipse projects. - acdda45271f7: Jan Vrany, 2015-01-21 11:28 +0100: Repository cleanup (4/7): moved mauve source to stx:libjava/mauve/java where it belongs - 08a79331ec58: Jan Vrany, 2015-01-21 13:19 +0100: Repository cleanup (5/7): made stx:libjava/tests a full Smalltalk/X package. - fd5013aca049: Jan Vrany, 2015-01-21 13:46 +0100: Repository cleanup (6/7): moved Mauve test suite under stx:libjava/tests - 1dd84eba684a: Jan Vrany, 2015-01-21 15:50 +0100: Repository cleanup (7/7): removed docs/todo.txt - 23451a6823b1: Jan Vrany, 2015-01-22 21:31 +0100: More Java AST utilities. - e8d92a1c50f3: Jan Vrany, 2015-01-23 14:49 +0100: Updated Apache POI to 3.11 - 0f2df59e58e2: Tomas Heger, 2015-01-09 21:41 +0100: Shell script for easier launching of BinaryDumper added. - 77aa10f9e436: Tomas Heger, 2015-01-09 21:41 +0100: Many tests for the whole reflective environment added as well as some mock classes used by the tests. - a29efdbbfad2: Jan Vrany, 2015-01-27 10:14 +0000: Updated to Groovy 2.1.9 - a3ad7164f528: Jan Vrany, 2015-01-27 10:34 +0000: Groovy and JUnit .jars commited to repository. - 34b4fea6dd4f: Jan Vrany, 2015-01-27 10:45 +0000: Merged a3ad7164f528 and 77aa10f9e436 - a6358ca80d11: convert-repo, 2015-01-27 21:07 +0000: update tags - a3407cf1cd0d: Jan Vrany, 2015-01-27 22:34 +0000: Merged 34b4fea6dd4f and a6358ca80d11 - cb6c15e66bed: Jan Vrany, 2015-01-28 00:49 +0000: Temporary workaround to make tests running in eXept builds.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3196
diff changeset
     2
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
     3
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
     5
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3196
diff changeset
     6
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    18
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    19
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
Object subclass:#JavaResolver
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:'exceptionThrower'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
	classVariableNames:'uniqueInstance'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Reader-Support-new'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
!JavaResolver class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3196
diff changeset
    34
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    35
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    37
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3196
diff changeset
    38
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    50
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    51
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
!JavaResolver class methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
initialize
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
    uniqueInstance := JavaResolver new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
    uniqueInstance exceptionThrower: JavaVM.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
    "/has methods at: and at: put: 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
    "/uniqueInstance resolvedClasses: Java.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
    "Modified: / 10-04-2011 / 10:23:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
    "Modified: / 13-04-2011 / 14:07:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
!JavaResolver class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    71
uniqueInstance
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
    ^uniqueInstance.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
    "Created: / 08-04-2011 / 17:36:37 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
    "Modified: / 11-04-2011 / 19:06:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
!JavaResolver methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
exceptionThrower
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
    ^ exceptionThrower
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
exceptionThrower:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
    exceptionThrower := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
!JavaResolver methodsFor:'class resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
checkIfPrimitiveArrayRef: aJavaClassRef andWrap: result 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
    ^ (JavaDescriptor readFromString: aJavaClassRef name) javaClass.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
    "Created: / 23-05-2011 / 21:12:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
resolveClassIndentifiedByRef: aJavaClassRef init: doInit 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    98
    "marcel is back working harder then ever :)"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
    99
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   100
    | result |
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
    self validateClassRef: aJavaClassRef.
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   102
    result := self 
2794
cec025d0f359 Oops, fix for resolving.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2732
diff changeset
   103
         lookupClassIfAlreadyResolved: aJavaClassRef javaClassNameOrPrimitiveTypeId
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   104
         definedBy: aJavaClassRef classLoader.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   105
            
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   106
"/        result notNil ifTrue:[ 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   107
"/            "/wrap result with array(s) if needed and return it
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   108
"/            "/FIXME: Marcel, can you have a look? Is that correct?
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   109
"/            ^self checkIfArrayRef: aJavaClassRef andWrap: result.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   110
"/        ].
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   111
    "
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
     To resolve an unresolved symbolic reference from D to a class or interface C denoted by N,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
     the following steps are performed:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
     The defining class loader of D is used to create a class or interface denoted by N.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
     This class or interface is C. Any exception that can be thrown as a result of failure
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
     of class or interface creation can thus be thrown as a result of failure of class and
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
     interface resolution. The details of the process are given in Section 5.3.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
    "
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   119
    result isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   120
        JavaClassReader classLoaderQuerySignal answer: (aJavaClassRef classLoader)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   121
            do: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   122
                "#loadUnresolvedClass: wraps the class!!!!!!"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   123
                result := self loadUnresolvedClass: aJavaClassRef.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   124
                ((aJavaClassRef name first == $[) and: [ result isJavaArrayClass not ]) ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   125
                    self breakPoint: #jv.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   126
                ]
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   127
            ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   128
    ] ifFalse: [ result := self checkIfArrayRef: aJavaClassRef andWrap: result. ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   129
    result isNil ifTrue: [ self breakPoint: #mh ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   130
    result isJavaPrimitiveType ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   131
        ^ self checkIfPrimitiveArrayRef: aJavaClassRef andWrap: result
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   133
    (doInit and: [ result isJavaClass and: [ result isJavaArrayClass not ] ]) ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   134
        result classInit
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
     "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
     If C is an array class and its element type is a reference type, then the symbolic reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
     to the class or interface representing the element type is resolved by invoking the algorithm
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   139
     in Section 5.4.3.1 recursively.""Finally, access permissions to C are checked:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
     If C is not accessible (5.4.4) to D, class or interface resolution throws an IllegalAccessError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
     This condition can occur, for example, if C is a class that was originally declared to be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
     public but was changed to be non-public after D was compiled.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
     
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
     If steps 1 and 2 succeed but step 3 fails, C is still valid and usable. Nevertheless, resolution
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   145
     fails, and D is prohibited from accessing C." 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   147
    (self checkPermissionsFrom: aJavaClassRef owner to: result) ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   148
        self throwIllegalAccessError. 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   149
        ^nil.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   150
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   151
    ^result
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   153
    "Created: / 11-04-2011 / 19:07:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   154
    "Created: / 12-08-2011 / 22:19:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   155
    "Modified (comment): / 03-10-2011 / 23:03:01 / m"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   156
    "Modified: / 01-12-2012 / 13:44:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2794
cec025d0f359 Oops, fix for resolving.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2732
diff changeset
   157
    "Modified: / 05-10-2013 / 01:05:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   158
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   159
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   160
!JavaResolver methodsFor:'class resolving helpers'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   161
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   162
checkIfArrayRef: aJavaClassRef andWrap: nonArrayClass 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   163
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   164
    "/wrap result with array(s) if needed and return it
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   165
    | class|    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   166
    class := nonArrayClass.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   167
    aJavaClassRef name do:[:c|
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   168
        c ~~ $[ ifTrue:[ ^ class ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   169
        class := class javaArrayClass.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   170
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   171
    ^class
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   172
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   173
    "Modified: / 11-04-2011 / 19:31:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   174
    "Modified: / 23-10-2011 / 23:46:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   175
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   176
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   177
checkPermissionsFrom: refOwner to: resolvedClass    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   178
    refOwner hasMagicAccessRights ifTrue: [ ^ true ].
2942
c39cbf09ea3d Fixes for Java reflection on Smalltalk classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2908
diff changeset
   179
    resolvedClass isJavaClass ifFalse:[ ^ true ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   180
    (JavaDescriptor isJavaPrimitiveArrayName: resolvedClass javaName) ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   181
        ^ true
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   182
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   183
    resolvedClass isPublic ifTrue: [ ^ true ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   184
    resolvedClass classLoader = refOwner classLoader ifFalse: [ ^ false. ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   185
    refOwner javaPackage = resolvedClass javaPackage ifTrue: [ ^ true ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   186
    
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   187
    "/a little bit too verbose here just so it's clear what's in query
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   188
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   189
    JavaVM privilegedAccessQuery query ifTrue: [ ^ true ] ifFalse: [ ^ false ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   190
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   191
    "Created: / 11-04-2011 / 19:35:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   192
    "Modified (comment): / 09-10-2011 / 23:11:54 / Marcel Hlopko <hlopik@gmail.com>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   193
    "Modified: / 23-08-2012 / 20:21:40 / m"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   194
    "Modified: / 30-11-2012 / 20:34:26 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2942
c39cbf09ea3d Fixes for Java reflection on Smalltalk classes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2908
diff changeset
   195
    "Modified: / 20-11-2013 / 16:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   196
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   197
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   198
loadUnresolvedClass: aJavaClassRef 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   199
    | nm cls i |
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   200
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   201
    nm := aJavaClassRef name.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   202
    nm size == 1 ifTrue:[ 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   203
        JavaDescriptor baseTypes at: nm first ifPresent: [:cls | ^ cls ] 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   204
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   205
    "Note, that JavaVM>>classForName: itself deals with class loaders.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   206
     The caller of me should set one using code like:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   207
     
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   208
     JavaClassReader classLoaderQuerySignal answer: loader do:[call me]     
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   209
    "
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   210
    cls := JavaVM classForName: nm.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   211
    (nm startsWith:$[) ifTrue:[
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   212
        i := 1.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   213
        [ (nm at:i) == $[ ] whileTrue:[
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   214
            cls := cls javaArrayClass.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   215
            i := i + 1.                                        
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   216
        ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   217
        self assert: (nm at:i) == $L.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   218
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   219
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   220
    ^cls.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   221
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   222
    "Created: / 11-04-2011 / 19:27:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   223
    "Modified: / 23-05-2011 / 21:06:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   224
    "Modified: / 29-02-2012 / 09:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   225
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   226
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   227
lookupClassIfAlreadyResolved: javaClassName definedBy: classLoader
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   228
    ^ JavaVM classNamed: javaClassName definedBy: classLoader
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   229
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   230
    "Created: / 02-05-2013 / 01:20:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   231
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   232
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   233
validateClassRef: aJavaClassRef 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   234
    self assert: aJavaClassRef isJavaRef.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   235
    self assert: aJavaClassRef isJavaClassRef .
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   236
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   237
    "Modified: / 23-05-2011 / 21:04:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   238
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   239
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   240
!JavaResolver methodsFor:'common helpers'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   241
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   242
checkPermissionsForMethodOrField: aJavaMethodOrField from: accessingJavaClass to: resolvedJavaClass 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   243
    "A class or interface C is accessible to a class or interface D if 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   244
     and only if either of the following conditions are true:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   245
     C is public.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   246
     C and D are members of the same runtime package (§5.3).
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   247
     A field or method R is accessible to a class or interface D if and only
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   248
     if any of the following conditions is true:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   249
     R is public.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   250
     R is protected and is declared in a class C, and D is either a subclass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   251
     of C or C itself.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   252
     R is either protected or package private (that is, neither public nor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   253
     protected nor private), and is declared by a class in the same runtime
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   254
     package as D.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   255
     R is private and is declared in D.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   256
     This discussion of access control omits a related restriction on the target
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   257
     of a protected field access or method invocation (the target must be of class
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   258
     D or a subtype of D). That requirement is checked as part of the verification
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   259
     process (§5.4.1); it is not part of link-time access control."
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   260
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   261
    accessingJavaClass hasMagicAccessRights ifTrue: [ ^true ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   262
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   263
    (self checkPermissionsFrom: accessingJavaClass to: resolvedJavaClass) ifFalse: [
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   264
        JavaVM privilegedAccessQuery query ifTrue: [ ^ true ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   265
        ^ false
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   266
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   267
    aJavaMethodOrField isPublic ifTrue: [ ^ true ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   268
    ((aJavaMethodOrField isProtected 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   269
        and: [
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   270
            resolvedJavaClass javaComponentClass 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   271
                equalsOrIsSubclassOf: aJavaMethodOrField javaClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   272
        ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   273
            and: [
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   274
                accessingJavaClass javaComponentClass 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   275
                    equalsOrIsSubclassOf: aJavaMethodOrField javaClass
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   276
            ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   277
            ifTrue: [ ^ true ].
2730
272689c14005 Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2578
diff changeset
   278
    ((
272689c14005 Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2578
diff changeset
   279
    aJavaMethodOrField isPrivate not 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   280
        and: [ resolvedJavaClass javaPackage = accessingJavaClass javaPackage ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   281
            and: [ resolvedJavaClass classLoader = accessingJavaClass classLoader ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   282
            ifTrue: [ ^ true ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   283
    (aJavaMethodOrField isPrivate 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   284
        and: [ aJavaMethodOrField javaClass name = accessingJavaClass name ]) 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   285
            ifTrue: [ ^ true ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   286
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   287
    "/a little bit too verbose here just so it's clear what's in query
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   288
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   289
    JavaVM privilegedAccessQuery query ifTrue: [ ^ true ] ifFalse: [ ^ false ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   290
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   291
    "Created: / 14-04-2011 / 14:19:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   292
    "Modified (comment): / 09-10-2011 / 23:12:48 / Marcel Hlopko <hlopik@gmail.com>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   293
    "Modified: / 18-11-2012 / 16:24:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2730
272689c14005 Fixed removing of Java classes (issue #40)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2578
diff changeset
   294
    "Modified (format): / 15-09-2013 / 00:09:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   295
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   296
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   297
!JavaResolver methodsFor:'exceptions'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   298
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   299
throwAbstractMethodError
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   300
    exceptionThrower throwAbstractMethodError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   301
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   302
    "Created: / 11-04-2011 / 20:19:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   303
    "Modified: / 13-04-2011 / 14:07:46 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   304
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   305
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   306
throwIllegalAccessError
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   307
    exceptionThrower throwIllegalAccessError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   308
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   309
    "Created: / 11-04-2011 / 19:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   310
    "Modified: / 13-04-2011 / 23:06:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   311
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   312
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   313
throwIncompatibleClassChangeError
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   314
    exceptionThrower throwIncompatibleClassChangeError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   315
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   316
    "Created: / 11-04-2011 / 20:02:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   317
    "Modified: / 13-04-2011 / 14:07:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   318
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   319
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   320
throwNoSuchFieldException
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   321
    exceptionThrower throwNoSuchFieldException.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   322
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   323
    "Created: / 11-04-2011 / 21:35:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   324
    "Modified: / 13-04-2011 / 14:07:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   325
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   326
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   327
throwNoSuchMethodError
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   328
    exceptionThrower throwNoSuchMethodError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   329
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   330
    "Created: / 11-04-2011 / 20:19:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   331
    "Modified: / 13-04-2011 / 14:08:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   332
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   333
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   334
!JavaResolver methodsFor:'field resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   335
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   336
resolveFieldIndentifiedByRef:aJavaFieldRef 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   337
    | result  class |
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   338
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   339
    self validateFieldRef:aJavaFieldRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   340
    result := self lookupFieldIfAlreadyResolved:aJavaFieldRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   341
    result notNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   342
        ^ result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   343
    ].
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   344
    class := aJavaFieldRef classRef resolve:false.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   345
    class isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   346
        self error:'should not happen - tell mh'
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   347
    ].
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   348
    result := class lookupFieldByNameAndType:aJavaFieldRef nameAndType.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   349
    result isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   350
        self throwNoSuchFieldException
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   351
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   352
    (self 
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   353
        checkPermissionsForField:result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   354
        from:aJavaFieldRef classRef owner
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   355
        to:class) ifFalse:[ self throwIllegalAccessError ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   356
    ^ result.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   357
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   358
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   359
     To resolve an unresolved symbolic reference from D to a field in a class
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   360
     or interface C, the symbolic reference to C given by the field reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   361
     must first be resolved (§5.4.3.1). Therefore, any exception that can be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   362
     thrown as a result of failure of resolution of a class or interface reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   363
     can be thrown as a result of failure of field resolution. If the reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   364
     to C can be successfully resolved, an exception relating to the failure of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   365
     resolution of the field reference itself can be thrown.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   366
     When resolving a field reference, field resolution first attempts to look
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   367
     up the referenced field in C and its superclasses:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   368
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   369
     If C declares a field with the name and descriptor specified by the field
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   370
     reference, field lookup succeeds. The declared field is the result of the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   371
     field lookup.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   372
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   373
     Otherwise, field lookup is applied recursively to the direct superinterfaces
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   374
     of the specified class or interface C.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   375
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   376
     Otherwise, if C has a superclass S, field lookup is applied recursively to S.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   377
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   378
     Otherwise, field lookup fails.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   379
     If field lookup fails, field resolution throws a NoSuchFieldError. Otherwise,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   380
     if field lookup succeeds but the referenced field is not accessible (§5.4.4)
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   381
     to D, field resolution throws an IllegalAccessError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   382
     Otherwise, let <E, L1> be the class or interface in which the referenced
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   383
     field is actually declared and let L2 be the defining loader of D. Let T be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   384
     the name of the type of the referenced field. The Java virtual machine must
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   385
     impose the loading constraint that TL1=TL2(§5.3.4)."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   386
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   387
    "Created: / 11-04-2011 / 21:15:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   388
    "Modified: / 01-12-2012 / 13:45:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   389
    "Modified: / 04-08-2014 / 15:52:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   390
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   391
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   392
resolveStaticFieldIndentifiedByRef:aJavaFieldRef 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   393
    | result  class |
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   394
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   395
    self validateFieldRef:aJavaFieldRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   396
    result := self lookupFieldIfAlreadyResolved:aJavaFieldRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   397
    result notNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   398
        ^ result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   399
    ].
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   400
    class := aJavaFieldRef classRef resolve:false.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   401
    class isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   402
        self error:'should not happen - tell mh'
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   403
    ].
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   404
    result := class lookupStaticFieldByNameAndType:aJavaFieldRef nameAndType.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   405
    result isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   406
        self throwNoSuchFieldException
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   407
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   408
    (self 
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   409
        checkPermissionsForField:result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   410
        from:aJavaFieldRef classRef owner
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   411
        to:class) ifFalse:[ self throwIllegalAccessError ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   412
    ^ result.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   413
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   414
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   415
     To resolve an unresolved symbolic reference from D to a field in a class
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   416
     or interface C, the symbolic reference to C given by the field reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   417
     must first be resolved (§5.4.3.1). Therefore, any exception that can be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   418
     thrown as a result of failure of resolution of a class or interface reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   419
     can be thrown as a result of failure of field resolution. If the reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   420
     to C can be successfully resolved, an exception relating to the failure of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   421
     resolution of the field reference itself can be thrown.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   422
     When resolving a field reference, field resolution first attempts to look
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   423
     up the referenced field in C and its superclasses:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   424
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   425
     If C declares a field with the name and descriptor specified by the field
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   426
     reference, field lookup succeeds. The declared field is the result of the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   427
     field lookup.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   428
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   429
     Otherwise, field lookup is applied recursively to the direct superinterfaces
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   430
     of the specified class or interface C.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   431
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   432
     Otherwise, if C has a superclass S, field lookup is applied recursively to S.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   433
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   434
     Otherwise, field lookup fails.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   435
     If field lookup fails, field resolution throws a NoSuchFieldError. Otherwise,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   436
     if field lookup succeeds but the referenced field is not accessible (§5.4.4)
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   437
     to D, field resolution throws an IllegalAccessError.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   438
     Otherwise, let <E, L1> be the class or interface in which the referenced
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   439
     field is actually declared and let L2 be the defining loader of D. Let T be
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   440
     the name of the type of the referenced field. The Java virtual machine must
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   441
     impose the loading constraint that TL1=TL2(§5.3.4)."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   442
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   443
    "Created: / 28-04-2011 / 22:31:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   444
    "Modified: / 01-12-2012 / 13:45:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   445
    "Modified: / 04-08-2014 / 15:52:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   446
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   447
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   448
!JavaResolver methodsFor:'field resolving helpers'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   449
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   450
checkPermissionsForField: aJavaField from: accessingJavaClass to: resolvedJavaClass     
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   451
    ^ self 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   452
        checkPermissionsForMethodOrField: aJavaField
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   453
        from: accessingJavaClass
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   454
        to: resolvedJavaClass.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   455
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   456
    "Created: / 11-04-2011 / 21:46:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   457
    "Modified: / 01-12-2012 / 13:45:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   458
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   459
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   460
lookupFieldIfAlreadyResolved: aJavaFieldRef 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   461
    ^ nil.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   462
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   463
    "Created: / 11-04-2011 / 21:16:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   464
    "Modified: / 13-04-2011 / 11:57:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   465
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   466
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   467
validateFieldRef: aJavaFieldRef 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   468
    aJavaFieldRef isJavaRef ifFalse: [ self halt: 'I expected Java Ref' ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   469
    aJavaFieldRef isJavaFieldRef ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   470
        self error: 'I expected Java Field Ref'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   471
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   472
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   473
    "Created: / 11-04-2011 / 21:16:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   474
    "Modified: / 01-12-2012 / 13:46:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   475
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   476
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   477
!JavaResolver methodsFor:'interface method resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   478
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   479
resolveInterfaceMethodIdentifiedByRef: aJavaInterfaceMethodRef 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   480
    | result  class |
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   481
    self validateInterfaceMethodRef: aJavaInterfaceMethodRef.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   482
    result := self 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   483
            lookupInterfaceMethodIfAlreadyResolved: aJavaInterfaceMethodRef.
2908
064418faa2e3 Another pass over Mauve tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2794
diff changeset
   484
    result notNil ifTrue: [ ^ result ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   485
    class := aJavaInterfaceMethodRef classRef resolve: false.
2908
064418faa2e3 Another pass over Mauve tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2794
diff changeset
   486
    class isNil ifTrue: [ self error: 'should not happen - tell mh' ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   487
    class isInterface ifFalse: [ self throwIncompatibleClassChangeError ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   488
    result := class 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   489
            lookupMethodByNameAndType: aJavaInterfaceMethodRef nameAndType.
2908
064418faa2e3 Another pass over Mauve tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2794
diff changeset
   490
    result isNil ifTrue: [ self throwNoSuchMethodError ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   491
    (self 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   492
        checkPermissionsForMethod: result
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   493
        from: aJavaInterfaceMethodRef classRef owner
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   494
        to: class) ifFalse: [ self throwIllegalAccessError ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   495
    ^ result.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   496
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   497
    "
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   498
     To resolve an unresolved symbolic reference from D to an interface method in an
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   499
     interface C, the symbolic reference to C given by the interface method reference is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   500
     first resolved (§5.4.3.1). Therefore, any exceptions that can be thrown as a result
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   501
     of failure of resolution of an interface reference can be thrown as a result of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   502
     failure of interface method resolution. If the reference to C can be successfully
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   503
     resolved, exceptions relating to the resolution of the interface method reference
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   504
     itself can be thrown.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   505
     When resolving an interface method reference:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   506
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   507
     If C is not an interface, interface method resolution throws an IncompatibleClassChangeError."
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   508
    "Otherwise, if the referenced method does not have the same name and descriptor as
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   509
a method in C or in one of the superinterfaces of C, or in class Object, interface
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   510
method resolution throws a NoSuchMethodError.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   511
Otherwise, let <E, L1> be the interface in which the referenced interface method is
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   512
actually declared and let L2 be the defining loader of D. Let T0 be the name of
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   513
the type returned by the referenced method, and let T1, ..., Tn be the names of the
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   514
argument types of the referenced method. The Java virtual machine must impose the
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   515
loading constraints TiL1 = TiL2 for i = 0 to n (§5.3.4)."
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   516
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   517
    "Modified: / 01-12-2012 / 13:46:09 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2908
064418faa2e3 Another pass over Mauve tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2794
diff changeset
   518
    "Modified: / 09-11-2013 / 00:12:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   519
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   520
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   521
!JavaResolver methodsFor:'interface method resolving helpers'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   522
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   523
lookupInterfaceMethodIfAlreadyResolved: aJavaInterfaceMethodRef 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   524
    ^  nil.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   525
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   526
    "Created: / 13-04-2011 / 11:53:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   527
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   528
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   529
validateInterfaceMethodRef: aJavaInterfaceMethodRef 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   530
    aJavaInterfaceMethodRef isJavaRef ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   531
        self error: 'I expected JavaRef instance as an argument'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   532
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   533
    aJavaInterfaceMethodRef isJavaInterfaceMethodRef ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   534
        self error: 'I expected JavaMethodRef instance as an argument'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   535
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   536
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   537
    "Created: / 13-04-2011 / 11:53:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   538
    "Modified: / 01-12-2012 / 13:46:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   539
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   540
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   541
!JavaResolver methodsFor:'method resolving'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   542
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   543
resolveMethodIndentifiedByRef:aJavaMethodRef 
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   544
    | result  class |
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   545
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   546
    self validateMethodRef:aJavaMethodRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   547
    result := self lookupMethodIfAlreadyResolved:aJavaMethodRef.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   548
    result notNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   549
        ^ result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   550
    ].
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   551
    class := aJavaMethodRef classRef resolve:false.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   552
    class isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   553
        self error:'should not happen - tell mh'
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   554
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   555
     "Array types responds to all method of class java.lang.Object"
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   556
    class isJavaArrayClass ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   557
        class := JavaVM classForName:'java.lang.Object'.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   558
    ].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   559
     "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   560
     To resolve an unresolved symbolic reference from D to a method in
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   561
     a class C, the symbolic reference to C given by the method reference
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   562
     is first resolved (§5.4.3.1). Therefore, any exceptions that can be
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   563
     thrown due to resolution of a class reference can be thrown as a result
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   564
     of method resolution. If the reference to C can be successfully resolved,
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   565
     exceptions relating to the resolution of the method reference itself
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   566
     can be thrown.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   567
     When resolving a method reference:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   568
     
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   569
     Method resolution checks whether C is a class or an interface.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   570
     If C is an interface, method resolution throws an IncompatibleClassChangeError."
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   571
    class isInterface ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   572
        self throwIncompatibleClassChangeError
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   573
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   574
     "Method resolution attempts to look up the referenced method in C and its
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   575
     superclasses:
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   576
     If C declares a method with the name and descriptor specified by the method
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   577
     reference, method lookup succeeds.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   578
     Otherwise, if C has a superclass, step 2 of method lookup is recursively
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   579
     invoked on the direct superclass of C.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   580
     
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   581
     Otherwise, method lookup attempts to locate the referenced method in any of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   582
     the superinterfaces of the specified class C.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   583
     If any superinterface of C declares a method with the name and descriptor
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   584
     specified by the method reference, method lookup succeeds.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   585
     Otherwise, method lookup fails.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   586
     If method lookup fails, method resolution throws a NoSuchMethodError. If method
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   587
     lookup succeeds and the method is abstract, but C is not abstract, method resolution
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   588
     throws an AbstractMethodError. Otherwise, if the referenced method is not accessible
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   589
     (§5.4.4) to D, method resolution throws an IllegalAccessError."
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   590
    result := class lookupMethodByNameAndType:aJavaMethodRef nameAndType.
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   591
    result isNil ifTrue:[
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   592
        self throwNoSuchMethodError
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   593
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   594
    (result isAbstract 
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   595
        and:[ result javaClass isInterface not and:[ class isAbstract not ] ]) 
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   596
            ifTrue:[ self throwAbstractMethodError ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   597
    (self 
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   598
        checkPermissionsForMethod:result
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   599
        from:aJavaMethodRef classRef owner
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   600
        to:class) ifFalse:[ self throwIllegalAccessError ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   601
    ^ result.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   602
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   603
    "Otherwise, let <E, L1> be the class or interface in which the referenced method is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   604
     actually declared and let L2 be the defining loader of D. Let T0 be the name of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   605
     the type returned by the referenced method, and let T1, ..., Tn be the names of
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   606
     the argument types of the referenced method. The Java virtual machine must impose
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   607
     the loading constraints TiL1=TiL2 for i = 0 to n (§5.3.4)."
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   608
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   609
    "Created: / 11-04-2011 / 19:45:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   610
    "Modified: / 14-04-2011 / 00:01:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   611
    "Modified (format): / 01-12-2012 / 13:46:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
3196
d617b4590431 (Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2942
diff changeset
   612
    "Modified: / 04-08-2014 / 15:55:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   613
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   614
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   615
!JavaResolver methodsFor:'method resolving helpers'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   616
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   617
checkPermissionsForMethod: aJavaMethod from: accessingJavaClass to: resolvedJavaClass    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   618
    ^ self 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   619
        checkPermissionsForMethodOrField: aJavaMethod
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   620
        from: accessingJavaClass
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   621
        to: resolvedJavaClass.
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   622
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   623
    "Created: / 11-04-2011 / 20:20:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   624
    "Modified: / 24-05-2011 / 14:06:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   625
    "Modified: / 09-02-2012 / 23:15:48 / mh <hlopik@gmail.com>"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   626
    "Modified: / 01-12-2012 / 13:46:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   627
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   628
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   629
lookupMethodIfAlreadyResolved: aJavaMethodRef 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   630
    ^ nil.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   631
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   632
    "Created: / 11-04-2011 / 19:50:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   633
    "Modified: / 13-04-2011 / 11:57:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   634
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   635
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   636
validateMethodRef: aJavaMethodRef 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   637
    aJavaMethodRef isJavaRef ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   638
        self error: 'I expected JavaRef instance as an argument'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   639
    ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   640
    aJavaMethodRef isJavaMethodRef ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   641
        self error: 'I expected JavaMethodRef instance as an argument'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   642
    ].
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   643
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   644
    "Created: / 11-04-2011 / 19:47:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   645
    "Modified: / 01-12-2012 / 13:47:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   646
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   647
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   648
!JavaResolver class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   649
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   650
version_CVS
3360
1a8899091305 Merged with mercurial revision cb6c15e66be (594 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   651
    ^ '$Header: /cvs/stx/stx/libjava/JavaResolver.st,v 1.7 2015-01-28 02:10:50 vrany Exp $'
2156
a8c5720d1d05 changed: #resolveMethodIndentifiedByRef:
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   652
!
a8c5720d1d05 changed: #resolveMethodIndentifiedByRef:
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   653
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   654
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   655
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   656
    ^ '$Changeset: <not expanded> $'
2156
a8c5720d1d05 changed: #resolveMethodIndentifiedByRef:
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   657
!
a8c5720d1d05 changed: #resolveMethodIndentifiedByRef:
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   658
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   659
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   660
    ^ 'Id'
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   661
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   662
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2231
diff changeset
   663
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 750
diff changeset
   664
JavaResolver initialize!