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

Unified Diff: src/code-stubs.cc

Issue 11411033: Reduced TLS accesses even further. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reverted accidental change Created 8 years, 1 month 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
« no previous file with comments | « src/code-stubs.h ('k') | src/handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 117b3b12d80094f97ebd71803ed1e3f043f6af33..276c87ebd00a227f162ed93cf81770ddcce05830 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -37,11 +37,11 @@
namespace v8 {
namespace internal {
-bool CodeStub::FindCodeInCache(Code** code_out) {
- Heap* heap = Isolate::Current()->heap();
- int index = heap->code_stubs()->FindEntry(GetKey());
+bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) {
+ UnseededNumberDictionary* stubs = isolate->heap()->code_stubs();
+ int index = stubs->FindEntry(GetKey());
if (index != UnseededNumberDictionary::kNotFound) {
- *code_out = Code::cast(heap->code_stubs()->ValueAt(index));
+ *code_out = Code::cast(stubs->ValueAt(index));
return true;
}
return false;
@@ -93,8 +93,8 @@ Handle<Code> CodeStub::GetCode() {
Heap* heap = isolate->heap();
Code* code;
if (UseSpecialCache()
- ? FindCodeInSpecialCache(&code)
- : FindCodeInCache(&code)) {
+ ? FindCodeInSpecialCache(&code, isolate)
+ : FindCodeInCache(&code, isolate)) {
ASSERT(IsPregenerated() == code->is_pregenerated());
return Handle<Code>(code);
}
@@ -297,8 +297,7 @@ void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
}
-bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) {
- Isolate* isolate = known_map_->GetIsolate();
+bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) {
Factory* factory = isolate->factory();
Code::Flags flags = Code::ComputeFlags(
static_cast<Code::Kind>(GetCodeKind()),
« no previous file with comments | « src/code-stubs.h ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698