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

Unified Diff: src/compiler/instruction.h

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index ee868b180ce08c0c96e32e0aa622560afd3e4887..e04621b39a807775ae497e4870b328f15db5e9eb 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -658,11 +658,11 @@ class Constant FINAL {
explicit Constant(int32_t v) : type_(kInt32), value_(v) {}
explicit Constant(int64_t v) : type_(kInt64), value_(v) {}
- explicit Constant(double v) : type_(kFloat64), value_(BitCast<int64_t>(v)) {}
+ explicit Constant(double v) : type_(kFloat64), value_(bit_cast<int64_t>(v)) {}
explicit Constant(ExternalReference ref)
- : type_(kExternalReference), value_(BitCast<intptr_t>(ref)) {}
+ : type_(kExternalReference), value_(bit_cast<intptr_t>(ref)) {}
explicit Constant(Handle<HeapObject> obj)
- : type_(kHeapObject), value_(BitCast<intptr_t>(obj)) {}
+ : type_(kHeapObject), value_(bit_cast<intptr_t>(obj)) {}
Type type() const { return type_; }
@@ -680,17 +680,17 @@ class Constant FINAL {
double ToFloat64() const {
if (type() == kInt32) return ToInt32();
DCHECK_EQ(kFloat64, type());
- return BitCast<double>(value_);
+ return bit_cast<double>(value_);
}
ExternalReference ToExternalReference() const {
DCHECK_EQ(kExternalReference, type());
- return BitCast<ExternalReference>(static_cast<intptr_t>(value_));
+ return bit_cast<ExternalReference>(static_cast<intptr_t>(value_));
}
Handle<HeapObject> ToHeapObject() const {
DCHECK_EQ(kHeapObject, type());
- return BitCast<Handle<HeapObject> >(static_cast<intptr_t>(value_));
+ return bit_cast<Handle<HeapObject> >(static_cast<intptr_t>(value_));
}
private:
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698