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

Unified Diff: src/machine-type.h

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master Created 4 years 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/ic/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/machine-type.h
diff --git a/src/machine-type.h b/src/machine-type.h
index 844c956e7b025593600eba6392945ee0a8cd791c..a59aced36ea3323491b1b0a6f39cb3e3cc3cecd3 100644
--- a/src/machine-type.h
+++ b/src/machine-type.h
@@ -79,28 +79,16 @@ class MachineType {
return semantic() == MachineSemantic::kUint32 ||
semantic() == MachineSemantic::kUint64;
}
-
static MachineRepresentation PointerRepresentation() {
return (kPointerSize == 4) ? MachineRepresentation::kWord32
: MachineRepresentation::kWord64;
}
- static MachineType Pointer() {
- return MachineType(PointerRepresentation(), MachineSemantic::kNone);
+ static MachineType UintPtr() {
+ return (kPointerSize == 4) ? Uint32() : Uint64();
}
static MachineType IntPtr() {
return (kPointerSize == 4) ? Int32() : Int64();
}
- static MachineType Float32() {
- return MachineType(MachineRepresentation::kFloat32,
- MachineSemantic::kNumber);
- }
- static MachineType Float64() {
- return MachineType(MachineRepresentation::kFloat64,
- MachineSemantic::kNumber);
- }
- static MachineType Simd128() {
- return MachineType(MachineRepresentation::kSimd128, MachineSemantic::kNone);
- }
static MachineType Int8() {
return MachineType(MachineRepresentation::kWord8, MachineSemantic::kInt32);
}
@@ -128,6 +116,20 @@ class MachineType {
return MachineType(MachineRepresentation::kWord64,
MachineSemantic::kUint64);
}
+ static MachineType Float32() {
+ return MachineType(MachineRepresentation::kFloat32,
+ MachineSemantic::kNumber);
+ }
+ static MachineType Float64() {
+ return MachineType(MachineRepresentation::kFloat64,
+ MachineSemantic::kNumber);
+ }
+ static MachineType Simd128() {
+ return MachineType(MachineRepresentation::kSimd128, MachineSemantic::kNone);
+ }
+ static MachineType Pointer() {
+ return MachineType(PointerRepresentation(), MachineSemantic::kNone);
+ }
static MachineType TaggedPointer() {
return MachineType(MachineRepresentation::kTaggedPointer,
MachineSemantic::kAny);
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698