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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/s390/code-stubs-s390.cc ('k') | src/snapshot/serializer.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 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/partial-serializer.h" 5 #include "src/snapshot/partial-serializer.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 16 matching lines...) Expand all
27 Context* context = Context::cast(*o); 27 Context* context = Context::cast(*o);
28 reference_map()->AddAttachedReference(context->global_proxy()); 28 reference_map()->AddAttachedReference(context->global_proxy());
29 // The bootstrap snapshot has a code-stub context. When serializing the 29 // The bootstrap snapshot has a code-stub context. When serializing the
30 // partial snapshot, it is chained into the weak context list on the isolate 30 // partial snapshot, it is chained into the weak context list on the isolate
31 // and it's next context pointer may point to the code-stub context. Clear 31 // and it's next context pointer may point to the code-stub context. Clear
32 // it before serializing, it will get re-added to the context list 32 // it before serializing, it will get re-added to the context list
33 // explicitly when it's loaded. 33 // explicitly when it's loaded.
34 if (context->IsNativeContext()) { 34 if (context->IsNativeContext()) {
35 context->set(Context::NEXT_CONTEXT_LINK, 35 context->set(Context::NEXT_CONTEXT_LINK,
36 isolate_->heap()->undefined_value()); 36 isolate_->heap()->undefined_value());
37 DCHECK(!context->global_object()->IsUndefined()); 37 DCHECK(!context->global_object()->IsUndefined(context->GetIsolate()));
38 } 38 }
39 } 39 }
40 VisitPointer(o); 40 VisitPointer(o);
41 SerializeDeferredObjects(); 41 SerializeDeferredObjects();
42 Pad(); 42 Pad();
43 } 43 }
44 44
45 void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, 45 void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
46 WhereToPoint where_to_point, int skip) { 46 WhereToPoint where_to_point, int skip) {
47 if (obj->IsMap()) { 47 if (obj->IsMap()) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // would cause dupes. 114 // would cause dupes.
115 DCHECK(!o->IsScript()); 115 DCHECK(!o->IsScript());
116 return o->IsName() || o->IsSharedFunctionInfo() || o->IsHeapNumber() || 116 return o->IsName() || o->IsSharedFunctionInfo() || o->IsHeapNumber() ||
117 o->IsCode() || o->IsScopeInfo() || o->IsAccessorInfo() || 117 o->IsCode() || o->IsScopeInfo() || o->IsAccessorInfo() ||
118 o->map() == 118 o->map() ==
119 startup_serializer_->isolate()->heap()->fixed_cow_array_map(); 119 startup_serializer_->isolate()->heap()->fixed_cow_array_map();
120 } 120 }
121 121
122 } // namespace internal 122 } // namespace internal
123 } // namespace v8 123 } // namespace v8
OLDNEW
« no previous file with comments | « src/s390/code-stubs-s390.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698