Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/bootstrapper.cc

Issue 101123004: Disable tracking of double fields during snapshot creation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove flag from DoStoreNamedField Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 6952a55346feb0c6a234dd93b69e00751ad98872..ef802ba987c8208a1a3559597c8029f450ed5c7b 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2556,12 +2556,31 @@ void Genesis::MakeFunctionInstancePrototypeWritable() {
}
+class NoTrackDoubleFieldsForSerializerScope {
+ public:
+ NoTrackDoubleFieldsForSerializerScope() : flag_(FLAG_track_double_fields) {
+ if (Serializer::enabled()) {
+ // Disable tracking double fields because heap numbers treated as
+ // immutable by the serializer.
+ FLAG_track_double_fields = false;
+ }
+ }
+ ~NoTrackDoubleFieldsForSerializerScope() {
+ FLAG_track_double_fields = flag_;
+ }
+
+ private:
+ bool flag_;
+};
+
+
Genesis::Genesis(Isolate* isolate,
Handle<Object> global_object,
v8::Handle<v8::ObjectTemplate> global_template,
v8::ExtensionConfiguration* extensions)
: isolate_(isolate),
active_(isolate->bootstrapper()) {
+ NoTrackDoubleFieldsForSerializerScope disable_double_tracking_for_serializer;
result_ = Handle<Context>::null();
// If V8 cannot be initialized, just return.
if (!V8::Initialize(NULL)) return;
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698