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

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

Issue 7248063: Simplify UnaryOpStub a little bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 Major MajorKey() { return TranscendentalCache; } 56 Major MajorKey() { return TranscendentalCache; }
57 int MinorKey() { return type_ | argument_type_; } 57 int MinorKey() { return type_ | argument_type_; }
58 Runtime::FunctionId RuntimeFunction(); 58 Runtime::FunctionId RuntimeFunction();
59 void GenerateOperation(MacroAssembler* masm); 59 void GenerateOperation(MacroAssembler* masm);
60 }; 60 };
61 61
62 62
63 class UnaryOpStub: public CodeStub { 63 class UnaryOpStub: public CodeStub {
64 public: 64 public:
65 UnaryOpStub(Token::Value op, UnaryOverwriteMode mode) 65 UnaryOpStub(Token::Value op,
66 UnaryOverwriteMode mode,
67 UnaryOpIC::TypeInfo operand_type = UnaryOpIC::UNINITIALIZED)
66 : op_(op), 68 : op_(op),
67 mode_(mode), 69 mode_(mode),
68 operand_type_(UnaryOpIC::UNINITIALIZED),
69 name_(NULL) {
70 }
71
72 UnaryOpStub(int key, UnaryOpIC::TypeInfo operand_type)
73 : op_(OpBits::decode(key)),
74 mode_(ModeBits::decode(key)),
75 operand_type_(operand_type), 70 operand_type_(operand_type),
76 name_(NULL) { 71 name_(NULL) {
77 } 72 }
78 73
79 private: 74 private:
80 Token::Value op_; 75 Token::Value op_;
81 UnaryOverwriteMode mode_; 76 UnaryOverwriteMode mode_;
82 77
83 // Operand type information determined at runtime. 78 // Operand type information determined at runtime.
84 UnaryOpIC::TypeInfo operand_type_; 79 UnaryOpIC::TypeInfo operand_type_;
85 80
86 char* name_; 81 char* name_;
87 82
88 const char* GetName(); 83 const char* GetName();
89 84
90 #ifdef DEBUG 85 #ifdef DEBUG
91 void Print() { 86 void Print() {
92 PrintF("TypeRecordingUnaryOpStub %d (op %s), " 87 PrintF("UnaryOpStub %d (op %s), (mode %d, runtime_type_info %s)\n",
93 "(mode %d, runtime_type_info %s)\n",
94 MinorKey(), 88 MinorKey(),
95 Token::String(op_), 89 Token::String(op_),
96 static_cast<int>(mode_), 90 static_cast<int>(mode_),
97 UnaryOpIC::GetName(operand_type_)); 91 UnaryOpIC::GetName(operand_type_));
98 } 92 }
99 #endif 93 #endif
100 94
101 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {}; 95 class ModeBits: public BitField<UnaryOverwriteMode, 0, 1> {};
102 class OpBits: public BitField<Token::Value, 1, 7> {}; 96 class OpBits: public BitField<Token::Value, 1, 7> {};
103 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {}; 97 class OperandTypeInfoBits: public BitField<UnaryOpIC::TypeInfo, 8, 3> {};
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 Register dictionary_; 490 Register dictionary_;
497 Register result_; 491 Register result_;
498 Register index_; 492 Register index_;
499 LookupMode mode_; 493 LookupMode mode_;
500 }; 494 };
501 495
502 496
503 } } // namespace v8::internal 497 } } // namespace v8::internal
504 498
505 #endif // V8_IA32_CODE_STUBS_IA32_H_ 499 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698