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

Side by Side Diff: src/serialize.cc

Issue 791363002: Disable invalid DCHECK_EQ in serializer.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 RootIndexMap::RootIndexMap(Isolate* isolate) { 484 RootIndexMap::RootIndexMap(Isolate* isolate) {
485 map_ = new HashMap(HashMap::PointersMatch); 485 map_ = new HashMap(HashMap::PointersMatch);
486 Object** root_array = isolate->heap()->roots_array_start(); 486 Object** root_array = isolate->heap()->roots_array_start();
487 for (int i = 0; i < Heap::kStrongRootListLength; i++) { 487 for (int i = 0; i < Heap::kStrongRootListLength; i++) {
488 Object* root = root_array[i]; 488 Object* root = root_array[i];
489 if (root->IsHeapObject() && !isolate->heap()->InNewSpace(root)) { 489 if (root->IsHeapObject() && !isolate->heap()->InNewSpace(root)) {
490 HeapObject* heap_object = HeapObject::cast(root); 490 HeapObject* heap_object = HeapObject::cast(root);
491 if (LookupEntry(map_, heap_object, false) != NULL) { 491 if (LookupEntry(map_, heap_object, false) != NULL) {
492 // Some root values are initialized to the empty FixedArray(); 492 // Some root values are initialized to the empty FixedArray();
493 // Do not add them to the map. 493 // Do not add them to the map.
494 DCHECK_EQ(isolate->heap()->empty_fixed_array(), heap_object); 494 // TODO(yangguo): This assert is not true. Some roots like
495 // instanceof_cache_answer can be e.g. null.
496 // DCHECK_EQ(isolate->heap()->empty_fixed_array(), heap_object);
495 } else { 497 } else {
496 SetValue(LookupEntry(map_, heap_object, true), i); 498 SetValue(LookupEntry(map_, heap_object, true), i);
497 } 499 }
498 } 500 }
499 } 501 }
500 } 502 }
501 503
502 504
503 class CodeAddressMap: public CodeEventLogger { 505 class CodeAddressMap: public CodeEventLogger {
504 public: 506 public:
(...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 return GetHeaderValue(kNumInternalizedStringsOffset); 2478 return GetHeaderValue(kNumInternalizedStringsOffset);
2477 } 2479 }
2478 2480
2479 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const { 2481 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const {
2480 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size; 2482 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size;
2481 const byte* start = data_ + kHeaderSize + reservations_size; 2483 const byte* start = data_ + kHeaderSize + reservations_size;
2482 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start), 2484 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start),
2483 GetHeaderValue(kNumCodeStubKeysOffset)); 2485 GetHeaderValue(kNumCodeStubKeysOffset));
2484 } 2486 }
2485 } } // namespace v8::internal 2487 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698