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

Side by Side Diff: src/types.h

Issue 102563004: Zonify types in compiler frontend (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/type-info.cc ('k') | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 static void union_set( 487 static void union_set(
488 i::Handle<Unioned> unioned, int i, i::Handle<Type> type) { 488 i::Handle<Unioned> unioned, int i, i::Handle<Type> type) {
489 ASSERT(!is_union(*type)); 489 ASSERT(!is_union(*type));
490 unioned->set(i, *type); 490 unioned->set(i, *type);
491 } 491 }
492 static int union_length(i::Handle<Unioned> unioned) { 492 static int union_length(i::Handle<Unioned> unioned) {
493 return unioned->length(); 493 return unioned->length();
494 } 494 }
495 }; 495 };
496 496
497 typedef TypeImpl<ZoneTypeConfig> ZoneType; 497 typedef TypeImpl<ZoneTypeConfig> Type;
498 typedef TypeImpl<HeapTypeConfig> Type; 498 typedef TypeImpl<HeapTypeConfig> HeapType;
499 499
500 500
501 // A simple struct to represent a pair of lower/upper type bounds. 501 // A simple struct to represent a pair of lower/upper type bounds.
502 template<class Config> 502 template<class Config>
503 struct BoundsImpl { 503 struct BoundsImpl {
504 typedef TypeImpl<Config> Type; 504 typedef TypeImpl<Config> Type;
505 typedef typename Type::TypeHandle TypeHandle; 505 typedef typename Type::TypeHandle TypeHandle;
506 typedef typename Type::Region Region; 506 typedef typename Type::Region Region;
507 507
508 TypeHandle lower; 508 TypeHandle lower;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 TypeHandle lower = Type::Union(b.lower, t, region); 541 TypeHandle lower = Type::Union(b.lower, t, region);
542 return BoundsImpl(lower, b.upper); 542 return BoundsImpl(lower, b.upper);
543 } 543 }
544 static BoundsImpl NarrowUpper(BoundsImpl b, TypeHandle t, Region* region) { 544 static BoundsImpl NarrowUpper(BoundsImpl b, TypeHandle t, Region* region) {
545 TypeHandle lower = Type::Intersect(b.lower, t, region); 545 TypeHandle lower = Type::Intersect(b.lower, t, region);
546 TypeHandle upper = Type::Intersect(b.upper, t, region); 546 TypeHandle upper = Type::Intersect(b.upper, t, region);
547 return BoundsImpl(lower, upper); 547 return BoundsImpl(lower, upper);
548 } 548 }
549 }; 549 };
550 550
551 typedef BoundsImpl<ZoneTypeConfig> ZoneBounds; 551 typedef BoundsImpl<ZoneTypeConfig> Bounds;
552 typedef BoundsImpl<HeapTypeConfig> Bounds;
553 552
554 553
555 } } // namespace v8::internal 554 } } // namespace v8::internal
556 555
557 #endif // V8_TYPES_H_ 556 #endif // V8_TYPES_H_
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698