forked from qt/qtbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A V8 snapshot is a serialized representation of the JavaScript heap. Using a snapshot can vastly speed up V8 initialization. This commit introduces a new tool, mkv8snapshot. mkv8snapshot is automatically invoked as part of building QtV8, and generates a .cpp file which is compiled into the QtV8 library. Because mkv8snapshot itself needs to initialize the V8 environment the non-snapshot way (i.e., by evaluating thousands of lines of JavaScript), it needs to build all of V8. This means that V8 is effectively built twice when snapshots are enabled. When cross-compiling, only host=i386 and target=arm is supported, since that's the only relevant case for which V8 currently supports a simulator. mkv8snapshot is built and run as a host tool (using the simulator), and generates a snapshot that will be used on the target. Task-number: QTBUG-21152 Change-Id: I9270652f129505508f78db8b0a39fbf57dc8b86d Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
- Loading branch information
Kent Hansen
authored and
Qt by Nokia
committed
Nov 22, 2011
1 parent
ce829cb
commit 52ef2ee
Showing
7 changed files
with
104 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
TEMPLATE = app | ||
TARGET = mkv8snapshot | ||
QT = | ||
CONFIG -= app_bundle | ||
CONFIG -= qt | ||
CONFIG += console | ||
|
||
DESTDIR = ../../../bin | ||
INCLUDEPATH += . | ||
DEPENDPATH += . | ||
LIBS = | ||
OBJECTS_DIR = . | ||
|
||
cross_compile { | ||
equals(QT_ARCH, arm): V8_TARGET_ARCH = arm | ||
} | ||
|
||
include(../../v8/v8.pri) | ||
|
||
cross_compile { | ||
equals(V8_TARGET_ARCH, arm): SOURCES += $$V8SRC/arm/simulator-arm.cc | ||
} | ||
|
||
SOURCES += \ | ||
$$V8SRC/snapshot-empty.cc \ | ||
$$V8SRC/mksnapshot.cc | ||
|
||
unix:LIBS += -lpthread | ||
|
||
# We don't need to install this tool, it's only used for building v8. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters