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

Side by Side Diff: src/code-stubs.h

Issue 8749002: Implement Math.pow using FPU instructions and inline it in crankshaft (ia32). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also do NaN/infinity check on base for TAGGED case. Created 9 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 virtual void PrintName(StringStream* stream); 437 virtual void PrintName(StringStream* stream);
438 438
439 Flags flags_; 439 Flags flags_;
440 }; 440 };
441 441
442 442
443 class MathPowStub: public CodeStub { 443 class MathPowStub: public CodeStub {
444 public: 444 public:
445 MathPowStub() {} 445 enum ExponentType { INTEGER, DOUBLE, TAGGED, ON_STACK};
446
447 explicit MathPowStub(ExponentType exponent_type)
448 : exponent_type_(exponent_type) { }
446 virtual void Generate(MacroAssembler* masm); 449 virtual void Generate(MacroAssembler* masm);
447 450
448 private: 451 private:
449 virtual CodeStub::Major MajorKey() { return MathPow; } 452 virtual CodeStub::Major MajorKey() { return MathPow; }
450 virtual int MinorKey() { return 0; } 453 virtual int MinorKey() { return exponent_type_; }
454
455 ExponentType exponent_type_;
451 }; 456 };
452 457
453 458
454 class ICCompareStub: public CodeStub { 459 class ICCompareStub: public CodeStub {
455 public: 460 public:
456 ICCompareStub(Token::Value op, CompareIC::State state) 461 ICCompareStub(Token::Value op, CompareIC::State state)
457 : op_(op), state_(state) { 462 : op_(op), state_(state) {
458 ASSERT(Token::IsCompareOp(op)); 463 ASSERT(Token::IsCompareOp(op));
459 } 464 }
460 465
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 int MinorKey() { return 0; } 1090 int MinorKey() { return 0; }
1086 1091
1087 void Generate(MacroAssembler* masm); 1092 void Generate(MacroAssembler* masm);
1088 1093
1089 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); 1094 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub);
1090 }; 1095 };
1091 1096
1092 } } // namespace v8::internal 1097 } } // namespace v8::internal
1093 1098
1094 #endif // V8_CODE_STUBS_H_ 1099 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/ia32/assembler-ia32.h » ('j') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698