 |
SQLite
2008-Jan-31 - Version 3.5.5
Version 3.5.5 changes over 8% of the core source code of SQLite in order to convert the internal virtual machine from a stack-based design into a register-based design. This change will allow future optimizations and will avoid an entire class of stack overflow bugs that have caused problems in the past. Even though this change is large, extensive testing has found zero errors in the new virtual machine and so we believe this to be a very stable release
주내용은 이러합니다.
기존 내부 스택기반 가상머신( www.sqlite.org )을 레지스터기반 가상머신으로 디자인을 변경하다. 이는 클래스 오버플로우 버그를 피하고, 최적화를 위해서이다. ...
핵심은 소스코드의 8%가량을 수정했다는 겁니다. 이는 이례적인 일인거 같습니다. 결국 SQLite 가 android에 built-in 되면서 어느 정도 최적화를 위해서 이를 수정한 듯 합니다. 물론 이에 대한 공식적인 내용은 없습니다.
이번 수정된 부분을 분석해보면 DalVik VM 의 실마리가 보일지 않을까 모르겠습니다.
sqlite.3.5.5/src/vdbe.c
The SQL parser generates a program which is then executed by the VDBE to do the work of the SQL statement. VDBE programs are similar in form to assembly language. The program consists of a linear sequence of operations. Each operation has an opcode and 5 operands. Operands P1, P2, and P3 are integers. Operand P4 is a null-terminated string. Operand P5 is an unsigned character. Few opcodes use all 5 operands.
|
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.
16
|