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

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

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/code-stubs-arm.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool specialized_on_rhs_; 99 bool specialized_on_rhs_;
100 BinaryOpIC::TypeInfo runtime_operands_type_; 100 BinaryOpIC::TypeInfo runtime_operands_type_;
101 char* name_; 101 char* name_;
102 102
103 static const int kMaxKnownRhs = 0x40000000; 103 static const int kMaxKnownRhs = 0x40000000;
104 static const int kKnownRhsKeyBits = 6; 104 static const int kKnownRhsKeyBits = 6;
105 105
106 // Minor key encoding in 17 bits. 106 // Minor key encoding in 17 bits.
107 class ModeBits: public BitField<OverwriteMode, 0, 2> {}; 107 class ModeBits: public BitField<OverwriteMode, 0, 2> {};
108 class OpBits: public BitField<Token::Value, 2, 6> {}; 108 class OpBits: public BitField<Token::Value, 2, 6> {};
109 class TypeInfoBits: public BitField<int, 8, 2> {}; 109 class TypeInfoBits: public BitField<int, 8, 3> {};
110 class RegisterBits: public BitField<bool, 10, 1> {}; 110 class RegisterBits: public BitField<bool, 11, 1> {};
111 class KnownIntBits: public BitField<int, 11, kKnownRhsKeyBits> {}; 111 class KnownIntBits: public BitField<int, 12, kKnownRhsKeyBits> {};
112 112
113 Major MajorKey() { return GenericBinaryOp; } 113 Major MajorKey() { return GenericBinaryOp; }
114 int MinorKey() { 114 int MinorKey() {
115 ASSERT((lhs_.is(r0) && rhs_.is(r1)) || 115 ASSERT((lhs_.is(r0) && rhs_.is(r1)) ||
116 (lhs_.is(r1) && rhs_.is(r0))); 116 (lhs_.is(r1) && rhs_.is(r0)));
117 // Encode the parameters in a unique 18 bit value. 117 // Encode the parameters in a unique 18 bit value.
118 return OpBits::encode(op_) 118 return OpBits::encode(op_)
119 | ModeBits::encode(mode_) 119 | ModeBits::encode(mode_)
120 | KnownIntBits::encode(MinorKeyForKnownInt()) 120 | KnownIntBits::encode(MinorKeyForKnownInt())
121 | TypeInfoBits::encode(runtime_operands_type_) 121 | TypeInfoBits::encode(runtime_operands_type_)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 virtual int GetCodeKind() { return Code::BINARY_OP_IC; } 191 virtual int GetCodeKind() { return Code::BINARY_OP_IC; }
192 192
193 virtual InlineCacheState GetICState() { 193 virtual InlineCacheState GetICState() {
194 return BinaryOpIC::ToState(runtime_operands_type_); 194 return BinaryOpIC::ToState(runtime_operands_type_);
195 } 195 }
196 196
197 const char* GetName(); 197 const char* GetName();
198 198
199 virtual void FinishCode(Code* code) {
200 code->set_binary_op_type(runtime_operands_type_);
201 }
202
199 #ifdef DEBUG 203 #ifdef DEBUG
200 void Print() { 204 void Print() {
201 if (!specialized_on_rhs_) { 205 if (!specialized_on_rhs_) {
202 PrintF("GenericBinaryOpStub (%s)\n", Token::String(op_)); 206 PrintF("GenericBinaryOpStub (%s)\n", Token::String(op_));
203 } else { 207 } else {
204 PrintF("GenericBinaryOpStub (%s by %d)\n", 208 PrintF("GenericBinaryOpStub (%s by %d)\n",
205 Token::String(op_), 209 Token::String(op_),
206 constant_rhs_); 210 constant_rhs_);
207 } 211 }
208 } 212 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 private: 486 private:
483 Major MajorKey() { return RegExpCEntry; } 487 Major MajorKey() { return RegExpCEntry; }
484 int MinorKey() { return 0; } 488 int MinorKey() { return 0; }
485 const char* GetName() { return "RegExpCEntryStub"; } 489 const char* GetName() { return "RegExpCEntryStub"; }
486 }; 490 };
487 491
488 492
489 } } // namespace v8::internal 493 } } // namespace v8::internal
490 494
491 #endif // V8_ARM_CODE_STUBS_ARM_H_ 495 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698