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

Side by Side Diff: src/objects.cc

Issue 23756009: remove getcurrent from stubs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reorder isolate parameter Created 7 years, 3 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/objects.h ('k') | src/runtime.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 10414 matching lines...) Expand 10 before | Expand all | Expand 10 after
10425 } 10425 }
10426 10426
10427 10427
10428 bool Code::allowed_in_shared_map_code_cache() { 10428 bool Code::allowed_in_shared_map_code_cache() {
10429 return is_keyed_load_stub() || is_keyed_store_stub() || 10429 return is_keyed_load_stub() || is_keyed_store_stub() ||
10430 (is_compare_ic_stub() && 10430 (is_compare_ic_stub() &&
10431 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); 10431 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT);
10432 } 10432 }
10433 10433
10434 10434
10435 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { 10435 void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) {
10436 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); 10436 PatchPlatformCodeAge(isolate, sequence, kNoAge, NO_MARKING_PARITY);
10437 } 10437 }
10438 10438
10439 10439
10440 void Code::MakeOlder(MarkingParity current_parity) { 10440 void Code::MakeOlder(MarkingParity current_parity) {
10441 byte* sequence = FindCodeAgeSequence(); 10441 byte* sequence = FindCodeAgeSequence();
10442 if (sequence != NULL) { 10442 if (sequence != NULL) {
10443 Age age; 10443 Age age;
10444 MarkingParity code_parity; 10444 MarkingParity code_parity;
10445 GetCodeAgeAndParity(sequence, &age, &code_parity); 10445 GetCodeAgeAndParity(sequence, &age, &code_parity);
10446 if (age != kLastCodeAge && code_parity != current_parity) { 10446 if (age != kLastCodeAge && code_parity != current_parity) {
10447 PatchPlatformCodeAge(sequence, static_cast<Age>(age + 1), 10447 PatchPlatformCodeAge(GetIsolate(),
10448 sequence,
10449 static_cast<Age>(age + 1),
10448 current_parity); 10450 current_parity);
10449 } 10451 }
10450 } 10452 }
10451 } 10453 }
10452 10454
10453 10455
10454 bool Code::IsOld() { 10456 bool Code::IsOld() {
10455 byte* sequence = FindCodeAgeSequence(); 10457 byte* sequence = FindCodeAgeSequence();
10456 if (sequence == NULL) return false; 10458 if (sequence == NULL) return false;
10457 Age age; 10459 Age age;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
10500 *age = k##AGE##CodeAge; \ 10502 *age = k##AGE##CodeAge; \
10501 *parity = ODD_MARKING_PARITY; \ 10503 *parity = ODD_MARKING_PARITY; \
10502 return; \ 10504 return; \
10503 } 10505 }
10504 CODE_AGE_LIST(HANDLE_CODE_AGE) 10506 CODE_AGE_LIST(HANDLE_CODE_AGE)
10505 #undef HANDLE_CODE_AGE 10507 #undef HANDLE_CODE_AGE
10506 UNREACHABLE(); 10508 UNREACHABLE();
10507 } 10509 }
10508 10510
10509 10511
10510 Code* Code::GetCodeAgeStub(Age age, MarkingParity parity) { 10512 Code* Code::GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity parity) {
10511 Isolate* isolate = Isolate::Current();
10512 Builtins* builtins = isolate->builtins(); 10513 Builtins* builtins = isolate->builtins();
10513 switch (age) { 10514 switch (age) {
10514 #define HANDLE_CODE_AGE(AGE) \ 10515 #define HANDLE_CODE_AGE(AGE) \
10515 case k##AGE##CodeAge: { \ 10516 case k##AGE##CodeAge: { \
10516 Code* stub = parity == EVEN_MARKING_PARITY \ 10517 Code* stub = parity == EVEN_MARKING_PARITY \
10517 ? *builtins->Make##AGE##CodeYoungAgainEvenMarking() \ 10518 ? *builtins->Make##AGE##CodeYoungAgainEvenMarking() \
10518 : *builtins->Make##AGE##CodeYoungAgainOddMarking(); \ 10519 : *builtins->Make##AGE##CodeYoungAgainOddMarking(); \
10519 return stub; \ 10520 return stub; \
10520 } 10521 }
10521 CODE_AGE_LIST(HANDLE_CODE_AGE) 10522 CODE_AGE_LIST(HANDLE_CODE_AGE)
(...skipping 5623 matching lines...) Expand 10 before | Expand all | Expand 10 after
16145 #define ERROR_MESSAGES_TEXTS(C, T) T, 16146 #define ERROR_MESSAGES_TEXTS(C, T) T,
16146 static const char* error_messages_[] = { 16147 static const char* error_messages_[] = {
16147 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16148 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16148 }; 16149 };
16149 #undef ERROR_MESSAGES_TEXTS 16150 #undef ERROR_MESSAGES_TEXTS
16150 return error_messages_[reason]; 16151 return error_messages_[reason];
16151 } 16152 }
16152 16153
16153 16154
16154 } } // namespace v8::internal 16155 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698