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

Side by Side Diff: src/utils.h

Issue 344513004: Fix a potential overflow in SortedListBSearch (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: optimize Deoptimizer::GetOutputInfo Created 6 years, 6 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/full-codegen.cc ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_UTILS_H_ 5 #ifndef V8_UTILS_H_
6 #define V8_UTILS_H_ 6 #define V8_UTILS_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 1087
1088 static BailoutId None() { return BailoutId(kNoneId); } 1088 static BailoutId None() { return BailoutId(kNoneId); }
1089 static BailoutId FunctionEntry() { return BailoutId(kFunctionEntryId); } 1089 static BailoutId FunctionEntry() { return BailoutId(kFunctionEntryId); }
1090 static BailoutId Declarations() { return BailoutId(kDeclarationsId); } 1090 static BailoutId Declarations() { return BailoutId(kDeclarationsId); }
1091 static BailoutId FirstUsable() { return BailoutId(kFirstUsableId); } 1091 static BailoutId FirstUsable() { return BailoutId(kFirstUsableId); }
1092 static BailoutId StubEntry() { return BailoutId(kStubEntryId); } 1092 static BailoutId StubEntry() { return BailoutId(kStubEntryId); }
1093 1093
1094 bool IsNone() const { return id_ == kNoneId; } 1094 bool IsNone() const { return id_ == kNoneId; }
1095 bool operator==(const BailoutId& other) const { return id_ == other.id_; } 1095 bool operator==(const BailoutId& other) const { return id_ == other.id_; }
1096 bool operator!=(const BailoutId& other) const { return id_ != other.id_; } 1096 bool operator!=(const BailoutId& other) const { return id_ != other.id_; }
1097 bool operator<(const BailoutId& other) const { return id_ < other.id_; }
1097 1098
1098 private: 1099 private:
1099 static const int kNoneId = -1; 1100 static const int kNoneId = -1;
1100 1101
1101 // Using 0 could disguise errors. 1102 // Using 0 could disguise errors.
1102 static const int kFunctionEntryId = 2; 1103 static const int kFunctionEntryId = 2;
1103 1104
1104 // This AST id identifies the point after the declarations have been visited. 1105 // This AST id identifies the point after the declarations have been visited.
1105 // We need it to capture the environment effects of declarations that emit 1106 // We need it to capture the environment effects of declarations that emit
1106 // code (function declarations). 1107 // code (function declarations).
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 } 1609 }
1609 1610
1610 *index = result; 1611 *index = result;
1611 return true; 1612 return true;
1612 } 1613 }
1613 1614
1614 1615
1615 } } // namespace v8::internal 1616 } } // namespace v8::internal
1616 1617
1617 #endif // V8_UTILS_H_ 1618 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698