Web browser includes a JavaScript engine as a program that helps users access the web. As JavaScript becomes widespread and supports complicated operations, optimization has become an important issue. Because of this, Optimization techniques of JavaScript engine have resulted in bugs, and it is difficult to identify the cause by various execution conditions, interaction among components, and overlapping optimization techniques. We analyze the common patterns and causes of optimization bugs in the JavaScript engine. We select Google Chrome V8, which is the most widely used JavaScript engine currently. We build various version of V8 to collect as many bugs as possible and analyze bugs fixes and debugging to identify patterns and causes of bugs. The optimization bugs have a pattern to validate the hypotheses established during the optimization application, mainly caused by the developer's mistake in generating the optimization code.
웹 브라우저는 사용자들이 웹에 접속할 수 있도록 도와주는 프로그램으로 자바스크립트 엔진을 포함하고 있다. 자바스크립트가 점차 널리 쓰이며 복잡한 기능을 수행하게 됨에따라 자바스크립트 엔진의 최적화가 중요한 사항으로 떠오르게 되었다. 자바스크립트 엔진의 최적화 기법은 자바스크립트 엔진의 가장 복잡한 기능 중 하나이며, 이로 인해 최적화 버그가 발생시 중첩된 최적화 기법과 다양한 실행조건등에 의해 원인을 파악하고 수정하기 힘들다. 우리는 자바스크립트 엔진의 최적화 버그가 가진 공통적인 패턴과 원인에 대해 분석하고, 버그 수정 내역 분석을 통해 최적화 버그 발생의 주된 원인을 파악하였다. 우리는 현재 가장 널리 사용되고 있는 자바스크립트 엔진인 구글 크롬의 V8을 분석대상으로 선정하였고, 버그 분석을 위해 테스트 케이스를 수집하였다. 최대한 많은 버그를 수집하기 위해 다양한 버전의 V8을 빌드하였고 버그 수정 내역 분석 및 디버깅을 통해 버그의 패턴과 원인에 대해 분석하였다. 자바스크립트 엔진의 최적화 버그는 최적화 적용시 수립한 가정에 대해 검증하는 패턴을 가지고 있으며, 주로 최적화 코드 생성시 개발자의 실수로 인해 발생하였다.