本文整理汇总了C#中CodeGenContext.ruby_cbase方法的典型用法代码示例。如果您正苦于以下问题:C# CodeGenContext.ruby_cbase方法的具体用法?C# CodeGenContext.ruby_cbase怎么用?C# CodeGenContext.ruby_cbase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeGenContext
的用法示例。
在下文中一共展示了CodeGenContext.ruby_cbase方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Defined
internal override void Defined(CodeGenContext context)
{
// Fixme: make sure CurrentRubyClass is not a singleton (see cvar_cbase)
// Ruby.Variables.cvar_defined(ruby_cref, "vid");
context.ruby_cbase(parent_scope);
context.ldstr(vid.ToString());
context.call(Runtime.Variables.cvar_defined);
}
示例2: Assign
internal override void Assign(CodeGenContext context, Node rhs)
{
// Fixme: make sure CurrentRubyClass is not a singleton (see cvar_cbase)
// object value = rhs;
bool created;
ISimple value = context.PreCompute(rhs, "rhs", out created);
// Ruby.Variables.cvar_set(caller, ruby_cref, "vid", value);
context.ldloc(0);
context.ruby_cbase(parent_scope);
context.ldstr(vid.ToString());
value.GenSimple(context);
context.call(Runtime.Variables.cvar_set);
context.ReleaseLocal(value, created);
}
示例3: GenSimple
public void GenSimple(CodeGenContext context)
{
// Fixme: make sure CurrentRubyClass is not a singleton (see cvar_cbase)
// Ruby.Variables.cvar_get(caller, ruby_cref, "vid");
context.ldloc(0);
context.ruby_cbase(parent_scope);
context.ldstr(vid.ToString());
context.call(Runtime.Variables.cvar_get);
}
示例4: GenCode0
internal override void GenCode0(CodeGenContext context)
{
if (qualified)
if (scope != null)
scope.GenCode(context);
else
context.ldsfld(Ruby.Compiler.Runtime.Init.rb_cObject);
else
context.ruby_cbase(parent_scope);
context.ldstr(vid.ToString());
context.ldloc(0);
context.call(Runtime.Eval.get_const);
}