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

Side by Side Diff: src/snapshot/serializer-common.cc

Issue 2258003002: Disable CFI on a few methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "src/snapshot/serializer-common.h" 5 #include "src/snapshot/serializer-common.h"
6 6
7 #include "src/external-reference-table.h" 7 #include "src/external-reference-table.h"
8 #include "src/ic/stub-cache.h" 8 #include "src/ic/stub-cache.h"
9 #include "src/list-inl.h" 9 #include "src/list-inl.h"
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 size_ = size; 52 size_ = size;
53 owns_data_ = true; 53 owns_data_ = true;
54 DCHECK(IsAligned(reinterpret_cast<intptr_t>(data_), kPointerAlignment)); 54 DCHECK(IsAligned(reinterpret_cast<intptr_t>(data_), kPointerAlignment));
55 } 55 }
56 56
57 // The partial snapshot cache is terminated by undefined. We visit the 57 // The partial snapshot cache is terminated by undefined. We visit the
58 // partial snapshot... 58 // partial snapshot...
59 // - during deserialization to populate it. 59 // - during deserialization to populate it.
60 // - during normal GC to keep its content alive. 60 // - during normal GC to keep its content alive.
61 // - not during serialization. The partial serializer adds to it explicitly. 61 // - not during serialization. The partial serializer adds to it explicitly.
62 DISABLE_CFI_PERF
62 void SerializerDeserializer::Iterate(Isolate* isolate, ObjectVisitor* visitor) { 63 void SerializerDeserializer::Iterate(Isolate* isolate, ObjectVisitor* visitor) {
63 List<Object*>* cache = isolate->partial_snapshot_cache(); 64 List<Object*>* cache = isolate->partial_snapshot_cache();
64 for (int i = 0;; ++i) { 65 for (int i = 0;; ++i) {
65 // Extend the array ready to get a value when deserializing. 66 // Extend the array ready to get a value when deserializing.
66 if (cache->length() <= i) cache->Add(Smi::FromInt(0)); 67 if (cache->length() <= i) cache->Add(Smi::FromInt(0));
67 // During deserialization, the visitor populates the partial snapshot cache 68 // During deserialization, the visitor populates the partial snapshot cache
68 // and eventually terminates the cache with undefined. 69 // and eventually terminates the cache with undefined.
69 visitor->VisitPointer(&cache->at(i)); 70 visitor->VisitPointer(&cache->at(i));
70 if (cache->at(i)->IsUndefined(isolate)) break; 71 if (cache->at(i)->IsUndefined(isolate)) break;
71 } 72 }
72 } 73 }
73 74
74 bool SerializerDeserializer::CanBeDeferred(HeapObject* o) { 75 bool SerializerDeserializer::CanBeDeferred(HeapObject* o) {
75 return !o->IsString() && !o->IsScript(); 76 return !o->IsString() && !o->IsScript();
76 } 77 }
77 78
78 } // namespace internal 79 } // namespace internal
79 } // namespace v8 80 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698