致电现场说明? [英] Call-site explanation?

查看:71
本文介绍了致电现场说明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

扫描互联网,无法以一种简单的方式理解 -呼叫站点(@dlr)一词。
一直在阅读这里 CallSite是:

scaning the internet , im having trouble understanding in a simple manner - the term call-site (@dlr). ive been reading here that CallSite is :

一个站点说

调用该方法的位置。

一本书说:


呼叫站点。这就是DLR的原子-最小的
代码片段,可以视为一个单元。一个表达式可能
包含很多呼叫站点,但是该行为是以
自然方式构建的,一次评估一个呼叫站点。对于
的其余讨论,我们一次只会考虑一个呼叫站点。
对于一个呼叫站点引用
的小例子很有用,所以这是一个非常简单的例子,其中d当然是
类型的变量,动态类型

call site . This is the sort of atom of the DLR - the smallest piece of codewhich can be considered as a single unit. One expression may contain a lot of call sites, but the behavioris built up in the natural way, evaluating one call site at a time. For the rest of the discussion, we'll onlyconsider a single call site at a time. It's going to be useful to have a small example of a call site to refer to,so here's a very simple one, where d is of course a variable of type dynamic

d.Foo(10);呼叫站点以代码形式表示为
System.Runtime.CompilerServices.CallSite。

d.Foo(10); The call site is represented in code as a System.Runtime.CompilerServices.CallSite.

另一本书说:


编译器发出的代码最终会生成描述操作的表达式树
,由调用站点来管理,DLR会调用
在运行时绑定。呼叫站点实质上是呼叫者和被呼叫者之间的中介

the compiler emits code that eventually results in an expression tree that describes the operation, managed by a call site that the DLR will bind at runtime. The call site essentially acts as an intermediary between caller and callee.

对不起,我不能 >看看这3个解释在哪里组合成一个简单的解释。

sorry , I cant see where those 3 explanations are combining into one simple explanation.

我很乐意得到一个简单的解释:

i'll be happy to get a simple explanation :


我如何解释我的妻子-什么是呼叫站点?

HOw can I explain my wife -what are call-sites ?


推荐答案

第一个解释与dlr或动态类型无关:简单来说,调用站点是源代码中所在的位置(或站点)

The first explanation has nothing to do with the dlr or the dynamic type: simply speaking, a call site is a location (or site) in the source code where a method is called.

在实现动态类型时,有必要存储有关代码中包含的动态方法调用的信息,以便可以在运行时调用它们(dlr需要查找方法,解决重载等)。代表此信息的对象似乎也应该被称为呼叫站点。

In implementing the dynamic type, it is necessary to store information about the dynamic method calls contained in your code, so they can be invoked at runtime (the dlr needs to look up the method, resolve overloads, etc.). It seems natural that the object representing this information should also be called a "call site".

这篇关于致电现场说明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆