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

Side by Side 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, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 ASSERT(!function_map_writable_prototype_.is_null()); 2549 ASSERT(!function_map_writable_prototype_.is_null());
2550 ASSERT(!strict_mode_function_map_writable_prototype_.is_null()); 2550 ASSERT(!strict_mode_function_map_writable_prototype_.is_null());
2551 2551
2552 // Replace function instance maps to make prototype writable. 2552 // Replace function instance maps to make prototype writable.
2553 native_context()->set_function_map(*function_map_writable_prototype_); 2553 native_context()->set_function_map(*function_map_writable_prototype_);
2554 native_context()->set_strict_mode_function_map( 2554 native_context()->set_strict_mode_function_map(
2555 *strict_mode_function_map_writable_prototype_); 2555 *strict_mode_function_map_writable_prototype_);
2556 } 2556 }
2557 2557
2558 2558
2559 class NoTrackDoubleFieldsForSerializerScope {
2560 public:
2561 NoTrackDoubleFieldsForSerializerScope() : flag_(FLAG_track_double_fields) {
2562 if (Serializer::enabled()) {
2563 // Disable tracking double fields because heap numbers treated as
2564 // immutable by the serializer.
2565 FLAG_track_double_fields = false;
2566 }
2567 }
2568 ~NoTrackDoubleFieldsForSerializerScope() {
2569 FLAG_track_double_fields = flag_;
2570 }
2571
2572 private:
2573 bool flag_;
2574 };
2575
2576
2559 Genesis::Genesis(Isolate* isolate, 2577 Genesis::Genesis(Isolate* isolate,
2560 Handle<Object> global_object, 2578 Handle<Object> global_object,
2561 v8::Handle<v8::ObjectTemplate> global_template, 2579 v8::Handle<v8::ObjectTemplate> global_template,
2562 v8::ExtensionConfiguration* extensions) 2580 v8::ExtensionConfiguration* extensions)
2563 : isolate_(isolate), 2581 : isolate_(isolate),
2564 active_(isolate->bootstrapper()) { 2582 active_(isolate->bootstrapper()) {
2583 NoTrackDoubleFieldsForSerializerScope disable_double_tracking_for_serializer;
2565 result_ = Handle<Context>::null(); 2584 result_ = Handle<Context>::null();
2566 // If V8 cannot be initialized, just return. 2585 // If V8 cannot be initialized, just return.
2567 if (!V8::Initialize(NULL)) return; 2586 if (!V8::Initialize(NULL)) return;
2568 2587
2569 // Before creating the roots we must save the context and restore it 2588 // Before creating the roots we must save the context and restore it
2570 // on all function exits. 2589 // on all function exits.
2571 SaveContext saved_context(isolate); 2590 SaveContext saved_context(isolate);
2572 2591
2573 // During genesis, the boilerplate for stack overflow won't work until the 2592 // During genesis, the boilerplate for stack overflow won't work until the
2574 // environment has been at least partially initialized. Add a stack check 2593 // environment has been at least partially initialized. Add a stack check
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 return from + sizeof(NestingCounterType); 2731 return from + sizeof(NestingCounterType);
2713 } 2732 }
2714 2733
2715 2734
2716 // Called when the top-level V8 mutex is destroyed. 2735 // Called when the top-level V8 mutex is destroyed.
2717 void Bootstrapper::FreeThreadResources() { 2736 void Bootstrapper::FreeThreadResources() {
2718 ASSERT(!IsActive()); 2737 ASSERT(!IsActive());
2719 } 2738 }
2720 2739
2721 } } // namespace v8::internal 2740 } } // namespace v8::internal
OLDNEW
« 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