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

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

Issue 14471041: Implement support for Math.imul in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/math.js » ('j') | src/math.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4403 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 }; 4414 };
4415 4415
4416 4416
4417 class HMul: public HArithmeticBinaryOperation { 4417 class HMul: public HArithmeticBinaryOperation {
4418 public: 4418 public:
4419 static HInstruction* New(Zone* zone, 4419 static HInstruction* New(Zone* zone,
4420 HValue* context, 4420 HValue* context,
4421 HValue* left, 4421 HValue* left,
4422 HValue* right); 4422 HValue* right);
4423 4423
4424 static HInstruction* NewImul(Zone* zone,
4425 HValue* context,
4426 HValue* left,
4427 HValue* right) {
4428 HMul* mul = new(zone) HMul(context, left, right);
4429 // TODO(mstarzinger): Prevent bailout on minus zero for imul.
4430 mul->AssumeRepresentation(Representation::Integer32());
4431 mul->ClearFlag(HValue::kCanOverflow);
4432 return mul;
4433 }
4434
4424 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); 4435 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
4425 4436
4426 virtual HValue* Canonicalize(); 4437 virtual HValue* Canonicalize();
4427 4438
4428 // Only commutative if it is certain that not two objects are multiplicated. 4439 // Only commutative if it is certain that not two objects are multiplicated.
4429 virtual bool IsCommutative() const { 4440 virtual bool IsCommutative() const {
4430 return !representation().IsTagged(); 4441 return !representation().IsTagged();
4431 } 4442 }
4432 4443
4433 DECLARE_CONCRETE_INSTRUCTION(Mul) 4444 DECLARE_CONCRETE_INSTRUCTION(Mul)
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
6550 virtual bool IsDeletable() const { return true; } 6561 virtual bool IsDeletable() const { return true; }
6551 }; 6562 };
6552 6563
6553 6564
6554 #undef DECLARE_INSTRUCTION 6565 #undef DECLARE_INSTRUCTION
6555 #undef DECLARE_CONCRETE_INSTRUCTION 6566 #undef DECLARE_CONCRETE_INSTRUCTION
6556 6567
6557 } } // namespace v8::internal 6568 } } // namespace v8::internal
6558 6569
6559 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6570 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/math.js » ('j') | src/math.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698