OLD | NEW |
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 private: | 74 private: |
75 Token::Value op_; | 75 Token::Value op_; |
76 UnaryOverwriteMode mode_; | 76 UnaryOverwriteMode mode_; |
77 | 77 |
78 // Operand type information determined at runtime. | 78 // Operand type information determined at runtime. |
79 UnaryOpIC::TypeInfo operand_type_; | 79 UnaryOpIC::TypeInfo operand_type_; |
80 | 80 |
81 char* name_; | 81 char* name_; |
82 | 82 |
83 const char* GetName(); | 83 virtual const char* GetName(); |
84 | 84 |
85 #ifdef DEBUG | 85 #ifdef DEBUG |
86 void Print() { | 86 void Print() { |
87 PrintF("UnaryOpStub %d (op %s), (mode %d, runtime_type_info %s)\n", | 87 PrintF("UnaryOpStub %d (op %s), (mode %d, runtime_type_info %s)\n", |
88 MinorKey(), | 88 MinorKey(), |
89 Token::String(op_), | 89 Token::String(op_), |
90 static_cast<int>(mode_), | 90 static_cast<int>(mode_), |
91 UnaryOpIC::GetName(operand_type_)); | 91 UnaryOpIC::GetName(operand_type_)); |
92 } | 92 } |
93 #endif | 93 #endif |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 Token::Value op_; | 179 Token::Value op_; |
180 OverwriteMode mode_; | 180 OverwriteMode mode_; |
181 bool use_sse3_; | 181 bool use_sse3_; |
182 | 182 |
183 // Operand type information determined at runtime. | 183 // Operand type information determined at runtime. |
184 BinaryOpIC::TypeInfo operands_type_; | 184 BinaryOpIC::TypeInfo operands_type_; |
185 BinaryOpIC::TypeInfo result_type_; | 185 BinaryOpIC::TypeInfo result_type_; |
186 | 186 |
187 char* name_; | 187 char* name_; |
188 | 188 |
189 const char* GetName(); | 189 virtual const char* GetName(); |
190 | 190 |
191 #ifdef DEBUG | 191 #ifdef DEBUG |
192 void Print() { | 192 void Print() { |
193 PrintF("BinaryOpStub %d (op %s), " | 193 PrintF("BinaryOpStub %d (op %s), " |
194 "(mode %d, runtime_type_info %s)\n", | 194 "(mode %d, runtime_type_info %s)\n", |
195 MinorKey(), | 195 MinorKey(), |
196 Token::String(op_), | 196 Token::String(op_), |
197 static_cast<int>(mode_), | 197 static_cast<int>(mode_), |
198 BinaryOpIC::GetName(operands_type_)); | 198 BinaryOpIC::GetName(operands_type_)); |
199 } | 199 } |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 Register scratch1, | 408 Register scratch1, |
409 Register scratch2, | 409 Register scratch2, |
410 bool object_is_smi, | 410 bool object_is_smi, |
411 Label* not_found); | 411 Label* not_found); |
412 | 412 |
413 private: | 413 private: |
414 Major MajorKey() { return NumberToString; } | 414 Major MajorKey() { return NumberToString; } |
415 int MinorKey() { return 0; } | 415 int MinorKey() { return 0; } |
416 | 416 |
417 void Generate(MacroAssembler* masm); | 417 void Generate(MacroAssembler* masm); |
418 | |
419 const char* GetName() { return "NumberToStringStub"; } | |
420 | |
421 #ifdef DEBUG | |
422 void Print() { | |
423 PrintF("NumberToStringStub\n"); | |
424 } | |
425 #endif | |
426 }; | 418 }; |
427 | 419 |
428 | 420 |
429 class StringDictionaryLookupStub: public CodeStub { | 421 class StringDictionaryLookupStub: public CodeStub { |
430 public: | 422 public: |
431 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 423 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
432 | 424 |
433 StringDictionaryLookupStub(Register dictionary, | 425 StringDictionaryLookupStub(Register dictionary, |
434 Register result, | 426 Register result, |
435 Register index, | 427 Register index, |
(...skipping 23 matching lines...) Expand all Loading... |
459 static const int kTotalProbes = 20; | 451 static const int kTotalProbes = 20; |
460 | 452 |
461 static const int kCapacityOffset = | 453 static const int kCapacityOffset = |
462 StringDictionary::kHeaderSize + | 454 StringDictionary::kHeaderSize + |
463 StringDictionary::kCapacityIndex * kPointerSize; | 455 StringDictionary::kCapacityIndex * kPointerSize; |
464 | 456 |
465 static const int kElementsStartOffset = | 457 static const int kElementsStartOffset = |
466 StringDictionary::kHeaderSize + | 458 StringDictionary::kHeaderSize + |
467 StringDictionary::kElementsStartIndex * kPointerSize; | 459 StringDictionary::kElementsStartIndex * kPointerSize; |
468 | 460 |
469 | |
470 #ifdef DEBUG | |
471 void Print() { | |
472 PrintF("StringDictionaryLookupStub\n"); | |
473 } | |
474 #endif | |
475 | |
476 Major MajorKey() { return StringDictionaryNegativeLookup; } | 461 Major MajorKey() { return StringDictionaryNegativeLookup; } |
477 | 462 |
478 int MinorKey() { | 463 int MinorKey() { |
479 return DictionaryBits::encode(dictionary_.code()) | | 464 return DictionaryBits::encode(dictionary_.code()) | |
480 ResultBits::encode(result_.code()) | | 465 ResultBits::encode(result_.code()) | |
481 IndexBits::encode(index_.code()) | | 466 IndexBits::encode(index_.code()) | |
482 LookupModeBits::encode(mode_); | 467 LookupModeBits::encode(mode_); |
483 } | 468 } |
484 | 469 |
485 class DictionaryBits: public BitField<int, 0, 3> {}; | 470 class DictionaryBits: public BitField<int, 0, 3> {}; |
486 class ResultBits: public BitField<int, 3, 3> {}; | 471 class ResultBits: public BitField<int, 3, 3> {}; |
487 class IndexBits: public BitField<int, 6, 3> {}; | 472 class IndexBits: public BitField<int, 6, 3> {}; |
488 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; | 473 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; |
489 | 474 |
490 Register dictionary_; | 475 Register dictionary_; |
491 Register result_; | 476 Register result_; |
492 Register index_; | 477 Register index_; |
493 LookupMode mode_; | 478 LookupMode mode_; |
494 }; | 479 }; |
495 | 480 |
496 | 481 |
497 } } // namespace v8::internal | 482 } } // namespace v8::internal |
498 | 483 |
499 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 484 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
OLD | NEW |