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

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

Issue 6067004: Version 3.0.4... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/hydrogen-instructions.cc » ('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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 true_destination_(true_destination), 898 true_destination_(true_destination),
899 false_destination_(false_destination) { 899 false_destination_(false_destination) {
900 ASSERT(true_destination != NULL); 900 ASSERT(true_destination != NULL);
901 ASSERT(false_destination != NULL); 901 ASSERT(false_destination != NULL);
902 ASSERT(!map.is_null()); 902 ASSERT(!map.is_null());
903 } 903 }
904 904
905 virtual HBasicBlock* FirstSuccessor() const { return true_destination_; } 905 virtual HBasicBlock* FirstSuccessor() const { return true_destination_; }
906 virtual HBasicBlock* SecondSuccessor() const { return false_destination_; } 906 virtual HBasicBlock* SecondSuccessor() const { return false_destination_; }
907 907
908 virtual void PrintDataTo(StringStream* stream) const;
909
908 Handle<Map> map() const { return map_; } 910 Handle<Map> map() const { return map_; }
909 911
910 DECLARE_CONCRETE_INSTRUCTION(CompareMapAndBranch, "compare_map_and_branch") 912 DECLARE_CONCRETE_INSTRUCTION(CompareMapAndBranch, "compare_map_and_branch")
911 913
912 private: 914 private:
913 Handle<Map> map_; 915 Handle<Map> map_;
914 HBasicBlock* true_destination_; 916 HBasicBlock* true_destination_;
915 HBasicBlock* false_destination_; 917 HBasicBlock* false_destination_;
916 }; 918 };
917 919
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 case kMathCeil: 1382 case kMathCeil:
1381 set_representation(Representation::Integer32()); 1383 set_representation(Representation::Integer32());
1382 break; 1384 break;
1383 case kMathAbs: 1385 case kMathAbs:
1384 set_representation(Representation::Tagged()); 1386 set_representation(Representation::Tagged());
1385 SetFlag(kFlexibleRepresentation); 1387 SetFlag(kFlexibleRepresentation);
1386 break; 1388 break;
1387 case kMathSqrt: 1389 case kMathSqrt:
1388 case kMathPowHalf: 1390 case kMathPowHalf:
1389 case kMathLog: 1391 case kMathLog:
1392 case kMathSin:
1393 case kMathCos:
1390 set_representation(Representation::Double()); 1394 set_representation(Representation::Double());
1391 break; 1395 break;
1392 default: 1396 default:
1393 UNREACHABLE(); 1397 UNREACHABLE();
1394 } 1398 }
1395 SetFlag(kUseGVN); 1399 SetFlag(kUseGVN);
1396 } 1400 }
1397 1401
1398 virtual void PrintDataTo(StringStream* stream) const; 1402 virtual void PrintDataTo(StringStream* stream) const;
1399 1403
1400 virtual HType CalculateInferredType() const; 1404 virtual HType CalculateInferredType() const;
1401 1405
1402 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); 1406 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
1403 1407
1404 virtual Representation RequiredInputRepresentation(int index) const { 1408 virtual Representation RequiredInputRepresentation(int index) const {
1405 switch (op_) { 1409 switch (op_) {
1406 case kMathFloor: 1410 case kMathFloor:
1407 case kMathRound: 1411 case kMathRound:
1408 case kMathCeil: 1412 case kMathCeil:
1409 case kMathSqrt: 1413 case kMathSqrt:
1410 case kMathPowHalf: 1414 case kMathPowHalf:
1411 case kMathLog: 1415 case kMathLog:
1416 case kMathSin:
1417 case kMathCos:
1412 return Representation::Double(); 1418 return Representation::Double();
1413 break; 1419 break;
1414 case kMathAbs: 1420 case kMathAbs:
1415 return representation(); 1421 return representation();
1416 break; 1422 break;
1417 default: 1423 default:
1418 return Representation::None(); 1424 return Representation::None();
1419 } 1425 }
1420 } 1426 }
1421 1427
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 HValue* object() const { return left(); } 2944 HValue* object() const { return left(); }
2939 HValue* key() const { return right(); } 2945 HValue* key() const { return right(); }
2940 }; 2946 };
2941 2947
2942 #undef DECLARE_INSTRUCTION 2948 #undef DECLARE_INSTRUCTION
2943 #undef DECLARE_CONCRETE_INSTRUCTION 2949 #undef DECLARE_CONCRETE_INSTRUCTION
2944 2950
2945 } } // namespace v8::internal 2951 } } // namespace v8::internal
2946 2952
2947 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 2953 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698