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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1269 void HReturn::PrintDataTo(StringStream* stream) { | 1269 void HReturn::PrintDataTo(StringStream* stream) { |
1270 value()->PrintNameTo(stream); | 1270 value()->PrintNameTo(stream); |
1271 stream->Add(" (pop "); | 1271 stream->Add(" (pop "); |
1272 parameter_count()->PrintNameTo(stream); | 1272 parameter_count()->PrintNameTo(stream); |
1273 stream->Add(" values)"); | 1273 stream->Add(" values)"); |
1274 } | 1274 } |
1275 | 1275 |
1276 | 1276 |
1277 Representation HBranch::observed_input_representation(int index) { | 1277 Representation HBranch::observed_input_representation(int index) { |
1278 static const ToBooleanStub::Types tagged_types( | 1278 static const ToBooleanStub::Types tagged_types( |
1279 ToBooleanStub::UNDEFINED | | |
1280 ToBooleanStub::NULL_TYPE | | 1279 ToBooleanStub::NULL_TYPE | |
1281 ToBooleanStub::SPEC_OBJECT | | 1280 ToBooleanStub::SPEC_OBJECT | |
1282 ToBooleanStub::STRING | | 1281 ToBooleanStub::STRING | |
1283 ToBooleanStub::SYMBOL); | 1282 ToBooleanStub::SYMBOL); |
1283 static const ToBooleanStub::Types number_types( | |
1284 ToBooleanStub::HEAP_NUMBER | | |
1285 ToBooleanStub::SMI); | |
1284 if (expected_input_types_.ContainsAnyOf(tagged_types)) { | 1286 if (expected_input_types_.ContainsAnyOf(tagged_types)) { |
1285 return Representation::Tagged(); | 1287 return Representation::Tagged(); |
1286 } else if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1288 } |
1289 if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) { | |
1290 if (expected_input_types_.ContainsAnyOf(number_types)) { | |
Toon Verwaest
2013/06/18 17:01:52
Are you sure you want to make smi+undefined double
| |
1291 return Representation::Double(); | |
1292 } | |
1293 return Representation::Tagged(); | |
1294 } | |
1295 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | |
1287 return Representation::Double(); | 1296 return Representation::Double(); |
1288 } else if (expected_input_types_.Contains(ToBooleanStub::SMI)) { | 1297 } |
1298 if (expected_input_types_.Contains(ToBooleanStub::SMI)) { | |
1289 return Representation::Smi(); | 1299 return Representation::Smi(); |
1290 } else { | |
1291 return Representation::None(); | |
1292 } | 1300 } |
1301 return Representation::None(); | |
1293 } | 1302 } |
1294 | 1303 |
1295 | 1304 |
1296 void HCompareMap::PrintDataTo(StringStream* stream) { | 1305 void HCompareMap::PrintDataTo(StringStream* stream) { |
1297 value()->PrintNameTo(stream); | 1306 value()->PrintNameTo(stream); |
1298 stream->Add(" (%p)", *map()); | 1307 stream->Add(" (%p)", *map()); |
1299 HControlInstruction::PrintDataTo(stream); | 1308 HControlInstruction::PrintDataTo(stream); |
1300 } | 1309 } |
1301 | 1310 |
1302 | 1311 |
(...skipping 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3869 case kBackingStore: | 3878 case kBackingStore: |
3870 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3879 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
3871 stream->Add("[backing-store]"); | 3880 stream->Add("[backing-store]"); |
3872 break; | 3881 break; |
3873 } | 3882 } |
3874 | 3883 |
3875 stream->Add("@%d", offset()); | 3884 stream->Add("@%d", offset()); |
3876 } | 3885 } |
3877 | 3886 |
3878 } } // namespace v8::internal | 3887 } } // namespace v8::internal |
OLD | NEW |