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

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

Issue 113343003: Remove the last remnants of the TranscendentalCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 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 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 2664 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 set_representation(Representation::Integer32()); 2675 set_representation(Representation::Integer32());
2676 break; 2676 break;
2677 case kMathAbs: 2677 case kMathAbs:
2678 // Not setting representation here: it is None intentionally. 2678 // Not setting representation here: it is None intentionally.
2679 SetFlag(kFlexibleRepresentation); 2679 SetFlag(kFlexibleRepresentation);
2680 // TODO(svenpanne) This flag is actually only needed if representation() 2680 // TODO(svenpanne) This flag is actually only needed if representation()
2681 // is tagged, and not when it is an unboxed double or unboxed integer. 2681 // is tagged, and not when it is an unboxed double or unboxed integer.
2682 SetGVNFlag(kChangesNewSpacePromotion); 2682 SetGVNFlag(kChangesNewSpacePromotion);
2683 break; 2683 break;
2684 case kMathLog: 2684 case kMathLog:
2685 set_representation(Representation::Double());
2686 // These operations use the TranscendentalCache, so they may allocate.
2687 SetGVNFlag(kChangesNewSpacePromotion);
2688 break;
2689 case kMathExp: 2685 case kMathExp:
2690 case kMathSqrt: 2686 case kMathSqrt:
2691 case kMathPowHalf: 2687 case kMathPowHalf:
2692 set_representation(Representation::Double()); 2688 set_representation(Representation::Double());
2693 break; 2689 break;
2694 default: 2690 default:
2695 UNREACHABLE(); 2691 UNREACHABLE();
2696 } 2692 }
2697 SetFlag(kUseGVN); 2693 SetFlag(kUseGVN);
2698 SetFlag(kAllowUndefinedAsNaN); 2694 SetFlag(kAllowUndefinedAsNaN);
(...skipping 2581 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 }; 5276 };
5281 5277
5282 5278
5283 class HCallStub V8_FINAL : public HUnaryCall { 5279 class HCallStub V8_FINAL : public HUnaryCall {
5284 public: 5280 public:
5285 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallStub, CodeStub::Major, int); 5281 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallStub, CodeStub::Major, int);
5286 CodeStub::Major major_key() { return major_key_; } 5282 CodeStub::Major major_key() { return major_key_; }
5287 5283
5288 HValue* context() { return value(); } 5284 HValue* context() { return value(); }
5289 5285
5290 void set_transcendental_type(TranscendentalCache::Type transcendental_type) {
5291 transcendental_type_ = transcendental_type;
5292 }
5293 TranscendentalCache::Type transcendental_type() {
5294 return transcendental_type_;
5295 }
5296
5297 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 5286 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
5298 5287
5299 DECLARE_CONCRETE_INSTRUCTION(CallStub) 5288 DECLARE_CONCRETE_INSTRUCTION(CallStub)
5300 5289
5301 private: 5290 private:
5302 HCallStub(HValue* context, CodeStub::Major major_key, int argument_count) 5291 HCallStub(HValue* context, CodeStub::Major major_key, int argument_count)
5303 : HUnaryCall(context, argument_count), 5292 : HUnaryCall(context, argument_count),
5304 major_key_(major_key), 5293 major_key_(major_key) {
5305 transcendental_type_(TranscendentalCache::kNumberOfCaches) {
5306 } 5294 }
5307 5295
5308 CodeStub::Major major_key_; 5296 CodeStub::Major major_key_;
5309 TranscendentalCache::Type transcendental_type_;
5310 }; 5297 };
5311 5298
5312 5299
5313 class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> { 5300 class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> {
5314 public: 5301 public:
5315 DECLARE_INSTRUCTION_FACTORY_P2(HUnknownOSRValue, HEnvironment*, int); 5302 DECLARE_INSTRUCTION_FACTORY_P2(HUnknownOSRValue, HEnvironment*, int);
5316 5303
5317 virtual void PrintDataTo(StringStream* stream); 5304 virtual void PrintDataTo(StringStream* stream);
5318 5305
5319 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 5306 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
7493 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7480 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7494 }; 7481 };
7495 7482
7496 7483
7497 #undef DECLARE_INSTRUCTION 7484 #undef DECLARE_INSTRUCTION
7498 #undef DECLARE_CONCRETE_INSTRUCTION 7485 #undef DECLARE_CONCRETE_INSTRUCTION
7499 7486
7500 } } // namespace v8::internal 7487 } } // namespace v8::internal
7501 7488
7502 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7489 #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