Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 9584006: Inline ordered relative compares of mixed double/undefined values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 1450
1451 1451
1452 void HGoto::PrintDataTo(StringStream* stream) { 1452 void HGoto::PrintDataTo(StringStream* stream) {
1453 stream->Add("B%d", SuccessorAt(0)->block_id()); 1453 stream->Add("B%d", SuccessorAt(0)->block_id());
1454 } 1454 }
1455 1455
1456 1456
1457 void HCompareIDAndBranch::SetInputRepresentation(Representation r) { 1457 void HCompareIDAndBranch::SetInputRepresentation(Representation r) {
1458 input_representation_ = r; 1458 input_representation_ = r;
1459 if (r.IsDouble()) { 1459 if (r.IsDouble()) {
1460 SetFlag(kDeoptimizeOnUndefined); 1460 // ==, === and != have special handling of undefined, specifically undeifned
fschneider 2012/03/02 12:39:15 s/undeifned/undefined
danno 2012/03/02 13:28:45 Done.
1461 // == undefined is 'true' but the standard Crankshaft tagged-to-double
1462 // conversion to ensure the HCompareIDAndBranch's inputs, including
1463 // undefined values, are doubles will convert undefined to NaN, and NaN ==
1464 // NaN is 'false'. So all comparisons that aren't explicitly defined by the
1465 // spec to call ToPrimitive() (i.e. anything not an ordered relational
1466 // comparison) must deopt when one of the arguments is undefined.
1467 // See v8:1434
fschneider 2012/03/02 12:39:15 I'd also refer to the corresponding sections in th
danno 2012/03/02 13:28:45 Done.
1468 if (!Token::IsOrderedCompareOp(token_)) {
fschneider 2012/03/02 12:39:15 maybe rename to IsRelationalCompareOp.
danno 2012/03/02 13:28:45 Done.
1469 SetFlag(kDeoptimizeOnUndefined);
1470 }
1461 } else { 1471 } else {
1462 ASSERT(r.IsInteger32()); 1472 ASSERT(r.IsInteger32());
1463 } 1473 }
1464 } 1474 }
1465 1475
1466 1476
1467 void HParameter::PrintDataTo(StringStream* stream) { 1477 void HParameter::PrintDataTo(StringStream* stream) {
1468 stream->Add("%u", index()); 1478 stream->Add("%u", index());
1469 } 1479 }
1470 1480
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 2260
2251 2261
2252 void HCheckPrototypeMaps::Verify() { 2262 void HCheckPrototypeMaps::Verify() {
2253 HInstruction::Verify(); 2263 HInstruction::Verify();
2254 ASSERT(HasNoUses()); 2264 ASSERT(HasNoUses());
2255 } 2265 }
2256 2266
2257 #endif 2267 #endif
2258 2268
2259 } } // namespace v8::internal 2269 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | src/ia32/ic-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698