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

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

Issue 7084032: Add asserts and state tracking to ensure that we do not call (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 6 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/ia32/builtins-ia32.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void GenerateOperation(MacroAssembler* masm); 59 void GenerateOperation(MacroAssembler* masm);
60 }; 60 };
61 61
62 62
63 class ToBooleanStub: public CodeStub { 63 class ToBooleanStub: public CodeStub {
64 public: 64 public:
65 ToBooleanStub() { } 65 ToBooleanStub() { }
66 66
67 void Generate(MacroAssembler* masm); 67 void Generate(MacroAssembler* masm);
68 68
69 virtual bool SometimesSetsUpAFrame() { return false; }
70
69 private: 71 private:
70 Major MajorKey() { return ToBoolean; } 72 Major MajorKey() { return ToBoolean; }
71 int MinorKey() { return 0; } 73 int MinorKey() { return 0; }
72 }; 74 };
73 75
74 76
75 class UnaryOpStub: public CodeStub { 77 class UnaryOpStub: public CodeStub {
76 public: 78 public:
77 UnaryOpStub(Token::Value op, UnaryOverwriteMode mode) 79 UnaryOpStub(Token::Value op, UnaryOverwriteMode mode)
78 : op_(op), 80 : op_(op),
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Register r0); 467 Register r0);
466 468
467 static void GeneratePositiveLookup(MacroAssembler* masm, 469 static void GeneratePositiveLookup(MacroAssembler* masm,
468 Label* miss, 470 Label* miss,
469 Label* done, 471 Label* done,
470 Register elements, 472 Register elements,
471 Register name, 473 Register name,
472 Register r0, 474 Register r0,
473 Register r1); 475 Register r1);
474 476
477 virtual bool SometimesSetsUpAFrame() { return false; }
478
475 private: 479 private:
476 static const int kInlinedProbes = 4; 480 static const int kInlinedProbes = 4;
477 static const int kTotalProbes = 20; 481 static const int kTotalProbes = 20;
478 482
479 static const int kCapacityOffset = 483 static const int kCapacityOffset =
480 StringDictionary::kHeaderSize + 484 StringDictionary::kHeaderSize +
481 StringDictionary::kCapacityIndex * kPointerSize; 485 StringDictionary::kCapacityIndex * kPointerSize;
482 486
483 static const int kElementsStartOffset = 487 static const int kElementsStartOffset =
484 StringDictionary::kHeaderSize + 488 StringDictionary::kHeaderSize +
485 StringDictionary::kElementsStartIndex * kPointerSize; 489 StringDictionary::kElementsStartIndex * kPointerSize;
486 490
487 491
488 #ifdef DEBUG 492 #ifdef DEBUG
489 void Print() { 493 void Print() {
490 PrintF("StringDictionaryLookupStub\n"); 494 PrintF("StringDictionaryLookupStub\n");
491 } 495 }
492 #endif 496 #endif
493 497
494 Major MajorKey() { return StringDictionaryNegativeLookup; } 498 Major MajorKey() { return StringDictionaryLookup; }
495 499
496 int MinorKey() { 500 int MinorKey() {
497 return DictionaryBits::encode(dictionary_.code()) | 501 return DictionaryBits::encode(dictionary_.code()) |
498 ResultBits::encode(result_.code()) | 502 ResultBits::encode(result_.code()) |
499 IndexBits::encode(index_.code()) | 503 IndexBits::encode(index_.code()) |
500 LookupModeBits::encode(mode_); 504 LookupModeBits::encode(mode_);
501 } 505 }
502 506
503 class DictionaryBits: public BitField<int, 0, 3> {}; 507 class DictionaryBits: public BitField<int, 0, 3> {};
504 class ResultBits: public BitField<int, 3, 3> {}; 508 class ResultBits: public BitField<int, 3, 3> {};
505 class IndexBits: public BitField<int, 6, 3> {}; 509 class IndexBits: public BitField<int, 6, 3> {};
506 class LookupModeBits: public BitField<LookupMode, 9, 1> {}; 510 class LookupModeBits: public BitField<LookupMode, 9, 1> {};
507 511
508 Register dictionary_; 512 Register dictionary_;
509 Register result_; 513 Register result_;
510 Register index_; 514 Register index_;
511 LookupMode mode_; 515 LookupMode mode_;
512 }; 516 };
513 517
514 518
515 } } // namespace v8::internal 519 } } // namespace v8::internal
516 520
517 #endif // V8_IA32_CODE_STUBS_IA32_H_ 521 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698