是“调用堆栈”吗?与“执行上下文堆栈”相同在JavaScript? [英] Is "Call stack" the same as "Execution context stack" in JavaScript?

查看:136
本文介绍了是“调用堆栈”吗?与“执行上下文堆栈”相同在JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常在很多文章中看到调用堆栈。
是这样的:



但是在ECMAScript文档中找不到调用堆栈。

调用堆栈与

解决方案

СallStack执行Stack 是同一件事的不同名称。它是一个LIFO堆栈,用于存储在代码执行期间创建的执行上下文。



Wikipedia说:这种堆栈也称为执行堆栈程序堆栈控制堆栈运行时堆栈机器堆栈
https://en.wikipedia.org/wiki/Call_stack



还有一句话:实际上,JavaScript引擎会创建所谓的执行堆栈(也称为调用堆栈)。
https:/ /tylermcginnis.com/ultimate-guide-to-execution-contexts-hoisting-scopes-and-closures-in-javascript/


I often see the "Call stack" in many articles. like this: https://hackernoon.com/understanding-js-the-event-loop-959beae3ac40#ec22

But can't find the "call stack" in the ECMAScript document.
Is "Call stack" the same as "Execution context stack"?

解决方案

Сall Stack and Execution Stack are different names for the same thing. It is a LIFO stack that is used to store execution contexts created during code execution.

Wikipedia says: "This kind of stack is also known as an execution stack, program stack, control stack, run-time stack, or machine stack" https://en.wikipedia.org/wiki/Call_stack

One more quote: "In reality, the JavaScript engine creates what’s called an "Execution Stack" (also known as the "Call Stack")." https://tylermcginnis.com/ultimate-guide-to-execution-contexts-hoisting-scopes-and-closures-in-javascript/

这篇关于是“调用堆栈”吗?与“执行上下文堆栈”相同在JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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