Tabnine Logo
ConstantLookupSite.checkForBailout
Code IndexAdd Tabnine to your IDE (free)

How to use
checkForBailout
method
in
org.jruby.ir.targets.ConstantLookupSite

Best Java code snippets using org.jruby.ir.targets.ConstantLookupSite.checkForBailout (Showing top 4 results out of 315)

origin: org.jruby/jruby-complete

public IRubyObject inheritanceSearchConst(ThreadContext context, IRubyObject cmVal) throws Throwable {
  Ruby runtime = context.runtime;
  RubyModule module;
  if (cmVal instanceof RubyModule) {
    module = (RubyModule) cmVal;
  } else {
    throw runtime.newTypeError(cmVal + " is not a type/class");
  }
  if (checkForBailout(module)) {
    return bail(context, cmVal, noCacheISC());
  }
  // Inheritance lookup
  IRubyObject constant = module.getConstantNoConstMissingSkipAutoload(name);
  if (constant == null) {
    constant = UndefinedValue.UNDEFINED;
  }
  // bind constant until invalidated
  bind(runtime, module, constant, ISC());
  tracker.addType(module.id);
  if (Options.INVOKEDYNAMIC_LOG_CONSTANTS.load()) {
    LOG.info(name + "\tconstant cached from type (inheritanceSearchConst) " + cmVal.getMetaClass());
  }
  return constant;
}
origin: org.jruby/jruby-core

public IRubyObject inheritanceSearchConst(ThreadContext context, IRubyObject cmVal) throws Throwable {
  Ruby runtime = context.runtime;
  RubyModule module;
  if (cmVal instanceof RubyModule) {
    module = (RubyModule) cmVal;
  } else {
    throw runtime.newTypeError(cmVal + " is not a type/class");
  }
  if (checkForBailout(module)) {
    return bail(context, cmVal, noCacheISC());
  }
  // Inheritance lookup
  IRubyObject constant = module.getConstantNoConstMissingSkipAutoload(name);
  if (constant == null) {
    constant = UndefinedValue.UNDEFINED;
  }
  // bind constant until invalidated
  bind(runtime, module, constant, ISC());
  tracker.addType(module.id);
  if (Options.INVOKEDYNAMIC_LOG_CONSTANTS.load()) {
    LOG.info(name + "\tconstant cached from type (inheritanceSearchConst) " + cmVal.getMetaClass());
  }
  return constant;
}
origin: org.jruby/jruby-complete

public IRubyObject searchModuleForConst(ThreadContext context, IRubyObject cmVal) throws Throwable {
  if (!(cmVal instanceof RubyModule)) throw context.runtime.newTypeError(cmVal + " is not a type/class");
  RubyModule module = (RubyModule) cmVal;
  if (checkForBailout(module)) {
    return bail(context, cmVal, noCacheSMFC());
  }
  // Inheritance lookup
  Ruby runtime = context.getRuntime();
  IRubyObject constant = publicOnly ? module.getConstantFromNoConstMissing(name, false) : module.getConstantNoConstMissing(name);
  // Call const_missing or cache
  if (constant == null) {
    if (callConstMissing) {
      return module.callMethod(context, "const_missing", getSymbolicName(context));
    } else {
      return UndefinedValue.UNDEFINED;
    }
  }
  // bind constant until invalidated
  bind(runtime, module, constant, SMFC());
  if (Options.INVOKEDYNAMIC_LOG_CONSTANTS.load()) {
    LOG.info(name + "\tretrieved and cached from module (searchModuleForConst) " + cmVal.getMetaClass());// + " added to PIC" + extractSourceInfo(site));
  }
  return constant;
}
origin: org.jruby/jruby-core

public IRubyObject searchModuleForConst(ThreadContext context, IRubyObject cmVal) throws Throwable {
  if (!(cmVal instanceof RubyModule)) throw context.runtime.newTypeError(cmVal + " is not a type/class");
  RubyModule module = (RubyModule) cmVal;
  if (checkForBailout(module)) {
    return bail(context, cmVal, noCacheSMFC());
  }
  // Inheritance lookup
  Ruby runtime = context.getRuntime();
  IRubyObject constant = publicOnly ? module.getConstantFromNoConstMissing(name, false) : module.getConstantNoConstMissing(name);
  // Call const_missing or cache
  if (constant == null) {
    if (callConstMissing) {
      return module.callMethod(context, "const_missing", getSymbolicName(context));
    } else {
      return UndefinedValue.UNDEFINED;
    }
  }
  // bind constant until invalidated
  bind(runtime, module, constant, SMFC());
  if (Options.INVOKEDYNAMIC_LOG_CONSTANTS.load()) {
    LOG.info(name + "\tretrieved and cached from module (searchModuleForConst) " + cmVal.getMetaClass());// + " added to PIC" + extractSourceInfo(site));
  }
  return constant;
}
org.jruby.ir.targetsConstantLookupSitecheckForBailout

Popular methods of ConstantLookupSite

  • <init>
  • ISC
  • SMFC
  • bail
  • bind
  • getFallback
  • getSymbolicName
  • getTarget
  • noCacheISC
  • noCacheSMFC
  • setTarget
  • type
  • setTarget,
  • type

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • String (java.lang)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now