Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/RubyContext.java @ 13645:497fada09efb
Ruby: remove versioning.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Wed, 15 Jan 2014 19:27:27 +0000 |
parents | fb846424299f |
children | 50c11b9a7fdf |
comparison
equal
deleted
inserted
replaced
13640:bfe7a8c8c3c6 | 13645:497fada09efb |
---|---|
79 debugManager = configuration.getDebug() ? new RubyDebugManager(this) : null; | 79 debugManager = configuration.getDebug() ? new RubyDebugManager(this) : null; |
80 | 80 |
81 // Must initialize threads before fibers | 81 // Must initialize threads before fibers |
82 | 82 |
83 threadManager = new ThreadManager(this); | 83 threadManager = new ThreadManager(this); |
84 | 84 fiberManager = new FiberManager(this); |
85 if (configuration.getRubyVersion().is19OrLater()) { | |
86 fiberManager = new FiberManager(this); | |
87 } else { | |
88 fiberManager = null; | |
89 } | |
90 } | 85 } |
91 | 86 |
92 public String getLanguageShortName() { | 87 public String getLanguageShortName() { |
93 return configuration.getRubyVersion().getShortName(); | 88 return "Ruby"; |
94 } | 89 } |
95 | 90 |
96 public RubyDebugManager getDebugManager() { | 91 public RubyDebugManager getDebugManager() { |
97 return debugManager; | 92 return debugManager; |
98 } | 93 } |
185 | 180 |
186 return callTarget.call(null, arguments); | 181 return callTarget.call(null, arguments); |
187 } catch (RaiseException e) { | 182 } catch (RaiseException e) { |
188 throw e; | 183 throw e; |
189 } catch (ThrowException e) { | 184 } catch (ThrowException e) { |
190 if (context.getConfiguration().getRubyVersion().is18OrEarlier()) { | 185 throw new RaiseException(context.getCoreLibrary().argumentErrorUncaughtThrow(e.getTag())); |
191 throw new RaiseException(context.getCoreLibrary().nameErrorUncaughtThrow(e.getTag())); | |
192 } else { | |
193 throw new RaiseException(context.getCoreLibrary().argumentErrorUncaughtThrow(e.getTag())); | |
194 } | |
195 } catch (BreakShellException | QuitException e) { | 186 } catch (BreakShellException | QuitException e) { |
196 throw e; | 187 throw e; |
197 } catch (Throwable e) { | 188 } catch (Throwable e) { |
198 throw new RaiseException(ExceptionTranslator.translateException(this, e)); | 189 throw new RaiseException(ExceptionTranslator.translateException(this, e)); |
199 } | 190 } |