当前位置: 首页>>代码示例>>C++>>正文


C++ CompiledMethod::internalize方法代码示例

本文整理汇总了C++中CompiledMethod::internalize方法的典型用法代码示例。如果您正苦于以下问题:C++ CompiledMethod::internalize方法的具体用法?C++ CompiledMethod::internalize怎么用?C++ CompiledMethod::internalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CompiledMethod的用法示例。


在下文中一共展示了CompiledMethod::internalize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: default_executor

  Object* CompiledMethod::default_executor(STATE, CallFrame* call_frame, Dispatch& msg,
                                           Arguments& args) {
    CompiledMethod* cm = as<CompiledMethod>(msg.method);
    const char* reason = 0;
    int ip = -1;

    if(!cm->internalize(state, &reason, &ip)) {
      Exception::bytecode_error(state, call_frame, cm, ip, reason);
      return 0;
    }

    // Refactor
    cm->backend_method_->find_super_instructions();
    return cm->execute(state, call_frame, msg, args);
  }
开发者ID:mallibone,项目名称:rubinius,代码行数:15,代码来源:compiledmethod.cpp

示例2: set_breakpoint

  Object* CompiledMethod::set_breakpoint(STATE, GCToken gct, Fixnum* ip, Object* bp) {
    CompiledMethod* self = this;
    OnStack<3> os(state, self, ip, bp);

    int i = ip->to_native();
    if(self->backend_method_ == NULL) {
      if(!self->internalize(state, gct)) return Primitives::failure();
    }

    if(!self->backend_method_->validate_ip(state, i)) return Primitives::failure();

    if(self->breakpoints_->nil_p()) {
      self->breakpoints(state, LookupTable::create(state));
    }

    self->breakpoints_->store(state, ip, bp);
    self->backend_method_->debugging = 1;
    self->backend_method_->run = VMMethod::debugger_interpreter;

    return ip;
  }
开发者ID:Gonzih,项目名称:rubinius,代码行数:21,代码来源:compiledmethod.cpp

示例3: default_executor

  Object* CompiledMethod::default_executor(STATE, CallFrame* call_frame,
                          Executable* exec, Module* mod, Arguments& args)
  {
    LockableScopedLock lg(state, &state->shared, __FILE__, __LINE__);

    CompiledMethod* cm = as<CompiledMethod>(exec);
    if(cm->execute == default_executor) {
      const char* reason = 0;
      int ip = -1;

      OnStack<4> os(state, cm, exec, mod, args.argument_container_location());
      GCTokenImpl gct;

      if(!cm->internalize(state, gct, &reason, &ip)) {
        Exception::bytecode_error(state, call_frame, cm, ip, reason);
        return 0;
      }
    }

    lg.unlock();

    return cm->execute(state, call_frame, exec, mod, args);
  }
开发者ID:Gonzih,项目名称:rubinius,代码行数:23,代码来源:compiledmethod.cpp


注:本文中的CompiledMethod::internalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。