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