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

Side by Side Diff: src/hydrogen-instructions.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/double.h" 8 #include "src/double.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/hydrogen-infer-representation.h" 10 #include "src/hydrogen-infer-representation.h"
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
2637 2637
2638 2638
2639 OStream& HEnterInlined::PrintDataTo(OStream& os) const { // NOLINT 2639 OStream& HEnterInlined::PrintDataTo(OStream& os) const { // NOLINT
2640 return os << function()->debug_name()->ToCString().get() 2640 return os << function()->debug_name()->ToCString().get()
2641 << ", id=" << function()->id().ToInt(); 2641 << ", id=" << function()->id().ToInt();
2642 } 2642 }
2643 2643
2644 2644
2645 static bool IsInteger32(double value) { 2645 static bool IsInteger32(double value) {
2646 double roundtrip_value = static_cast<double>(static_cast<int32_t>(value)); 2646 double roundtrip_value = static_cast<double>(static_cast<int32_t>(value));
2647 return BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(value); 2647 return bit_cast<int64_t>(roundtrip_value) == bit_cast<int64_t>(value);
2648 } 2648 }
2649 2649
2650 2650
2651 HConstant::HConstant(Handle<Object> object, Representation r) 2651 HConstant::HConstant(Handle<Object> object, Representation r)
2652 : HTemplateInstruction<0>(HType::FromValue(object)), 2652 : HTemplateInstruction<0>(HType::FromValue(object)),
2653 object_(Unique<Object>::CreateUninitialized(object)), 2653 object_(Unique<Object>::CreateUninitialized(object)),
2654 object_map_(Handle<Map>::null()), 2654 object_map_(Handle<Map>::null()),
2655 has_stable_map_value_(false), 2655 has_stable_map_value_(false),
2656 has_smi_value_(false), 2656 has_smi_value_(false),
2657 has_int32_value_(false), 2657 has_int32_value_(false),
(...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
4758 break; 4758 break;
4759 case HObjectAccess::kExternalMemory: 4759 case HObjectAccess::kExternalMemory:
4760 os << "[external-memory]"; 4760 os << "[external-memory]";
4761 break; 4761 break;
4762 } 4762 }
4763 4763
4764 return os << "@" << access.offset(); 4764 return os << "@" << access.offset();
4765 } 4765 }
4766 4766
4767 } } // namespace v8::internal 4767 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698