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

Side by Side Diff: src/deoptimize-reason.cc

Issue 2286163002: Revert of Fix compiler warnings on "make android_arm" (Closed)
Patch Set: Created 4 years, 3 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/deoptimize-reason.h ('k') | src/globals.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "src/deoptimize-reason.h" 5 #include "src/deoptimize-reason.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 std::ostream& operator<<(std::ostream& os, DeoptimizeReason reason) { 10 std::ostream& operator<<(std::ostream& os, DeoptimizeReason reason) {
11 switch (reason) { 11 switch (reason) {
12 #define DEOPTIMIZE_REASON(Name, message) \ 12 #define DEOPTIMIZE_REASON(Name, message) \
13 case DeoptimizeReason::k##Name: \ 13 case DeoptimizeReason::k##Name: \
14 return os << #Name; 14 return os << #Name;
15 DEOPTIMIZE_REASON_LIST(DEOPTIMIZE_REASON) 15 DEOPTIMIZE_REASON_LIST(DEOPTIMIZE_REASON)
16 #undef DEOPTIMIZE_REASON 16 #undef DEOPTIMIZE_REASON
17 } 17 }
18 UNREACHABLE(); 18 UNREACHABLE();
19 return os; 19 return os;
20 } 20 }
21 21
22 size_t hash_value(DeoptimizeReason reason) { 22 size_t hash_value(DeoptimizeReason reason) {
23 return static_cast<uint8_t>(reason); 23 return static_cast<uint8_t>(reason);
24 } 24 }
25 25
26 char const* DeoptimizeReasonToString(DeoptimizeReason reason) { 26 char const* const DeoptimizeReasonToString(DeoptimizeReason reason) {
27 static char const* kDeoptimizeReasonStrings[] = { 27 static char const* kDeoptimizeReasonStrings[] = {
28 #define DEOPTIMIZE_REASON(Name, message) message, 28 #define DEOPTIMIZE_REASON(Name, message) message,
29 DEOPTIMIZE_REASON_LIST(DEOPTIMIZE_REASON) 29 DEOPTIMIZE_REASON_LIST(DEOPTIMIZE_REASON)
30 #undef DEOPTIMIZE_REASON 30 #undef DEOPTIMIZE_REASON
31 }; 31 };
32 size_t const index = static_cast<size_t>(reason); 32 size_t const index = static_cast<size_t>(reason);
33 DCHECK_LT(index, arraysize(kDeoptimizeReasonStrings)); 33 DCHECK_LT(index, arraysize(kDeoptimizeReasonStrings));
34 return kDeoptimizeReasonStrings[index]; 34 return kDeoptimizeReasonStrings[index];
35 } 35 }
36 36
37 } // namespace internal 37 } // namespace internal
38 } // namespace v8 38 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimize-reason.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698