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


C++ BlockEnvironment::module方法代码示例

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


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

示例1: under_call_frame

  BlockEnvironment* BlockEnvironment::under_call_frame(STATE, CompiledMethod* cm,
      VMMethod* caller, CallFrame* call_frame, size_t index)
  {
    BlockEnvironment* be = state->new_object<BlockEnvironment>(G(blokenv));

    VMMethod* vmm = caller->blocks.at(index);
    if(!vmm) {
      vmm = cm->formalize(state);
      if(caller->type) {
        vmm->specialize(state, caller->type);
      }
      caller->blocks[index] = vmm;

      vmm->set_parent(caller);
    }

    be->scope(state, call_frame->promote_scope(state));
    be->top_scope(state, call_frame->top_scope(state));
    be->method(state, cm);
    be->module(state, call_frame->module());
    be->local_count(state, cm->local_count());
    be->vmm = vmm;
    BlockExecutor native = reinterpret_cast<BlockExecutor>(vmm->native_function);
    if(native) {
      be->execute = native;
    } else {
      be->execute = &BlockEnvironment::execute_interpreter;
    }
    return be;
  }
开发者ID:,项目名称:,代码行数:30,代码来源:

示例2: under_call_frame

  BlockEnvironment* BlockEnvironment::under_call_frame(STATE,
      CompiledCode* ccode, MachineCode* caller)
  {

    MachineCode* mcode = ccode->machine_code();
    if(!mcode) {
      OnStack<1> os(state, ccode);
      mcode = ccode->internalize(state);
      if(!mcode) {
        Exception::internal_error(state, "invalid bytecode method");
        return 0;
      }
    }

    BlockEnvironment* be =
      state->memory()->new_object<BlockEnvironment>(state, G(blokenv));

    CallFrame* call_frame = state->vm()->call_frame();

    be->scope(state, call_frame->promote_scope(state));
    be->top_scope(state, call_frame->top_scope(state));
    be->compiled_code(state, ccode);
    be->constant_scope(state, call_frame->constant_scope());
    be->module(state, call_frame->module());

    return be;
  }
开发者ID:jordan-heemskerk,项目名称:rubinius,代码行数:27,代码来源:block_environment.cpp

示例3: dup

  BlockEnvironment* BlockEnvironment::dup(STATE) {
    BlockEnvironment* be = state->new_object_dirty<BlockEnvironment>(G(blokenv));

    be->scope(state, scope_);
    be->top_scope(state, top_scope_);
    be->compiled_code(state, compiled_code_);
    be->module(state, nil<Module>());
    return be;
  }
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: dup

  BlockEnvironment* BlockEnvironment::dup(STATE) {
    BlockEnvironment* be =
      state->memory()->new_object<BlockEnvironment>(state, G(blokenv));

    be->scope(state, scope());
    be->top_scope(state, top_scope());
    be->compiled_code(state, compiled_code());
    be->constant_scope(state, constant_scope());
    be->module(state, nil<Module>());

    return be;
  }
开发者ID:jordan-heemskerk,项目名称:rubinius,代码行数:12,代码来源:block_environment.cpp

示例5: under_call_frame

  BlockEnvironment* BlockEnvironment::under_call_frame(STATE, CompiledMethod* cm,
      VMMethod* caller, CallFrame* call_frame, size_t index)
  {
    BlockEnvironment* be = state->new_object<BlockEnvironment>(G(blokenv));

    VMMethod* vmm = cm->internalize(state);
    if(!vmm) {
      Exception::internal_error(state, call_frame, "invalid bytecode method");
      return 0;
    }

    vmm->set_parent(caller);

    be->scope(state, call_frame->promote_scope(state));
    be->top_scope(state, call_frame->top_scope(state));
    be->code(state, cm);
    be->module(state, call_frame->module());
    return be;
  }
开发者ID:BRIMIL01,项目名称:rubinius,代码行数:19,代码来源:block_environment.cpp


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