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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1309 | 1309 |
1310 HValue* HWrapReceiver::Canonicalize() { | 1310 HValue* HWrapReceiver::Canonicalize() { |
1311 if (HasNoUses()) return NULL; | 1311 if (HasNoUses()) return NULL; |
1312 if (receiver()->type().IsJSObject()) { | 1312 if (receiver()->type().IsJSObject()) { |
1313 return receiver(); | 1313 return receiver(); |
1314 } | 1314 } |
1315 return this; | 1315 return this; |
1316 } | 1316 } |
1317 | 1317 |
1318 | 1318 |
1319 HValue* HTypeofIsAndBranch::Canonicalize() { | |
1320 if (value()->representation().IsSpecialization()) { | |
1321 AllowHandleDereference allow_deref; | |
Jakob Kummerow
2013/11/05 14:42:49
No way!
If you absolutely need this information d
Weiliang
2013/11/07 11:53:30
Done.
| |
1322 if (type_literal()->Equals(isolate()->heap()->number_string())) { | |
1323 state_ = kAlwaysTrue; | |
1324 } else { | |
1325 state_ = kAlwaysFalse; | |
1326 } | |
1327 } | |
1328 | |
1329 return this; | |
1330 } | |
1331 | |
1332 | |
1319 void HTypeof::PrintDataTo(StringStream* stream) { | 1333 void HTypeof::PrintDataTo(StringStream* stream) { |
1320 value()->PrintNameTo(stream); | 1334 value()->PrintNameTo(stream); |
1321 } | 1335 } |
1322 | 1336 |
1323 | 1337 |
1324 void HForceRepresentation::PrintDataTo(StringStream* stream) { | 1338 void HForceRepresentation::PrintDataTo(StringStream* stream) { |
1325 stream->Add("%s ", representation().Mnemonic()); | 1339 stream->Add("%s ", representation().Mnemonic()); |
1326 value()->PrintNameTo(stream); | 1340 value()->PrintNameTo(stream); |
1327 } | 1341 } |
1328 | 1342 |
(...skipping 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4298 break; | 4312 break; |
4299 case kExternalMemory: | 4313 case kExternalMemory: |
4300 stream->Add("[external-memory]"); | 4314 stream->Add("[external-memory]"); |
4301 break; | 4315 break; |
4302 } | 4316 } |
4303 | 4317 |
4304 stream->Add("@%d", offset()); | 4318 stream->Add("@%d", offset()); |
4305 } | 4319 } |
4306 | 4320 |
4307 } } // namespace v8::internal | 4321 } } // namespace v8::internal |
OLD | NEW |