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

Side by Side Diff: src/type-cache.h

Issue 1405383007: Increase strictness of asm type conversions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 1 month 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 | src/typing-asm.h » ('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_TYPE_CACHE_H_ 5 #ifndef V8_TYPE_CACHE_H_
6 #define V8_TYPE_CACHE_H_ 6 #define V8_TYPE_CACHE_H_
7 7
8 #include "src/types.h" 8 #include "src/types.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 29 matching lines...) Expand all
40 40
41 Type* const kSingletonZero = CreateRange(0.0, 0.0); 41 Type* const kSingletonZero = CreateRange(0.0, 0.0);
42 Type* const kSingletonOne = CreateRange(1.0, 1.0); 42 Type* const kSingletonOne = CreateRange(1.0, 1.0);
43 Type* const kZeroOrOne = CreateRange(0.0, 1.0); 43 Type* const kZeroOrOne = CreateRange(0.0, 1.0);
44 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0); 44 Type* const kZeroToThirtyTwo = CreateRange(0.0, 32.0);
45 Type* const kZeroish = 45 Type* const kZeroish =
46 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone()); 46 Type::Union(kSingletonZero, Type::MinusZeroOrNaN(), zone());
47 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY); 47 Type* const kInteger = CreateRange(-V8_INFINITY, V8_INFINITY);
48 Type* const kWeakint = Type::Union(kInteger, Type::MinusZeroOrNaN(), zone()); 48 Type* const kWeakint = Type::Union(kInteger, Type::MinusZeroOrNaN(), zone());
49 49
50 Type* const kIntegral32 = Type::Union(kInt32, kUint32, zone());
51
50 // The FixedArray::length property always containts a smi in the range 52 // The FixedArray::length property always containts a smi in the range
51 // [0, FixedArray::kMaxLength]. 53 // [0, FixedArray::kMaxLength].
52 Type* const kFixedArrayLengthType = CreateNative( 54 Type* const kFixedArrayLengthType = CreateNative(
53 CreateRange(0.0, FixedArray::kMaxLength), Type::TaggedSigned()); 55 CreateRange(0.0, FixedArray::kMaxLength), Type::TaggedSigned());
54 56
55 // The FixedDoubleArray::length property always containts a smi in the range 57 // The FixedDoubleArray::length property always containts a smi in the range
56 // [0, FixedDoubleArray::kMaxLength]. 58 // [0, FixedDoubleArray::kMaxLength].
57 Type* const kFixedDoubleArrayLengthType = CreateNative( 59 Type* const kFixedDoubleArrayLengthType = CreateNative(
58 CreateRange(0.0, FixedDoubleArray::kMaxLength), Type::TaggedSigned()); 60 CreateRange(0.0, FixedDoubleArray::kMaxLength), Type::TaggedSigned());
59 61
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return Type::Range(min, max, zone()); 98 return Type::Range(min, max, zone());
97 } 99 }
98 100
99 Zone* zone() { return &zone_; } 101 Zone* zone() { return &zone_; }
100 }; 102 };
101 103
102 } // namespace internal 104 } // namespace internal
103 } // namespace v8 105 } // namespace v8
104 106
105 #endif // V8_TYPE_CACHE_H_ 107 #endif // V8_TYPE_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | src/typing-asm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698