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

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

Issue 6486033: Revert r6748.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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
« 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 V(LoadFunctionPrototype) \ 126 V(LoadFunctionPrototype) \
127 V(LoadGlobal) \ 127 V(LoadGlobal) \
128 V(LoadKeyedFastElement) \ 128 V(LoadKeyedFastElement) \
129 V(LoadKeyedGeneric) \ 129 V(LoadKeyedGeneric) \
130 V(LoadNamedField) \ 130 V(LoadNamedField) \
131 V(LoadNamedGeneric) \ 131 V(LoadNamedGeneric) \
132 V(LoadPixelArrayElement) \ 132 V(LoadPixelArrayElement) \
133 V(LoadPixelArrayExternalPointer) \ 133 V(LoadPixelArrayExternalPointer) \
134 V(Mod) \ 134 V(Mod) \
135 V(Mul) \ 135 V(Mul) \
136 V(Neg) \
137 V(ObjectLiteral) \ 136 V(ObjectLiteral) \
138 V(OsrEntry) \ 137 V(OsrEntry) \
139 V(OuterContext) \ 138 V(OuterContext) \
140 V(Parameter) \ 139 V(Parameter) \
141 V(PixelArrayLength) \ 140 V(PixelArrayLength) \
142 V(Power) \ 141 V(Power) \
143 V(PushArgument) \ 142 V(PushArgument) \
144 V(RegExpLiteral) \ 143 V(RegExpLiteral) \
145 V(Return) \ 144 V(Return) \
146 V(Sar) \ 145 V(Sar) \
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 } 1410 }
1412 virtual HType CalculateInferredType() const; 1411 virtual HType CalculateInferredType() const;
1413 1412
1414 DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not") 1413 DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not")
1415 1414
1416 protected: 1415 protected:
1417 virtual bool DataEquals(HValue* other) const { return true; } 1416 virtual bool DataEquals(HValue* other) const { return true; }
1418 }; 1417 };
1419 1418
1420 1419
1421 class HNeg: public HUnaryOperation {
1422 public:
1423 explicit HNeg(HValue* value) : HUnaryOperation(value) {
1424 set_representation(Representation::Tagged());
1425 SetFlag(kFlexibleRepresentation);
1426 SetFlag(kCanOverflow);
1427 SetAllSideEffects();
1428 }
1429
1430 virtual void RepresentationChanged(Representation to) {
1431 // May change from tagged to untagged, not vice versa.
1432 ASSERT(representation().IsTagged() || representation().Equals(to));
1433 if (!to.IsTagged()) {
1434 ClearAllSideEffects();
1435 SetFlag(kUseGVN);
1436 }
1437 }
1438
1439 virtual Representation RequiredInputRepresentation(int index) const {
1440 return representation();
1441 }
1442
1443 virtual HType CalculateInferredType() const;
1444 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
1445 virtual void PrintDataTo(StringStream* stream) const;
1446 DECLARE_CONCRETE_INSTRUCTION(Neg, "neg")
1447
1448 protected:
1449 virtual bool DataEquals(HValue* other) const { return true; }
1450 virtual Range* InferRange();
1451 };
1452
1453
1454 class HUnaryMathOperation: public HUnaryOperation { 1420 class HUnaryMathOperation: public HUnaryOperation {
1455 public: 1421 public:
1456 HUnaryMathOperation(HValue* value, BuiltinFunctionId op) 1422 HUnaryMathOperation(HValue* value, BuiltinFunctionId op)
1457 : HUnaryOperation(value), op_(op) { 1423 : HUnaryOperation(value), op_(op) {
1458 switch (op) { 1424 switch (op) {
1459 case kMathFloor: 1425 case kMathFloor:
1460 case kMathRound: 1426 case kMathRound:
1461 case kMathCeil: 1427 case kMathCeil:
1462 set_representation(Representation::Integer32()); 1428 set_representation(Representation::Integer32());
1463 break; 1429 break;
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after
3451 HValue* object() const { return left(); } 3417 HValue* object() const { return left(); }
3452 HValue* key() const { return right(); } 3418 HValue* key() const { return right(); }
3453 }; 3419 };
3454 3420
3455 #undef DECLARE_INSTRUCTION 3421 #undef DECLARE_INSTRUCTION
3456 #undef DECLARE_CONCRETE_INSTRUCTION 3422 #undef DECLARE_CONCRETE_INSTRUCTION
3457 3423
3458 } } // namespace v8::internal 3424 } } // namespace v8::internal
3459 3425
3460 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3426 #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