#Javascript #FYI
How does JavaScript runtime work
JavaScript is used everywhere began to use feathers. Backend Node.js, front end side, Angular, React, Mobile React Native, Ionic desktop electron Significance JS Framework alone. Node.js is Google. Chrome v8 JavaScript engine to be used in the browser to use. Here developers to understand the Web Browser Rendering Engine Beam JavaScript Engine Beam. I do not think it.
Developer eyes visible. Removing the browser alone, so recently Browser Engine Rendering Engine. Three of the JavaScript Engine unclear. In fact, a Browser. Being just one of the previous three. Here are some. Browser engine. They even used the rendering engine. They.. The main task of HTML, CSS makup layout plot will have to appear on the screen rendering. Rendering engnine layout engine. I called. Rendering engine alone.. Used, for example, Apple Safari WebKit PhantomJS can not be considered insufficient. Used IE Trident rendering engine. The previous rendering engine. Work UI element web element to display this work. Especially the JavaScript code to run. Who happened JavaScript Engine in the previous one. For example, Chrome used Blink rendering engine. WebKit. WebCore Component fork've done. Chrome's JavaScript engine. I used what V8. Node.js can not be used v8. In Apple Safari Nitro JavaScript engine to be insufficient. Developer Milarepa. When JavaScript code optimization and hit his hand. Optimized code for Chrome and Safari, for example opimized maybe not. I want to say.
JavaScript is a dynamic language, know.. I began to interpret. Interpret's not right about it. All browser. Nothing new about that. Because Chrome v8 Nitro JavaScript JIT compilation to change the code to native machine code having a long time ago. Namely, the most modern JavaScript runtime to get the JavaScript to native machine code compilation. The Association of Language. If you see what I interpret Yes. line by line execute it. Never needed to parse and execute it. Sometimes parse cache've done without. One implementation side from the inside without the use of JavaScript code interpreter JavaScript intermeidate form reform right away from the native code will compile. If made. So usually the implementation began to interpret and does not mean... Hybrid apporach positive. JIT (Just in time compilation). For example, the code is going to run a any change to native machine code. AOT (Ahead of time compilation) in advance before the code to run native code already obey. How AOT code does run hot method using AOT used to native machine code. Native machine code. I started to run, so speed is inside. However, the C / C ++ do not get the speed needed. Because at runtime to change the machine code from JavaScript is a compilation process .. Let me add dynamic langauge of the Object attributes reform only do it when the machine code after the compiler deferencing faster. For example, they say. a + b changes. a. Maybe b. Especially in Java, C integer string concatenation once knew. Based on Runtime I'm a laugh b native machine code. .
Another DOM access code, browser is given the Global object. The JavaScript engine is given different. Fortunately, for example document.getElementByid DOM access this API JavaScript Engine. It gives the browser. Supervisor from the JavaScript engine Browser DOM API call.
Dom is going to change the rendering engine layout. This is known as page reflow.. Change in a Web page specific css attribute. The web page layout, causing cost for chopped. So DOM code is slow.
Tell on JavaScript Runtime.. Memory area. For example, Stack, Heap Heap and manage files. GC Garabage Collection algorithm. GC are also not the same as a JavaScript engine.. JavaScript file compilation. JIT, AOT compiler. Global variable to Significance. The execution context. Execution context is more than one is available. GC is the same for all the execution context. For example, on a browser Iframe can be good, it would mean that multiple execution context. All they grow up. GC JIT, AOT can be used to share the same end.
JavaScript is a different language. Unlike single threaded language. Especially on a JavaScript runtime only a thread. Java, C #, where you have multiple execution thread. Thread each have. They're in the corresponding method call stack. Method call stack is a method called a function, the need for a function variable runtime data structure of a stack frame onto the previous method call stack. Function is finished from the previous method call stack stack frame to pop back in the previous one. In this way. What method, then the method must return to the runtime.
Single thread. run, so a function of computational time when they have to keep long loop, for example, it changes a lot. So it will take time. The attention of the browser will be up unrepsonive JS error. So, if you do want to evaluate long compuation section of each section are split run. SetInterval. setTimeout. How do I schedule to understand what is going on. I JavaScript. Concurrency model. We must understand what event loop.
JavaScript memory, you must do three things. Stack (When this method calling a method of the store. Stack frame), Heap (which holds the JavaScript object location. User define or. System define example.)
var a = new Date ();
If you run this on memory to run the Date constructor. We must put a frame on the stack frame. One after the date object on the heap must take the required amount of memory.
The last one, Queue,
The Queue was now running on the CPU has no method of waiting in the queue to run the task.'ve done. For example, setInterval. Method the ex will be joined the queue. Time scheduler to run the animal out of the queue. In this way. The single thread setInterval, setTimeout, event process in the future.
Event Loop JavaScript queue. Functional
while (queue.waitForMessage ()) {
queue.processNextMessage ();
}
This in the future. If you do anything in the queue on the issues. Without waiting. I did other jobs.
Chrome. V8 JIT AOT stages of the victims from the JavaScript code, but instead interpret. Native code to change the act. There is no other JS engine specific optimization. In V8, for example, a JavaScript Object rutime stored in a hidden class.. Place again the next time that the Object attributes v8 previous Object. The field access method bodies, and can also be optimized. called monomorphism.. Although Dynamic language Polymorphic data structure, depending on the engine can not be a good optimization.
သင္ေပးပါလား ကြီး
ဒါနဲ႕ ကိုယ္တိုင္ေရးထားတာလား?
grate. SMT- 11
Hkhk Well I'll teach u
SMT-24 done
Smt 6
Done
Smt-19
smt 17
SMT 2
Smt 20
SMT-14
smt-4
done
SMT 8