Origin of Ray

Lift the fog of the Internet together

What is Serverless?

Serverless is called serverless in Chinese.

Serverless is a Cloud Native development model that allows developers to focus on building and running applications without managing servers.

The difference between serverless and other Cloud Service models is that it is the responsibility of the cloud provider to manage the cloud infrastructure and application expansion. Serverless applications are deployed in containers that are automatically launched on demand when called.

Read more »

These two weeks took out the university’s data structures and algorithms again to look at the second chapter of the linear table part, and some new gains, I think, to summarize.

Read more »

How Google V8 executes a piece of JavaScript code

This article is mainly a simple and unified summary of some old-fashioned JavaScript features, and a certain explanation of how V8 implements these features.

The main purpose is to introduce the execution flow of V8 and string together familiar features to form an overall understanding and why JavaScript is designed the way it is.

There will be some thoughts interspersed in the middle, such as some problems we should avoid in coding.

Read more »

As we all know, JavaScript is a language for automatic garbage collection, which means that we don’t need to manually collect garbage data. All of this is done by V8’s garbage collector. In order to collect garbage more efficiently, V8 introduced two garbage collectors, each targeting different scenarios.

Let’s analyze the usage scenarios and working principles of these two recycling mechanisms together.

Read more »

In the last blog we talked about the overall execution process of V8, and this time I will continue to summarize how V8 implements fast lookup of properties on objects.

Note that this part of the content is not a scope chain, nor a prototype chain. The scope chain is used to find objects, such as obj. The prototype chain is to go to its prototype if there is no attribute a on obj, and the topic of this article is how to quickly find a on obj.

Read more »

This week, I bought another course by Mr. Li Bing on Geek Time, a course on the introduction to the principles of Google V8. Many knowledge points, including the overall execution process of V8, how variables are stored, how objects can quickly retrieve properties, how functions are compiled, how closures are implemented, how different calling methods affect the distribution of stacks, etc.

I feel that there is a lot of content, so I will continue the original series. This time, I will summarize my understanding of the process of executing JavaScript in V8 after reading it.

Read more »

The last blog talked about the workflow of babel-parser, there are two main components, one is the Tokenizer to split the code string into Token arrays, and the other is the parser to convert the Token arrays into AST trees.

This time, let’s take a closer look at the logic of Tokenizer.

Read more »

In the previous article, when analyzing the Babel compilation process, we mentioned that Babel converts JS code into ASTs (Abstract Syntax Trees). This behavior is a generic one, no matter what programming language parses the source code into an AST, AST is not specific to Babel, let alone to JS.

Why do we need to do this? The original JS file is incomprehensible to the computer, and it is difficult for the computer to modify the JS code directly, but by converting it to an AST, which is essentially a set of objects that represent the structure of the program, we can indirectly modify the code by modifying the objects. AST to generate bytecode.

Parser’s process is divided into two steps, the first step, lexical analysis, which is the finite state machine in the compilation principle, to split a piece of code into individual Tokens, and the second step, syntax analysis, to convert the Token array, into an AST tree.

This time I’ll look at源码The process is briefly analyzed.

Read more »
0%