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

Unified Diff: src/code-stubs.cc

Issue 409613002: Store both major and minor key on code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 3ffe12ab6cf8822325c3acb8817b21ee668da1e3..5780ff6fdc46c5685c9566f8bf85b30c21627d32 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -189,7 +189,7 @@ Handle<Code> CodeStub::GetCode() {
HandleScope scope(isolate());
Handle<Code> new_object = GenerateCode();
- new_object->set_major_key(MajorKey());
+ new_object->set_stub_key(GetKey());
FinishCode(new_object);
RecordCodeGeneration(new_object);
@@ -371,8 +371,8 @@ bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
*code_out = Code::cast(*probe);
#ifdef DEBUG
Token::Value cached_op;
- ICCompareStub::DecodeMinorKey((*code_out)->stub_info(), NULL, NULL, NULL,
- &cached_op);
+ ICCompareStub::DecodeKey((*code_out)->stub_key(), NULL, NULL, NULL,
+ &cached_op);
ASSERT(op_ == cached_op);
#endif
return true;
@@ -389,11 +389,11 @@ int ICCompareStub::MinorKey() const {
}
-void ICCompareStub::DecodeMinorKey(int minor_key,
- CompareIC::State* left_state,
- CompareIC::State* right_state,
- CompareIC::State* handler_state,
- Token::Value* op) {
+void ICCompareStub::DecodeKey(uint32_t stub_key, CompareIC::State* left_state,
+ CompareIC::State* right_state,
+ CompareIC::State* handler_state,
+ Token::Value* op) {
+ int minor_key = MinorKeyFromKey(stub_key);
if (left_state) {
*left_state =
static_cast<CompareIC::State>(LeftStateField::decode(minor_key));
« no previous file with comments | « src/code-stubs.h ('k') | src/debug.cc » ('j') | src/heap-snapshot-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698