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

Unified Diff: src/code-stubs.h

Issue 22184004: Desugar bitwise negation into XOR and kill all UnaryOp stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 84d9b023b3a237b36aee866c75b1ed5119e20d76..c58acd6b16d4674a2b4da3f7a49d6ceca0c62cfe 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -40,7 +40,6 @@ namespace internal {
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
V(CallFunction) \
V(CallConstruct) \
- V(UnaryOp) \
V(BinaryOp) \
V(StringAdd) \
V(SubString) \
@@ -593,73 +592,6 @@ class StoreGlobalStub : public HydrogenCodeStub {
};
-class UnaryOpStub : public HydrogenCodeStub {
- public:
- // Stub without type info available -> construct uninitialized
- explicit UnaryOpStub(Token::Value operation)
- : HydrogenCodeStub(UNINITIALIZED), operation_(operation) { }
- explicit UnaryOpStub(Code::ExtraICState ic_state) :
- state_(StateBits::decode(ic_state)),
- operation_(OperatorBits::decode(ic_state)) { }
-
- virtual void InitializeInterfaceDescriptor(
- Isolate* isolate,
- CodeStubInterfaceDescriptor* descriptor);
-
- virtual Code::Kind GetCodeKind() const { return Code::UNARY_OP_IC; }
- virtual InlineCacheState GetICState() {
- if (state_.Contains(GENERIC)) {
- return MEGAMORPHIC;
- } else if (state_.IsEmpty()) {
- return PREMONOMORPHIC;
- } else {
- return MONOMORPHIC;
- }
- }
- virtual Code::ExtraICState GetExtraICState() {
- return OperatorBits::encode(operation_) |
- StateBits::encode(state_.ToIntegral());
- }
-
- Token::Value operation() { return operation_; }
- Handle<JSFunction> ToJSFunction(Isolate* isolate);
- Builtins::JavaScript ToJSBuiltin();
-
- void UpdateStatus(Handle<Object> object);
- MaybeObject* Result(Handle<Object> object, Isolate* isolate);
- Handle<Code> GenerateCode();
- Handle<Type> GetType(Isolate* isolate);
-
- protected:
- void PrintState(StringStream* stream);
- void PrintBaseName(StringStream* stream);
-
- private:
- enum UnaryOpType {
- SMI,
- HEAP_NUMBER,
- GENERIC,
- NUMBER_OF_TYPES
- };
-
- class State : public EnumSet<UnaryOpType, byte> {
- public:
- State() : EnumSet<UnaryOpType, byte>() { }
- explicit State(byte bits) : EnumSet<UnaryOpType, byte>(bits) { }
- void Print(StringStream* stream) const;
- };
-
- class StateBits : public BitField<int, 0, NUMBER_OF_TYPES> { };
- class OperatorBits : public BitField<Token::Value, NUMBER_OF_TYPES, 8> { };
-
- State state_;
- Token::Value operation_;
-
- virtual CodeStub::Major MajorKey() { return UnaryOp; }
- virtual int NotMissMinorKey() { return GetExtraICState(); }
-};
-
-
class FastCloneShallowArrayStub : public HydrogenCodeStub {
public:
// Maximum length of copied elements array.
« no previous file with comments | « src/builtins.h ('k') | src/code-stubs.cc » ('j') | src/x64/lithium-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698