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

Side by Side Diff: src/types.cc

Issue 930983003: Reduce field type tracking to a single stable map per field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/objects.cc ('k') | test/cctest/test-migrations.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <iomanip> 5 #include <iomanip>
6 6
7 #include "src/types.h" 7 #include "src/types.h"
8 8
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 } 568 }
569 } 569 }
570 return this->Is(that); 570 return this->Is(that);
571 } 571 }
572 572
573 573
574 // Check if [this] contains only (currently) stable classes. 574 // Check if [this] contains only (currently) stable classes.
575 template<class Config> 575 template<class Config>
576 bool TypeImpl<Config>::NowStable() { 576 bool TypeImpl<Config>::NowStable() {
577 DisallowHeapAllocation no_allocation; 577 DisallowHeapAllocation no_allocation;
578 for (Iterator<i::Map> it = this->Classes(); !it.Done(); it.Advance()) { 578 return !this->IsClass() || this->AsClass()->Map()->is_stable();
579 if (!it.Current()->is_stable()) return false;
580 }
581 return true;
582 } 579 }
583 580
584 581
585 // Check if [this] and [that] overlap. 582 // Check if [this] and [that] overlap.
586 template<class Config> 583 template<class Config>
587 bool TypeImpl<Config>::Maybe(TypeImpl* that) { 584 bool TypeImpl<Config>::Maybe(TypeImpl* that) {
588 DisallowHeapAllocation no_allocation; 585 DisallowHeapAllocation no_allocation;
589 586
590 // Take care of the representation part (and also approximate 587 // Take care of the representation part (and also approximate
591 // the semantic part). 588 // the semantic part).
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>; 1357 template class TypeImpl<HeapTypeConfig>::Iterator<i::Object>;
1361 1358
1362 template TypeImpl<ZoneTypeConfig>::TypeHandle 1359 template TypeImpl<ZoneTypeConfig>::TypeHandle
1363 TypeImpl<ZoneTypeConfig>::Convert<HeapType>( 1360 TypeImpl<ZoneTypeConfig>::Convert<HeapType>(
1364 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*); 1361 TypeImpl<HeapTypeConfig>::TypeHandle, TypeImpl<ZoneTypeConfig>::Region*);
1365 template TypeImpl<HeapTypeConfig>::TypeHandle 1362 template TypeImpl<HeapTypeConfig>::TypeHandle
1366 TypeImpl<HeapTypeConfig>::Convert<Type>( 1363 TypeImpl<HeapTypeConfig>::Convert<Type>(
1367 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*); 1364 TypeImpl<ZoneTypeConfig>::TypeHandle, TypeImpl<HeapTypeConfig>::Region*);
1368 1365
1369 } } // namespace v8::internal 1366 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-migrations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698