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

Unified Diff: bleeding_edge/src/codegen.h

Issue 503079: Add fast case stub for BIT_NOT. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bleeding_edge/src/code-stubs.h ('k') | bleeding_edge/src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bleeding_edge/src/codegen.h
===================================================================
--- bleeding_edge/src/codegen.h (revision 3511)
+++ bleeding_edge/src/codegen.h (working copy)
@@ -294,20 +294,26 @@
};
-class UnarySubStub : public CodeStub {
+class GenericUnaryOpStub : public CodeStub {
public:
- explicit UnarySubStub(bool overwrite)
- : overwrite_(overwrite) { }
+ GenericUnaryOpStub(Token::Value op, bool overwrite)
+ : op_(op), overwrite_(overwrite) { }
private:
+ Token::Value op_;
bool overwrite_;
- Major MajorKey() { return UnarySub; }
- int MinorKey() { return overwrite_ ? 1 : 0; }
+
+ class OverwriteField: public BitField<int, 0, 1> {};
+ class OpField: public BitField<Token::Value, 1, kMinorBits - 1> {};
+
+ Major MajorKey() { return GenericUnaryOp; }
+ int MinorKey() {
+ return OpField::encode(op_) | OverwriteField::encode(overwrite_);
+ }
+
void Generate(MacroAssembler* masm);
- const char* GetName() {
- return overwrite_ ? "UnarySubStub_Overwrite" : "UnarySubStub_Alloc";
- }
+ const char* GetName();
};
« no previous file with comments | « bleeding_edge/src/code-stubs.h ('k') | bleeding_edge/src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698