Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3061 HType HBitNot::CalculateInferredType() { | 3061 HType HBitNot::CalculateInferredType() { |
| 3062 return HType::TaggedNumber(); | 3062 return HType::TaggedNumber(); |
| 3063 } | 3063 } |
| 3064 | 3064 |
| 3065 | 3065 |
| 3066 HType HUnaryMathOperation::CalculateInferredType() { | 3066 HType HUnaryMathOperation::CalculateInferredType() { |
| 3067 return HType::TaggedNumber(); | 3067 return HType::TaggedNumber(); |
| 3068 } | 3068 } |
| 3069 | 3069 |
| 3070 | 3070 |
| 3071 Representation HUnaryMathOperation::RepresentationFromInputs() { | |
| 3072 // Determine the worst case of observed input representations and | |
| 3073 // the currently assumed output representation. | |
| 3074 Representation rep = representation(); | |
| 3075 rep = rep.generalize(observed_input_representation(1)); | |
|
Jakob Kummerow
2013/06/07 08:44:45
HUnaryMathOperation doesn't have observed input re
Toon Verwaest
2013/06/07 09:09:52
Done.
| |
| 3076 // If any of the actual input representation is more general than what we | |
| 3077 // have so far but not Tagged, use that representation instead. | |
| 3078 Representation input_rep = value()->representation(); | |
| 3079 if (!input_rep.IsTagged()) rep = rep.generalize(input_rep); | |
| 3080 return rep; | |
| 3081 } | |
| 3082 | |
| 3083 | |
| 3071 HType HStringCharFromCode::CalculateInferredType() { | 3084 HType HStringCharFromCode::CalculateInferredType() { |
| 3072 return HType::String(); | 3085 return HType::String(); |
| 3073 } | 3086 } |
| 3074 | 3087 |
| 3075 | 3088 |
| 3076 HType HAllocate::CalculateInferredType() { | 3089 HType HAllocate::CalculateInferredType() { |
| 3077 return type_; | 3090 return type_; |
| 3078 } | 3091 } |
| 3079 | 3092 |
| 3080 | 3093 |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3804 case kBackingStore: | 3817 case kBackingStore: |
| 3805 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3818 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
| 3806 stream->Add("[backing-store]"); | 3819 stream->Add("[backing-store]"); |
| 3807 break; | 3820 break; |
| 3808 } | 3821 } |
| 3809 | 3822 |
| 3810 stream->Add("@%d", offset()); | 3823 stream->Add("@%d", offset()); |
| 3811 } | 3824 } |
| 3812 | 3825 |
| 3813 } } // namespace v8::internal | 3826 } } // namespace v8::internal |
| OLD | NEW |