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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 void HChange::PrintDataTo(StringStream* stream) { | 1461 void HChange::PrintDataTo(StringStream* stream) { |
1462 HUnaryOperation::PrintDataTo(stream); | 1462 HUnaryOperation::PrintDataTo(stream); |
1463 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); | 1463 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); |
1464 | 1464 |
1465 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); | 1465 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); |
1466 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 1466 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
1467 if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined"); | 1467 if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined"); |
1468 } | 1468 } |
1469 | 1469 |
1470 | 1470 |
1471 void HJSArrayLength::PrintDataTo(StringStream* stream) { | |
1472 value()->PrintNameTo(stream); | |
1473 if (HasTypeCheck()) { | |
1474 stream->Add(" "); | |
1475 typecheck()->PrintNameTo(stream); | |
1476 } | |
1477 } | |
1478 | |
1479 | |
1480 HValue* HUnaryMathOperation::Canonicalize() { | 1471 HValue* HUnaryMathOperation::Canonicalize() { |
1481 if (op() == kMathFloor) { | 1472 if (op() == kMathFloor) { |
1482 // If the input is integer32 then we replace the floor instruction | 1473 // If the input is integer32 then we replace the floor instruction |
1483 // with its input. This happens before the representation changes are | 1474 // with its input. This happens before the representation changes are |
1484 // introduced. | 1475 // introduced. |
1485 if (value()->representation().IsInteger32()) return value(); | 1476 if (value()->representation().IsInteger32()) return value(); |
1486 | 1477 |
1487 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ | 1478 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \ |
1488 defined(V8_TARGET_ARCH_X64) | 1479 defined(V8_TARGET_ARCH_X64) |
1489 if (value()->IsDiv() && (value()->UseCount() == 1)) { | 1480 if (value()->IsDiv() && (value()->UseCount() == 1)) { |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2409 | 2400 |
2410 | 2401 |
2411 void HParameter::PrintDataTo(StringStream* stream) { | 2402 void HParameter::PrintDataTo(StringStream* stream) { |
2412 stream->Add("%u", index()); | 2403 stream->Add("%u", index()); |
2413 } | 2404 } |
2414 | 2405 |
2415 | 2406 |
2416 void HLoadNamedField::PrintDataTo(StringStream* stream) { | 2407 void HLoadNamedField::PrintDataTo(StringStream* stream) { |
2417 object()->PrintNameTo(stream); | 2408 object()->PrintNameTo(stream); |
2418 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); | 2409 stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); |
| 2410 if (HasTypeCheck()) { |
| 2411 stream->Add(" "); |
| 2412 typecheck()->PrintNameTo(stream); |
| 2413 } |
2419 } | 2414 } |
2420 | 2415 |
2421 | 2416 |
2422 // Returns true if an instance of this map can never find a property with this | 2417 // Returns true if an instance of this map can never find a property with this |
2423 // name in its prototype chain. This means all prototypes up to the top are | 2418 // name in its prototype chain. This means all prototypes up to the top are |
2424 // fast and don't have the name in them. It would be good if we could optimize | 2419 // fast and don't have the name in them. It would be good if we could optimize |
2425 // polymorphic loads where the property is sometimes found in the prototype | 2420 // polymorphic loads where the property is sometimes found in the prototype |
2426 // chain. | 2421 // chain. |
2427 static bool PrototypeChainCanNeverResolve( | 2422 static bool PrototypeChainCanNeverResolve( |
2428 Handle<Map> map, Handle<String> name) { | 2423 Handle<Map> map, Handle<String> name) { |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3536 | 3531 |
3537 | 3532 |
3538 void HCheckFunction::Verify() { | 3533 void HCheckFunction::Verify() { |
3539 HInstruction::Verify(); | 3534 HInstruction::Verify(); |
3540 ASSERT(HasNoUses()); | 3535 ASSERT(HasNoUses()); |
3541 } | 3536 } |
3542 | 3537 |
3543 #endif | 3538 #endif |
3544 | 3539 |
3545 } } // namespace v8::internal | 3540 } } // namespace v8::internal |
OLD | NEW |