本文整理汇总了C++中instruction_operand类的典型用法代码示例。如果您正苦于以下问题:C++ instruction_operand类的具体用法?C++ instruction_operand怎么用?C++ instruction_operand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了instruction_operand类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: operator
void operator()(instruction_operand op)
{
relocation_type type = op.rel_type();
if(type == RT_ENTRY_POINT
|| type == RT_ENTRY_POINT_PIC
|| type == RT_ENTRY_POINT_PIC_TAIL)
op.store_code_block(visitor(op.load_code_block()));
}
开发者ID:dmsh,项目名称:factor,代码行数:8,代码来源:code_block_visitor.hpp
示例2: operator
void operator()(instruction_operand op)
{
switch(op.rel_type())
{
case RT_LITERAL:
op.store_value(next_literal());
break;
case RT_XT:
op.store_value(parent->compute_xt_address(next_literal()));
break;
case RT_XT_PIC:
op.store_value(parent->compute_xt_pic_address(next_literal()));
break;
case RT_XT_PIC_TAIL:
op.store_value(parent->compute_xt_pic_tail_address(next_literal()));
break;
case RT_HERE:
op.store_value(parent->compute_here_address(next_literal(),op.rel_offset(),op.parent_code_block()));
break;
case RT_UNTAGGED:
op.store_value(untag_fixnum(next_literal()));
break;
default:
parent->store_external_address(op);
break;
}
}
开发者ID:inforichland,项目名称:factor-id3,代码行数:27,代码来源:code_blocks.cpp
示例3: operator
void operator()(instruction_operand op)
{
code_block *compiled = op.parent_code_block();
cell old_offset = op.rel_offset() + (cell)compiled->entry_point() - code_offset;
switch(op.rel_type())
{
case RT_LITERAL:
op.store_value(data_visitor.visit_pointer(op.load_value(old_offset)));
break;
case RT_ENTRY_POINT:
case RT_ENTRY_POINT_PIC:
case RT_ENTRY_POINT_PIC_TAIL:
op.store_code_block(code_visitor(op.load_code_block(old_offset)));
break;
case RT_HERE:
op.store_value(op.load_value(old_offset) + code_offset);
break;
case RT_UNTAGGED:
break;
default:
parent->store_external_address(op);
break;
}
}
开发者ID:littledan,项目名称:Factor,代码行数:25,代码来源:image.cpp
示例4: operator
void operator()(instruction_operand op)
{
if(op.rel_type() == RT_DLSYM && op.pointer <= return_address)
{
code_block *compiled = op.compiled;
array *parameters = untag<array>(compiled->parameters);
cell index = op.index;
symbol = array_nth(parameters,index);
library = array_nth(parameters,index + 1);
}
}
开发者ID:erg,项目名称:factor,代码行数:11,代码来源:code_blocks.cpp
示例5: operator
void operator()(instruction_operand op)
{
cell old_offset = op.rel_offset() + (cell)old_address->entry_point();
switch(op.rel_type())
{
case RT_LITERAL:
{
cell value = op.load_value(old_offset);
if(immediate_p(value))
op.store_value(value);
else
op.store_value(RETAG(fixup.fixup_data(untag<object>(value)),TAG(value)));
break;
}
case RT_ENTRY_POINT:
case RT_ENTRY_POINT_PIC:
case RT_ENTRY_POINT_PIC_TAIL:
case RT_HERE:
{
cell value = op.load_value(old_offset);
cell offset = TAG(value);
code_block *compiled = (code_block *)UNTAG(value);
op.store_value((cell)fixup.fixup_code(compiled) + offset);
break;
}
case RT_THIS:
case RT_CARDS_OFFSET:
case RT_DECKS_OFFSET:
parent->store_external_address(op);
break;
default:
op.store_value(op.load_value(old_offset));
break;
}
}
开发者ID:HalfMadDad,项目名称:factor,代码行数:36,代码来源:compaction.cpp
示例6: operator
void operator()(instruction_operand op)
{
switch(op.rel_type())
{
case RT_ENTRY_POINT:
{
code_block *compiled = op.load_code_block();
cell owner = compiled->owner;
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_address(owner));
break;
}
case RT_ENTRY_POINT_PIC:
{
code_block *compiled = op.load_code_block();
if(reset_inline_caches || !compiled->pic_p())
{
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_pic_address(owner));
}
break;
}
case RT_ENTRY_POINT_PIC_TAIL:
{
code_block *compiled = op.load_code_block();
if(reset_inline_caches || !compiled->pic_p())
{
cell owner = parent->code_block_owner(compiled);
if(to_boolean(owner))
op.store_value(parent->compute_entry_point_pic_tail_address(owner));
}
break;
}
default:
break;
}
}
开发者ID:8byte-jose,项目名称:factor,代码行数:38,代码来源:code_blocks.cpp
示例7: store_external_address
void factor_vm::store_external_address(instruction_operand op)
{
code_block *compiled = op.parent_code_block();
array *parameters = (to_boolean(compiled->parameters) ? untag<array>(compiled->parameters) : NULL);
cell index = op.parameter_index();
switch(op.rel_type())
{
case RT_PRIMITIVE:
op.store_value(compute_primitive_address(array_nth(parameters,index)));
break;
case RT_DLSYM:
op.store_value(compute_dlsym_address(parameters,index));
break;
case RT_THIS:
op.store_value((cell)compiled->xt());
break;
case RT_CONTEXT:
op.store_value(compute_context_address());
break;
case RT_MEGAMORPHIC_CACHE_HITS:
op.store_value((cell)&dispatch_stats.megamorphic_cache_hits);
break;
case RT_VM:
op.store_value(compute_vm_address(array_nth(parameters,index)));
break;
case RT_CARDS_OFFSET:
op.store_value(cards_offset);
break;
case RT_DECKS_OFFSET:
op.store_value(decks_offset);
break;
default:
critical_error("Bad rel type",op.rel_type());
break;
}
}
开发者ID:inforichland,项目名称:factor-id3,代码行数:37,代码来源:code_blocks.cpp
示例8: store_external_address
void factor_vm::store_external_address(instruction_operand op)
{
code_block *compiled = op.parent_code_block();
array *parameters = (to_boolean(compiled->parameters) ? untag<array>(compiled->parameters) : NULL);
cell index = op.parameter_index();
switch(op.rel_type())
{
case RT_DLSYM:
op.store_value(compute_dlsym_address(parameters,index));
break;
case RT_THIS:
op.store_value((cell)compiled->entry_point());
break;
case RT_MEGAMORPHIC_CACHE_HITS:
op.store_value((cell)&dispatch_stats.megamorphic_cache_hits);
break;
case RT_VM:
op.store_value(compute_vm_address(array_nth(parameters,index)));
break;
case RT_CARDS_OFFSET:
op.store_value(cards_offset);
break;
case RT_DECKS_OFFSET:
op.store_value(decks_offset);
break;
#ifdef WINDOWS
case RT_EXCEPTION_HANDLER:
op.store_value((cell)&factor::exception_handler);
break;
#endif
default:
critical_error("Bad rel type in store_external_address()",op.rel_type());
break;
}
}
开发者ID:8byte-jose,项目名称:factor,代码行数:36,代码来源:code_blocks.cpp
示例9: operator
void operator()(instruction_operand op) {
if (op.rel_type() == RT_LITERAL)
op.store_value(visitor->visit_pointer(op.load_value()));
}
开发者ID:Bigot,项目名称:factor,代码行数:4,代码来源:slot_visitor.hpp
注:本文中的instruction_operand类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论