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

Side by Side Diff: src/types.h

Issue 237143002: Re-reland "More tests for Union & Intersect" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixing handlification of tests Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/types.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 #ifndef V8_TYPES_H_ 5 #ifndef V8_TYPES_H_
6 #define V8_TYPES_H_ 6 #define V8_TYPES_H_
7 7
8 #include "handles.h" 8 #include "handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // existing assumptions or tests. 94 // existing assumptions or tests.
95 // Consequently, do not use pointer equality for type tests, always use Is! 95 // Consequently, do not use pointer equality for type tests, always use Is!
96 // 96 //
97 // The NowIs operator implements state-sensitive subtying, as described above. 97 // The NowIs operator implements state-sensitive subtying, as described above.
98 // Any compilation decision based on such temporary properties requires runtime 98 // Any compilation decision based on such temporary properties requires runtime
99 // guarding! 99 // guarding!
100 // 100 //
101 // PROPERTIES 101 // PROPERTIES
102 // 102 //
103 // Various formal properties hold for constructors, operators, and predicates 103 // Various formal properties hold for constructors, operators, and predicates
104 // over types. For example, constructors are injective, subtyping is a partial 104 // over types. For example, constructors are injective, subtyping is a complete
105 // order, and union and intersection satisfy the usual algebraic properties. 105 // partial order, union and intersection satisfy the usual algebraic properties.
106 // 106 //
107 // See test/cctest/test-types.cc for a comprehensive executable specification, 107 // See test/cctest/test-types.cc for a comprehensive executable specification,
108 // especially with respect to the proeprties of the more exotic 'temporal' 108 // especially with respect to the properties of the more exotic 'temporal'
109 // constructors and predicates (those prefixed 'Now'). 109 // constructors and predicates (those prefixed 'Now').
110 // 110 //
111 // IMPLEMENTATION 111 // IMPLEMENTATION
112 // 112 //
113 // Internally, all 'primitive' types, and their unions, are represented as 113 // Internally, all 'primitive' types, and their unions, are represented as
114 // bitsets. Class is a heap pointer to the respective map. Only Constant's, or 114 // bitsets. Class is a heap pointer to the respective map. Only Constant's, or
115 // unions containing Class'es or Constant's, currently require allocation. 115 // unions containing Class'es or Constant's, currently require allocation.
116 // Note that the bitset representation is closed under both Union and Intersect. 116 // Note that the bitset representation is closed under both Union and Intersect.
117 // 117 //
118 // There are two type representations, using different allocation: 118 // There are two type representations, using different allocation:
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 bool Narrows(BoundsImpl that) { 527 bool Narrows(BoundsImpl that) {
528 return that.lower->Is(this->lower) && this->upper->Is(that.upper); 528 return that.lower->Is(this->lower) && this->upper->Is(that.upper);
529 } 529 }
530 }; 530 };
531 531
532 typedef BoundsImpl<ZoneTypeConfig> Bounds; 532 typedef BoundsImpl<ZoneTypeConfig> Bounds;
533 533
534 } } // namespace v8::internal 534 } } // namespace v8::internal
535 535
536 #endif // V8_TYPES_H_ 536 #endif // V8_TYPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698