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

Side by Side Diff: src/objects.cc

Issue 96083005: Remove Reloc::Mode CODE_TARGET_CONTEXT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years 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/objects.h ('k') | src/stub-cache.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 10632 matching lines...) Expand 10 before | Expand all | Expand 10 after
10643 10643
10644 10644
10645 void Code::ClearInlineCaches(Code::Kind kind) { 10645 void Code::ClearInlineCaches(Code::Kind kind) {
10646 ClearInlineCaches(&kind); 10646 ClearInlineCaches(&kind);
10647 } 10647 }
10648 10648
10649 10649
10650 void Code::ClearInlineCaches(Code::Kind* kind) { 10650 void Code::ClearInlineCaches(Code::Kind* kind) {
10651 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | 10651 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |
10652 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | 10652 RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) |
10653 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) | 10653 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID);
10654 RelocInfo::ModeMask(RelocInfo::CODE_TARGET_CONTEXT);
10655 for (RelocIterator it(this, mask); !it.done(); it.next()) { 10654 for (RelocIterator it(this, mask); !it.done(); it.next()) {
10656 RelocInfo* info = it.rinfo(); 10655 RelocInfo* info = it.rinfo();
10657 Code* target(Code::GetCodeFromTargetAddress(info->target_address())); 10656 Code* target(Code::GetCodeFromTargetAddress(info->target_address()));
10658 if (target->is_inline_cache_stub()) { 10657 if (target->is_inline_cache_stub()) {
10659 if (kind == NULL || *kind == target->kind()) { 10658 if (kind == NULL || *kind == target->kind()) {
10660 IC::Clear(this->GetIsolate(), info->pc()); 10659 IC::Clear(this->GetIsolate(), info->pc());
10661 } 10660 }
10662 } 10661 }
10663 } 10662 }
10664 } 10663 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
10857 Address code_start_address = instruction_start(); 10856 Address code_start_address = instruction_start();
10858 for (int i = 0; i < deopt_data->DeoptCount(); i++) { 10857 for (int i = 0; i < deopt_data->DeoptCount(); i++) {
10859 if (deopt_data->Pc(i)->value() == -1) continue; 10858 if (deopt_data->Pc(i)->value() == -1) continue;
10860 Address address = code_start_address + deopt_data->Pc(i)->value(); 10859 Address address = code_start_address + deopt_data->Pc(i)->value();
10861 if (address == pc) return true; 10860 if (address == pc) return true;
10862 } 10861 }
10863 return false; 10862 return false;
10864 } 10863 }
10865 10864
10866 10865
10866 bool Code::IsContextual() {
10867 ASSERT(is_inline_cache_stub());
10868 Kind kind = this->kind();
10869 if (kind == STORE_IC || kind == LOAD_IC || kind == CALL_IC) {
10870 ExtraICState extra_state = extra_ic_state();
10871 return IC::GetContextualMode(extra_state) == CONTEXTUAL;
10872 }
10873 return false;
10874 }
10875
10876
10867 // Identify kind of code. 10877 // Identify kind of code.
10868 const char* Code::Kind2String(Kind kind) { 10878 const char* Code::Kind2String(Kind kind) {
10869 switch (kind) { 10879 switch (kind) {
10870 #define CASE(name) case name: return #name; 10880 #define CASE(name) case name: return #name;
10871 CODE_KIND_LIST(CASE) 10881 CODE_KIND_LIST(CASE)
10872 #undef CASE 10882 #undef CASE
10873 case NUMBER_OF_KINDS: break; 10883 case NUMBER_OF_KINDS: break;
10874 } 10884 }
10875 UNREACHABLE(); 10885 UNREACHABLE();
10876 return NULL; 10886 return NULL;
(...skipping 5774 matching lines...) Expand 10 before | Expand all | Expand 10 after
16651 #define ERROR_MESSAGES_TEXTS(C, T) T, 16661 #define ERROR_MESSAGES_TEXTS(C, T) T,
16652 static const char* error_messages_[] = { 16662 static const char* error_messages_[] = {
16653 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16663 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16654 }; 16664 };
16655 #undef ERROR_MESSAGES_TEXTS 16665 #undef ERROR_MESSAGES_TEXTS
16656 return error_messages_[reason]; 16666 return error_messages_[reason];
16657 } 16667 }
16658 16668
16659 16669
16660 } } // namespace v8::internal 16670 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698