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

Side by Side Diff: src/objects.cc

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 6 years, 7 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/mips/lithium-mips.cc ('k') | src/objects-visiting-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "allocation-site-scopes.h" 8 #include "allocation-site-scopes.h"
9 #include "api.h" 9 #include "api.h"
10 #include "arguments.h" 10 #include "arguments.h"
(...skipping 10659 matching lines...) Expand 10 before | Expand all | Expand 10 after
10670 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) { 10670 void SharedFunctionInfo::StartInobjectSlackTracking(Map* map) {
10671 ASSERT(!IsInobjectSlackTrackingInProgress()); 10671 ASSERT(!IsInobjectSlackTrackingInProgress());
10672 10672
10673 if (!FLAG_clever_optimizations) return; 10673 if (!FLAG_clever_optimizations) return;
10674 10674
10675 // Only initiate the tracking the first time. 10675 // Only initiate the tracking the first time.
10676 if (live_objects_may_exist()) return; 10676 if (live_objects_may_exist()) return;
10677 set_live_objects_may_exist(true); 10677 set_live_objects_may_exist(true);
10678 10678
10679 // No tracking during the snapshot construction phase. 10679 // No tracking during the snapshot construction phase.
10680 if (Serializer::enabled()) return; 10680 Isolate* isolate = GetIsolate();
10681 if (Serializer::enabled(isolate)) return;
10681 10682
10682 if (map->unused_property_fields() == 0) return; 10683 if (map->unused_property_fields() == 0) return;
10683 10684
10684 // Nonzero counter is a leftover from the previous attempt interrupted 10685 // Nonzero counter is a leftover from the previous attempt interrupted
10685 // by GC, keep it. 10686 // by GC, keep it.
10686 if (construction_count() == 0) { 10687 if (construction_count() == 0) {
10687 set_construction_count(kGenerousAllocationCount); 10688 set_construction_count(kGenerousAllocationCount);
10688 } 10689 }
10689 set_initial_map(map); 10690 set_initial_map(map);
10690 Builtins* builtins = map->GetHeap()->isolate()->builtins(); 10691 Builtins* builtins = isolate->builtins();
10691 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric), 10692 ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubGeneric),
10692 construct_stub()); 10693 construct_stub());
10693 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown)); 10694 set_construct_stub(builtins->builtin(Builtins::kJSConstructStubCountdown));
10694 } 10695 }
10695 10696
10696 10697
10697 // Called from GC, hence reinterpret_cast and unchecked accessors. 10698 // Called from GC, hence reinterpret_cast and unchecked accessors.
10698 void SharedFunctionInfo::DetachInitialMap() { 10699 void SharedFunctionInfo::DetachInitialMap() {
10699 Map* map = reinterpret_cast<Map*>(initial_map()); 10700 Map* map = reinterpret_cast<Map*>(initial_map());
10700 10701
(...skipping 6518 matching lines...) Expand 10 before | Expand all | Expand 10 after
17219 #define ERROR_MESSAGES_TEXTS(C, T) T, 17220 #define ERROR_MESSAGES_TEXTS(C, T) T,
17220 static const char* error_messages_[] = { 17221 static const char* error_messages_[] = {
17221 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17222 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17222 }; 17223 };
17223 #undef ERROR_MESSAGES_TEXTS 17224 #undef ERROR_MESSAGES_TEXTS
17224 return error_messages_[reason]; 17225 return error_messages_[reason];
17225 } 17226 }
17226 17227
17227 17228
17228 } } // namespace v8::internal 17229 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698