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


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

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


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

示例1: default_executor

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

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

      OnStack<5> os(state, code, exec, mod, args.recv_location(), args.block_location());

      VariableRootBuffer vrb(state->vm()->current_root_buffers(),
                             &args.arguments_location(), args.total());
      GCTokenImpl gct;

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

    lg.unlock();

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

示例2: constant_caches

  Tuple* CompiledCode::constant_caches(STATE) {
    CompiledCode* self = this;
    OnStack<1> os(state, self);

    if(self->machine_code() == NULL) {
      if(!self->internalize(state)) return force_as<Tuple>(Primitives::failure());
    }
    MachineCode* mcode = self->machine_code();
    return mcode->constant_caches(state);
  }
开发者ID:clockmaker002,项目名称:rubinius,代码行数:10,代码来源:compiled_code.cpp

示例3: default_executor

  Object* CompiledCode::default_executor(STATE,
                          Executable* exec, Module* mod, Arguments& args)
  {
    CompiledCode* code = as<CompiledCode>(exec);

    if(code->execute == default_executor) {
      if(!code->internalize(state)) return 0;
    }

    return code->execute(state, exec, mod, args);
  }
开发者ID:clockmaker002,项目名称:rubinius,代码行数:11,代码来源:compiled_code.cpp

示例4: constant_caches

  Tuple* CompiledCode::constant_caches(STATE, CallFrame* calling_environment) {
    GCTokenImpl gct;
    CompiledCode* self = this;
    OnStack<1> os(state, self);

    if(self->machine_code_ == NULL) {
      if(!self->internalize(state, gct, calling_environment)) return force_as<Tuple>(Primitives::failure());
    }
    MachineCode* mcode = self->machine_code_;
    return mcode->constant_caches(state);
  }
开发者ID:Red54,项目名称:rubinius,代码行数:11,代码来源:compiled_code.cpp

示例5: set_breakpoint

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

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

    if(!self->machine_code_->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->machine_code_->debugging = 1;
    self->machine_code_->run = MachineCode::debugger_interpreter;

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


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