亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專(zhuān)欄INFORMATION COLUMN

執(zhí)行上下文(執(zhí)行環(huán)境)-Chapter1

elisa.yang / 528人閱讀

摘要:堆棧結(jié)構(gòu)的底部是全局執(zhí)行上下文,頂部是當(dāng)前執(zhí)行上下文。不同的執(zhí)行上下文切換時(shí)堆棧會(huì)發(fā)生改變譯論及代碼類(lèi)型時(shí),在某些時(shí)候可能也意味著執(zhí)行上下文。函數(shù)體中代碼執(zhí)行完后,只剩全局上下文直到程序結(jié)束譯代碼更有意思。

第一次翻譯,希望各位多多包涵,有錯(cuò)誤處還望指出,歡迎提出建議。

Chapter 1.Execution Contexts

Introduction (介紹)

Definitions (定義)

Types of excutable code (可執(zhí)行代碼的類(lèi)型)

Global code(全局代碼)

Funcion code(函數(shù)代碼)

Eval code(eval代碼)

Conclusion(結(jié)論)

Additional literature (文獻(xiàn)參考)

Introduction

In this note we will metion execution contexts of ECMAScript and types of executable code related with them.

譯:在這篇筆記中,我們將討論執(zhí)行環(huán)境和相關(guān)的可執(zhí)行代碼類(lèi)型。

Definitions

Every time when control is transferred to ECMAScript executable code, control is entered an execution context.

譯:當(dāng)控制流即將執(zhí)行代碼時(shí),總是先進(jìn)入執(zhí)行上下文

Execution context( abbreviated from - EC) is the abstract concept used by ECMA-262 specification for typification and differentation of an executable code.

譯:執(zhí)行上下文(縮寫(xiě)為EC)是ECMA-262使用的抽象概念,通常用來(lái)表示可執(zhí)行代碼的類(lèi)型和區(qū)別。

The standard does not define accurate structure and kind of EC from the technical implementation viewpoint; it is a question of the ECMAScript-engines implementing the standard.

譯:官方標(biāo)準(zhǔn)沒(méi)有定義EC的確切結(jié)構(gòu)和技術(shù)實(shí)現(xiàn),按照規(guī)范來(lái)實(shí)現(xiàn)依然ECMAScript引擎的問(wèn)題

Logically, set of active execution contexts forms a stack. The bottom of this stack is always a global context, the top - a current (active) execution context. The stack is modified (pushed/popped) during the entering and exiting various kinds of EC.

譯:從邏輯上來(lái)看,許多激活的執(zhí)行上下文會(huì)形成一個(gè)堆棧結(jié)構(gòu)。堆棧結(jié)構(gòu)的底部是全局執(zhí)行上下文,頂部是當(dāng)前執(zhí)行上下文。不同的執(zhí)行上下文切換時(shí)堆棧會(huì)發(fā)生改變

Types of executable code

With abstract concept of an execution context, the concept of type of an executable code is related. Speaking about code type, it is possible in the certain moments to mean an execution context.

譯:論及代碼類(lèi)型時(shí),在某些時(shí)候可能也意味著執(zhí)行上下文??蓤?zhí)行上下文的抽象概念和其類(lèi)型是分不開(kāi)的

For examples, we define the stack of execution contexts as an array:

譯:例如,我們將執(zhí)行上下文的堆棧定義為數(shù)組

ECStack = [];

The stack is pushed every time on entering a function (even if the function is called recursively or as the constructor), and also at built-in eval function work.

譯:控制流每次進(jìn)入函數(shù)(即使該函數(shù)是遞歸調(diào)用或作為構(gòu)造器)時(shí),入棧就會(huì)發(fā)生,同樣內(nèi)嵌在該函數(shù)中的eval函數(shù)也會(huì)引發(fā)入棧行為。

Global code

This type of code is processed at level Program: i.e. the loaded external .js -file or the local inline-code (inside the tags). The global code does not include any parts of a code which are in bodies of functions.

譯:這種類(lèi)型的代碼是以程序級(jí)別處理的:比如說(shuō)額外的js文件或者局部的內(nèi)連代碼(在

閱讀需要支付1元查看
<