OLD | NEW |
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 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 return false; | 2865 return false; |
2866 } | 2866 } |
2867 if (HasExternalReferenceValue()) { | 2867 if (HasExternalReferenceValue()) { |
2868 return false; | 2868 return false; |
2869 } | 2869 } |
2870 | 2870 |
2871 DCHECK(!object_.handle().is_null()); | 2871 DCHECK(!object_.handle().is_null()); |
2872 Heap* heap = isolate()->heap(); | 2872 Heap* heap = isolate()->heap(); |
2873 DCHECK(!object_.IsKnownGlobal(heap->minus_zero_value())); | 2873 DCHECK(!object_.IsKnownGlobal(heap->minus_zero_value())); |
2874 DCHECK(!object_.IsKnownGlobal(heap->nan_value())); | 2874 DCHECK(!object_.IsKnownGlobal(heap->nan_value())); |
2875 Heap::RootListIndex index; | 2875 return |
2876 return heap->GetRootListIndex(object_.GetRawAddress(), &index) && | 2876 #define IMMORTAL_IMMOVABLE_ROOT(name) \ |
2877 Heap::RootIsImmortalImmovable(index); | 2877 object_.IsKnownGlobal(heap->root(Heap::k##name##RootIndex)) || |
| 2878 IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT) |
| 2879 #undef IMMORTAL_IMMOVABLE_ROOT |
| 2880 #define INTERNALIZED_STRING(name, value) \ |
| 2881 object_.IsKnownGlobal(heap->name()) || |
| 2882 INTERNALIZED_STRING_LIST(INTERNALIZED_STRING) |
| 2883 #undef INTERNALIZED_STRING |
| 2884 #define STRING_TYPE(NAME, size, name, Name) \ |
| 2885 object_.IsKnownGlobal(heap->name##_map()) || |
| 2886 STRING_TYPE_LIST(STRING_TYPE) |
| 2887 #undef STRING_TYPE |
| 2888 false; |
2878 } | 2889 } |
2879 | 2890 |
2880 | 2891 |
2881 bool HConstant::EmitAtUses() { | 2892 bool HConstant::EmitAtUses() { |
2882 DCHECK(IsLinked()); | 2893 DCHECK(IsLinked()); |
2883 if (block()->graph()->has_osr() && | 2894 if (block()->graph()->has_osr() && |
2884 block()->graph()->IsStandardConstant(this)) { | 2895 block()->graph()->IsStandardConstant(this)) { |
2885 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. | 2896 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. |
2886 return true; | 2897 return true; |
2887 } | 2898 } |
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4696 case HObjectAccess::kExternalMemory: | 4707 case HObjectAccess::kExternalMemory: |
4697 os << "[external-memory]"; | 4708 os << "[external-memory]"; |
4698 break; | 4709 break; |
4699 } | 4710 } |
4700 | 4711 |
4701 return os << "@" << access.offset(); | 4712 return os << "@" << access.offset(); |
4702 } | 4713 } |
4703 | 4714 |
4704 } // namespace internal | 4715 } // namespace internal |
4705 } // namespace v8 | 4716 } // namespace v8 |
OLD | NEW |