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

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

Issue 12178017: Tag stubs that rely on instance types as MEGAMORPHIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/builtins.h ('k') | test/mjsunit/regress/regress-crbug-173974.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 virtual int MinorKey() { return exponent_type_; } 541 virtual int MinorKey() { return exponent_type_; }
542 542
543 ExponentType exponent_type_; 543 ExponentType exponent_type_;
544 }; 544 };
545 545
546 546
547 class ICStub: public PlatformCodeStub { 547 class ICStub: public PlatformCodeStub {
548 public: 548 public:
549 explicit ICStub(Code::Kind kind) : kind_(kind) { } 549 explicit ICStub(Code::Kind kind) : kind_(kind) { }
550 virtual int GetCodeKind() { return kind_; } 550 virtual int GetCodeKind() { return kind_; }
551 virtual InlineCacheState GetICState() { return MONOMORPHIC; } 551 // Currently all IC stubs do not collect explicit type feedback but rather
552 // check the instance type.
553 // TODO(verwaest): These stubs should collect proper type feedback, and should
554 // not check the instance type explicitly (perhaps unless more than
555 // kMaxPolymorphism maps are recorded).
556 virtual InlineCacheState GetICState() { return MEGAMORPHIC; }
552 557
553 bool Describes(Code* code) { 558 bool Describes(Code* code) {
554 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey(); 559 return GetMajorKey(code) == MajorKey() && code->stub_info() == MinorKey();
555 } 560 }
556 561
557 protected: 562 protected:
558 class KindBits: public BitField<Code::Kind, 0, 4> {}; 563 class KindBits: public BitField<Code::Kind, 0, 4> {};
559 virtual void FinishCode(Handle<Code> code) { 564 virtual void FinishCode(Handle<Code> code) {
560 code->set_stub_info(MinorKey()); 565 code->set_stub_info(MinorKey());
561 } 566 }
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 1430
1426 // The current function entry hook. 1431 // The current function entry hook.
1427 static FunctionEntryHook entry_hook_; 1432 static FunctionEntryHook entry_hook_;
1428 1433
1429 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1434 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1430 }; 1435 };
1431 1436
1432 } } // namespace v8::internal 1437 } } // namespace v8::internal
1433 1438
1434 #endif // V8_CODE_STUBS_H_ 1439 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | test/mjsunit/regress/regress-crbug-173974.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698