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

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

Issue 5741003: Allow optimizing compiler to compute Math.log using untagged doubles. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 case kMathRound: 1373 case kMathRound:
1374 case kMathCeil: 1374 case kMathCeil:
1375 set_representation(Representation::Integer32()); 1375 set_representation(Representation::Integer32());
1376 break; 1376 break;
1377 case kMathAbs: 1377 case kMathAbs:
1378 set_representation(Representation::Tagged()); 1378 set_representation(Representation::Tagged());
1379 SetFlag(kFlexibleRepresentation); 1379 SetFlag(kFlexibleRepresentation);
1380 break; 1380 break;
1381 case kMathSqrt: 1381 case kMathSqrt:
1382 case kMathPowHalf: 1382 case kMathPowHalf:
1383 case kMathLog:
1383 default: 1384 default:
1384 set_representation(Representation::Double()); 1385 set_representation(Representation::Double());
1385 } 1386 }
1386 SetFlag(kUseGVN); 1387 SetFlag(kUseGVN);
1387 } 1388 }
1388 1389
1389 virtual void PrintDataTo(StringStream* stream) const; 1390 virtual void PrintDataTo(StringStream* stream) const;
1390 1391
1391 virtual HType CalculateInferredType() const; 1392 virtual HType CalculateInferredType() const;
1392 1393
1393 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); 1394 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
1394 1395
1395 virtual Representation RequiredInputRepresentation(int index) const { 1396 virtual Representation RequiredInputRepresentation(int index) const {
1396 switch (op_) { 1397 switch (op_) {
1397 case kMathFloor: 1398 case kMathFloor:
1398 case kMathRound: 1399 case kMathRound:
1399 case kMathCeil: 1400 case kMathCeil:
1400 case kMathSqrt: 1401 case kMathSqrt:
1401 case kMathPowHalf: 1402 case kMathPowHalf:
1403 case kMathLog:
1402 return Representation::Double(); 1404 return Representation::Double();
1403 break; 1405 break;
1404 case kMathAbs: 1406 case kMathAbs:
1405 return representation(); 1407 return representation();
1406 break; 1408 break;
1407 default: 1409 default:
1408 return Representation::None(); 1410 return Representation::None();
1409 } 1411 }
1410 } 1412 }
1411 1413
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2896 HValue* object() const { return left(); } 2898 HValue* object() const { return left(); }
2897 HValue* key() const { return right(); } 2899 HValue* key() const { return right(); }
2898 }; 2900 };
2899 2901
2900 #undef DECLARE_INSTRUCTION 2902 #undef DECLARE_INSTRUCTION
2901 #undef DECLARE_CONCRETE_INSTRUCTION 2903 #undef DECLARE_CONCRETE_INSTRUCTION
2902 2904
2903 } } // namespace v8::internal 2905 } } // namespace v8::internal
2904 2906
2905 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 2907 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698