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

Unified Diff: src/compiler/machine-type.h

Issue 505713002: [turbofan] Add backend support for signed loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix x64. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/machine-type.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-type.h
diff --git a/src/compiler/machine-type.h b/src/compiler/machine-type.h
index a26b644d96e5c907ef5cea73ce5c82f9f5e615a3..3b1b9bdcd8f508965cc527d404ff8dcc8b028122 100644
--- a/src/compiler/machine-type.h
+++ b/src/compiler/machine-type.h
@@ -70,6 +70,12 @@ const MachineType kMachPtr = kPointerSize == 4 ? kRepWord32 : kRepWord64;
const MachineType kMachAnyTagged =
static_cast<MachineType>(kRepTagged | kTypeAny);
+// Gets only the type of the given type.
+inline MachineType TypeOf(MachineType machine_type) {
+ int result = machine_type & kTypeMask;
+ return static_cast<MachineType>(result);
+}
+
// Gets only the representation of the given type.
inline MachineType RepresentationOf(MachineType machine_type) {
int result = machine_type & kRepMask;
@@ -97,8 +103,9 @@ inline int ElementSizeOf(MachineType machine_type) {
return kPointerSize;
}
}
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_MACHINE_TYPE_H_
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/machine-type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698