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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "double.h" | 7 #include "double.h" |
8 #include "factory.h" | 8 #include "factory.h" |
9 #include "hydrogen-infer-representation.h" | 9 #include "hydrogen-infer-representation.h" |
10 #include "property-details-inl.h" | 10 #include "property-details-inl.h" |
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2897 bool HConstant::EmitAtUses() { | 2897 bool HConstant::EmitAtUses() { |
2898 ASSERT(IsLinked()); | 2898 ASSERT(IsLinked()); |
2899 if (block()->graph()->has_osr() && | 2899 if (block()->graph()->has_osr() && |
2900 block()->graph()->IsStandardConstant(this)) { | 2900 block()->graph()->IsStandardConstant(this)) { |
2901 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. | 2901 // TODO(titzer): this seems like a hack that should be fixed by custom OSR. |
2902 return true; | 2902 return true; |
2903 } | 2903 } |
2904 if (UseCount() == 0) return true; | 2904 if (UseCount() == 0) return true; |
2905 if (IsCell()) return false; | 2905 if (IsCell()) return false; |
2906 if (representation().IsDouble()) return false; | 2906 if (representation().IsDouble()) return false; |
2907 if (representation().IsExternal()) return false; | |
mvstanton
2014/05/27 14:49:25
What is the reason for this change out of curiousi
danno
2014/05/27 14:58:25
This allows us to emit external pointers that are
| |
2907 return true; | 2908 return true; |
2908 } | 2909 } |
2909 | 2910 |
2910 | 2911 |
2911 HConstant* HConstant::CopyToRepresentation(Representation r, Zone* zone) const { | 2912 HConstant* HConstant::CopyToRepresentation(Representation r, Zone* zone) const { |
2912 if (r.IsSmi() && !has_smi_value_) return NULL; | 2913 if (r.IsSmi() && !has_smi_value_) return NULL; |
2913 if (r.IsInteger32() && !has_int32_value_) return NULL; | 2914 if (r.IsInteger32() && !has_int32_value_) return NULL; |
2914 if (r.IsDouble() && !has_double_value_) return NULL; | 2915 if (r.IsDouble() && !has_double_value_) return NULL; |
2915 if (r.IsExternal() && !has_external_reference_value_) return NULL; | 2916 if (r.IsExternal() && !has_external_reference_value_) return NULL; |
2916 if (has_int32_value_) { | 2917 if (has_int32_value_) { |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4786 break; | 4787 break; |
4787 case kExternalMemory: | 4788 case kExternalMemory: |
4788 stream->Add("[external-memory]"); | 4789 stream->Add("[external-memory]"); |
4789 break; | 4790 break; |
4790 } | 4791 } |
4791 | 4792 |
4792 stream->Add("@%d", offset()); | 4793 stream->Add("@%d", offset()); |
4793 } | 4794 } |
4794 | 4795 |
4795 } } // namespace v8::internal | 4796 } } // namespace v8::internal |
OLD | NEW |