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 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2855 if (has_external_reference_value_) { | 2855 if (has_external_reference_value_) { |
2856 return false; | 2856 return false; |
2857 } | 2857 } |
2858 | 2858 |
2859 DCHECK(!object_.handle().is_null()); | 2859 DCHECK(!object_.handle().is_null()); |
2860 Heap* heap = isolate()->heap(); | 2860 Heap* heap = isolate()->heap(); |
2861 DCHECK(!object_.IsKnownGlobal(heap->minus_zero_value())); | 2861 DCHECK(!object_.IsKnownGlobal(heap->minus_zero_value())); |
2862 DCHECK(!object_.IsKnownGlobal(heap->nan_value())); | 2862 DCHECK(!object_.IsKnownGlobal(heap->nan_value())); |
2863 return | 2863 return |
2864 #define IMMORTAL_IMMOVABLE_ROOT(name) \ | 2864 #define IMMORTAL_IMMOVABLE_ROOT(name) \ |
2865 object_.IsKnownGlobal(heap->name()) || | 2865 object_.IsKnownGlobal(heap->root(Heap::k##name##RootIndex)) || |
2866 IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT) | 2866 IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT) |
2867 #undef IMMORTAL_IMMOVABLE_ROOT | 2867 #undef IMMORTAL_IMMOVABLE_ROOT |
2868 #define INTERNALIZED_STRING(name, value) \ | 2868 #define INTERNALIZED_STRING(name, value) \ |
2869 object_.IsKnownGlobal(heap->name()) || | 2869 object_.IsKnownGlobal(heap->name()) || |
2870 INTERNALIZED_STRING_LIST(INTERNALIZED_STRING) | 2870 INTERNALIZED_STRING_LIST(INTERNALIZED_STRING) |
2871 #undef INTERNALIZED_STRING | 2871 #undef INTERNALIZED_STRING |
2872 #define STRING_TYPE(NAME, size, name, Name) \ | 2872 #define STRING_TYPE(NAME, size, name, Name) \ |
2873 object_.IsKnownGlobal(heap->name##_map()) || | 2873 object_.IsKnownGlobal(heap->name##_map()) || |
2874 STRING_TYPE_LIST(STRING_TYPE) | 2874 STRING_TYPE_LIST(STRING_TYPE) |
2875 #undef STRING_TYPE | 2875 #undef STRING_TYPE |
2876 #define SYMBOL(name) object_.IsKnownGlobal(heap->name()) || | |
2877 PRIVATE_SYMBOL_LIST(SYMBOL) | |
2878 #undef SYMBOL | |
2879 false; | 2876 false; |
2880 } | 2877 } |
2881 | 2878 |
2882 | 2879 |
2883 bool HConstant::EmitAtUses() { | 2880 bool HConstant::EmitAtUses() { |
2884 DCHECK(IsLinked()); | 2881 DCHECK(IsLinked()); |
2885 if (block()->graph()->has_osr() && | 2882 if (block()->graph()->has_osr() && |
2886 block()->graph()->IsStandardConstant(this)) { | 2883 block()->graph()->IsStandardConstant(this)) { |
2887 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. | 2884 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. |
2888 return true; | 2885 return true; |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4804 break; | 4801 break; |
4805 case HObjectAccess::kExternalMemory: | 4802 case HObjectAccess::kExternalMemory: |
4806 os << "[external-memory]"; | 4803 os << "[external-memory]"; |
4807 break; | 4804 break; |
4808 } | 4805 } |
4809 | 4806 |
4810 return os << "@" << access.offset(); | 4807 return os << "@" << access.offset(); |
4811 } | 4808 } |
4812 | 4809 |
4813 } } // namespace v8::internal | 4810 } } // namespace v8::internal |
OLD | NEW |