本文整理汇总了C++中BlockEnvironment::compiled_code方法的典型用法代码示例。如果您正苦于以下问题:C++ BlockEnvironment::compiled_code方法的具体用法?C++ BlockEnvironment::compiled_code怎么用?C++ BlockEnvironment::compiled_code使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockEnvironment
的用法示例。
在下文中一共展示了BlockEnvironment::compiled_code方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: under_call_frame
BlockEnvironment* BlockEnvironment::under_call_frame(STATE, GCToken gct,
CompiledCode* ccode, MachineCode* caller,
CallFrame* call_frame)
{
MachineCode* mcode = ccode->machine_code();
if(!mcode) {
OnStack<1> os(state, ccode);
state->set_call_frame(call_frame);
mcode = ccode->internalize(state, gct);
if(!mcode) {
Exception::internal_error(state, call_frame, "invalid bytecode method");
return 0;
}
}
mcode->set_parent(caller);
BlockEnvironment* be = state->new_object_dirty<BlockEnvironment>(G(blokenv));
be->scope(state, call_frame->promote_scope(state));
be->top_scope(state, call_frame->top_scope(state));
be->compiled_code(state, ccode);
be->module(state, call_frame->module());
be->metadata_container(state, nil<Tuple>());
return be;
}
示例3:
void BlockEnvironment::Info::show(STATE, Object* self, int level) {
BlockEnvironment* be = as<BlockEnvironment>(self);
class_header(state, self);
//indent_attribute(++level, "scope"); be->scope()->show(state, level);
// indent_attribute(level, "top_scope"); be->top_scope()->show(state, level);
indent_attribute(level, "compiled_code"); be->compiled_code()->show(state, level);
close_body(level);
}
示例4: 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;
}
示例5: 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;
}