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

Side by Side Diff: src/objects.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 11420 matching lines...) Expand 10 before | Expand all | Expand 10 after
11431 if ((kind == STORE_IC || kind == KEYED_STORE_IC) && (extra == STRICT)) { 11431 if ((kind == STORE_IC || kind == KEYED_STORE_IC) && (extra == STRICT)) {
11432 os << "STRICT\n"; 11432 os << "STRICT\n";
11433 } else { 11433 } else {
11434 os << extra << "\n"; 11434 os << extra << "\n";
11435 } 11435 }
11436 } 11436 }
11437 11437
11438 11438
11439 void Code::Disassemble(const char* name, OStream& os) { // NOLINT 11439 void Code::Disassemble(const char* name, OStream& os) { // NOLINT
11440 os << "kind = " << Kind2String(kind()) << "\n"; 11440 os << "kind = " << Kind2String(kind()) << "\n";
11441 if (has_major_key()) { 11441 if (IsCodeStubOrIC()) {
11442 const char* n = CodeStub::MajorName(CodeStub::GetMajorKey(this), true); 11442 const char* n = CodeStub::MajorName(CodeStub::GetMajorKey(this), true);
11443 os << "major_key = " << (n == NULL ? "null" : n) << "\n"; 11443 os << "major_key = " << (n == NULL ? "null" : n) << "\n";
11444 } 11444 }
11445 if (is_inline_cache_stub()) { 11445 if (is_inline_cache_stub()) {
11446 os << "ic_state = " << ICState2String(ic_state()) << "\n"; 11446 os << "ic_state = " << ICState2String(ic_state()) << "\n";
11447 PrintExtraICState(os, kind(), extra_ic_state()); 11447 PrintExtraICState(os, kind(), extra_ic_state());
11448 if (ic_state() == MONOMORPHIC) { 11448 if (ic_state() == MONOMORPHIC) {
11449 os << "type = " << StubType2String(type()) << "\n"; 11449 os << "type = " << StubType2String(type()) << "\n";
11450 } 11450 }
11451 if (is_compare_ic_stub()) { 11451 if (is_compare_ic_stub()) {
11452 ASSERT(major_key() == CodeStub::CompareIC); 11452 ASSERT(CodeStub::GetMajorKey(this) == CodeStub::CompareIC);
11453 CompareIC::State left_state, right_state, handler_state; 11453 CompareIC::State left_state, right_state, handler_state;
11454 Token::Value op; 11454 Token::Value op;
11455 ICCompareStub::DecodeMinorKey(stub_info(), &left_state, &right_state, 11455 ICCompareStub::DecodeKey(stub_key(), &left_state, &right_state,
11456 &handler_state, &op); 11456 &handler_state, &op);
11457 os << "compare_state = " << CompareIC::GetStateName(left_state) << "*" 11457 os << "compare_state = " << CompareIC::GetStateName(left_state) << "*"
11458 << CompareIC::GetStateName(right_state) << " -> " 11458 << CompareIC::GetStateName(right_state) << " -> "
11459 << CompareIC::GetStateName(handler_state) << "\n"; 11459 << CompareIC::GetStateName(handler_state) << "\n";
11460 os << "compare_operation = " << Token::Name(op) << "\n"; 11460 os << "compare_operation = " << Token::Name(op) << "\n";
11461 } 11461 }
11462 } 11462 }
11463 if ((name != NULL) && (name[0] != '\0')) { 11463 if ((name != NULL) && (name[0] != '\0')) {
11464 os << "name = " << name << "\n"; 11464 os << "name = " << name << "\n";
11465 } 11465 }
11466 if (kind() == OPTIMIZED_FUNCTION) { 11466 if (kind() == OPTIMIZED_FUNCTION) {
(...skipping 5493 matching lines...) Expand 10 before | Expand all | Expand 10 after
16960 #define ERROR_MESSAGES_TEXTS(C, T) T, 16960 #define ERROR_MESSAGES_TEXTS(C, T) T,
16961 static const char* error_messages_[] = { 16961 static const char* error_messages_[] = {
16962 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16962 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16963 }; 16963 };
16964 #undef ERROR_MESSAGES_TEXTS 16964 #undef ERROR_MESSAGES_TEXTS
16965 return error_messages_[reason]; 16965 return error_messages_[reason];
16966 } 16966 }
16967 16967
16968 16968
16969 } } // namespace v8::internal 16969 } } // namespace v8::internal
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698