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

Side by Side Diff: tools/clang/blink_gc_plugin/RecordInfo.cpp

Issue 1645763004: blink_gc_plugin: Make RecordInfo::Get{Fields,Bases} return deterministic order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert the old fix attempt Created 4 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
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium 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 "Config.h" 5 #include "Config.h"
6 #include "RecordInfo.h" 6 #include "RecordInfo.h"
7 7
8 using namespace clang; 8 using namespace clang;
9 using std::string; 9 using std::string;
10 10
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 it != record_->bases_end(); 392 it != record_->bases_end();
393 ++it) { 393 ++it) {
394 const CXXBaseSpecifier& spec = *it; 394 const CXXBaseSpecifier& spec = *it;
395 RecordInfo* info = cache_->Lookup(spec.getType()); 395 RecordInfo* info = cache_->Lookup(spec.getType());
396 if (!info) 396 if (!info)
397 continue; 397 continue;
398 CXXRecordDecl* base = info->record(); 398 CXXRecordDecl* base = info->record();
399 TracingStatus status = info->InheritsTrace() 399 TracingStatus status = info->InheritsTrace()
400 ? TracingStatus::Needed() 400 ? TracingStatus::Needed()
401 : TracingStatus::Unneeded(); 401 : TracingStatus::Unneeded();
402 bases->insert(std::make_pair(base, BasePoint(spec, info, status))); 402 bases->push_back(std::make_pair(base, BasePoint(spec, info, status)));
403 } 403 }
404 return bases; 404 return bases;
405 } 405 }
406 406
407 RecordInfo::Fields& RecordInfo::GetFields() { 407 RecordInfo::Fields& RecordInfo::GetFields() {
408 if (!fields_) 408 if (!fields_)
409 fields_ = CollectFields(); 409 fields_ = CollectFields();
410 return *fields_; 410 return *fields_;
411 } 411 }
412 412
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 edge->members().push_back(member); 654 edge->members().push_back(member);
655 } 655 }
656 // TODO: Handle the case where we fail to create an edge (eg, if the 656 // TODO: Handle the case where we fail to create an edge (eg, if the
657 // argument is a primitive type or just not fully known yet). 657 // argument is a primitive type or just not fully known yet).
658 } 658 }
659 return edge; 659 return edge;
660 } 660 }
661 661
662 return new Value(info); 662 return new Value(info);
663 } 663 }
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698