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

Unified Diff: src/hydrogen-types.cc

Issue 1405363003: Move Hydrogen and Lithium to src/crankshaft/ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 years, 2 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/hydrogen-types.h ('k') | src/hydrogen-uint32-analysis.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-types.cc
diff --git a/src/hydrogen-types.cc b/src/hydrogen-types.cc
deleted file mode 100644
index 7c50a1d8876668587a75086d93d851f70a808585..0000000000000000000000000000000000000000
--- a/src/hydrogen-types.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/hydrogen-types.h"
-
-#include "src/ostreams.h"
-#include "src/types-inl.h"
-
-
-namespace v8 {
-namespace internal {
-
-// static
-template <class T>
-HType HType::FromType(typename T::TypeHandle type) {
- if (T::Any()->Is(type)) return HType::Any();
- if (!type->IsInhabited()) return HType::None();
- if (type->Is(T::SignedSmall())) return HType::Smi();
- if (type->Is(T::Number())) return HType::TaggedNumber();
- if (type->Is(T::Null())) return HType::Null();
- if (type->Is(T::String())) return HType::String();
- if (type->Is(T::Boolean())) return HType::Boolean();
- if (type->Is(T::Undefined())) return HType::Undefined();
- if (type->Is(T::Object())) return HType::JSObject();
- if (type->Is(T::Receiver())) return HType::JSReceiver();
- return HType::Tagged();
-}
-
-
-// static
-template
-HType HType::FromType<Type>(Type* type);
-
-
-// static
-template
-HType HType::FromType<HeapType>(Handle<HeapType> type);
-
-
-// static
-HType HType::FromValue(Handle<Object> value) {
- if (value->IsSmi()) return HType::Smi();
- if (value->IsNull()) return HType::Null();
- if (value->IsHeapNumber()) {
- double n = Handle<v8::internal::HeapNumber>::cast(value)->value();
- return IsSmiDouble(n) ? HType::Smi() : HType::HeapNumber();
- }
- if (value->IsString()) return HType::String();
- if (value->IsBoolean()) return HType::Boolean();
- if (value->IsUndefined()) return HType::Undefined();
- if (value->IsJSArray()) return HType::JSArray();
- if (value->IsJSObject()) return HType::JSObject();
- DCHECK(value->IsHeapObject());
- return HType::HeapObject();
-}
-
-
-std::ostream& operator<<(std::ostream& os, const HType& t) {
- // Note: The c1visualizer syntax for locals allows only a sequence of the
- // following characters: A-Za-z0-9_-|:
- switch (t.kind_) {
-#define DEFINE_CASE(Name, mask) \
- case HType::k##Name: \
- return os << #Name;
- HTYPE_LIST(DEFINE_CASE)
-#undef DEFINE_CASE
- }
- UNREACHABLE();
- return os;
-}
-
-} // namespace internal
-} // namespace v8
« no previous file with comments | « src/hydrogen-types.h ('k') | src/hydrogen-uint32-analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698