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

Side by Side Diff: src/x64/codegen-x64.h

Issue 488017: Give the binary op stubs better names to make profiles more informative. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/token.cc ('k') | src/x64/codegen-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 class GenericBinaryOpStub: public CodeStub { 664 class GenericBinaryOpStub: public CodeStub {
665 public: 665 public:
666 GenericBinaryOpStub(Token::Value op, 666 GenericBinaryOpStub(Token::Value op,
667 OverwriteMode mode, 667 OverwriteMode mode,
668 GenericBinaryFlags flags) 668 GenericBinaryFlags flags)
669 : op_(op), 669 : op_(op),
670 mode_(mode), 670 mode_(mode),
671 flags_(flags), 671 flags_(flags),
672 args_in_registers_(false), 672 args_in_registers_(false),
673 args_reversed_(false) { 673 args_reversed_(false),
674 name_(NULL) {
674 use_sse3_ = CpuFeatures::IsSupported(SSE3); 675 use_sse3_ = CpuFeatures::IsSupported(SSE3);
675 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); 676 ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
676 } 677 }
677 678
678 // Generate code to call the stub with the supplied arguments. This will add 679 // Generate code to call the stub with the supplied arguments. This will add
679 // code at the call site to prepare arguments either in registers or on the 680 // code at the call site to prepare arguments either in registers or on the
680 // stack together with the actual call. 681 // stack together with the actual call.
681 void GenerateCall(MacroAssembler* masm, Register left, Register right); 682 void GenerateCall(MacroAssembler* masm, Register left, Register right);
682 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); 683 void GenerateCall(MacroAssembler* masm, Register left, Smi* right);
683 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); 684 void GenerateCall(MacroAssembler* masm, Smi* left, Register right);
684 685
685 private: 686 private:
686 Token::Value op_; 687 Token::Value op_;
687 OverwriteMode mode_; 688 OverwriteMode mode_;
688 GenericBinaryFlags flags_; 689 GenericBinaryFlags flags_;
689 bool args_in_registers_; // Arguments passed in registers not on the stack. 690 bool args_in_registers_; // Arguments passed in registers not on the stack.
690 bool args_reversed_; // Left and right argument are swapped. 691 bool args_reversed_; // Left and right argument are swapped.
691 bool use_sse3_; 692 bool use_sse3_;
693 char* name_;
692 694
693 const char* GetName(); 695 const char* GetName();
694 696
695 #ifdef DEBUG 697 #ifdef DEBUG
696 void Print() { 698 void Print() {
697 PrintF("GenericBinaryOpStub (op %s), " 699 PrintF("GenericBinaryOpStub (op %s), "
698 "(mode %d, flags %d, registers %d, reversed %d)\n", 700 "(mode %d, flags %d, registers %d, reversed %d)\n",
699 Token::String(op_), 701 Token::String(op_),
700 static_cast<int>(mode_), 702 static_cast<int>(mode_),
701 static_cast<int>(flags_), 703 static_cast<int>(flags_),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 bool ascii); 773 bool ascii);
772 774
773 // Should the stub check whether arguments are strings? 775 // Should the stub check whether arguments are strings?
774 bool string_check_; 776 bool string_check_;
775 }; 777 };
776 778
777 779
778 } } // namespace v8::internal 780 } } // namespace v8::internal
779 781
780 #endif // V8_X64_CODEGEN_X64_H_ 782 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/token.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698