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

Side by Side Diff: src/globals.h

Issue 2122183002: [Interpreter] Collect type feedback for calls in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated cctest.status to mark the tests fail with ignition. Created 4 years, 5 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/compiler/bytecode-graph-builder.cc ('k') | src/ia32/builtins-ia32.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 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_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) { 1092 inline bool IsConstructable(FunctionKind kind, LanguageMode mode) {
1093 if (IsAccessorFunction(kind)) return false; 1093 if (IsAccessorFunction(kind)) return false;
1094 if (IsConciseMethod(kind)) return false; 1094 if (IsConciseMethod(kind)) return false;
1095 if (IsArrowFunction(kind)) return false; 1095 if (IsArrowFunction(kind)) return false;
1096 if (IsGeneratorFunction(kind)) return false; 1096 if (IsGeneratorFunction(kind)) return false;
1097 if (IsAsyncFunction(kind)) return false; 1097 if (IsAsyncFunction(kind)) return false;
1098 return true; 1098 return true;
1099 } 1099 }
1100 1100
1101 enum class CallableType : unsigned { kJSFunction, kAny };
1102
1103 inline size_t hash_value(CallableType type) { return bit_cast<unsigned>(type); }
1104
1105 inline std::ostream& operator<<(std::ostream& os, CallableType function_type) {
1106 switch (function_type) {
1107 case CallableType::kJSFunction:
1108 return os << "JSFunction";
1109 case CallableType::kAny:
1110 return os << "Any";
1111 }
1112 UNREACHABLE();
1113 return os;
1114 }
1101 1115
1102 inline uint32_t ObjectHash(Address address) { 1116 inline uint32_t ObjectHash(Address address) {
1103 // All objects are at least pointer aligned, so we can remove the trailing 1117 // All objects are at least pointer aligned, so we can remove the trailing
1104 // zeros. 1118 // zeros.
1105 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1119 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1106 kPointerSizeLog2); 1120 kPointerSizeLog2);
1107 } 1121 }
1108 1122
1109 } // namespace internal 1123 } // namespace internal
1110 } // namespace v8 1124 } // namespace v8
1111 1125
1112 namespace i = v8::internal; 1126 namespace i = v8::internal;
1113 1127
1114 #endif // V8_GLOBALS_H_ 1128 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698