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

Side by Side Diff: src/hydrogen.cc

Issue 12319144: Avoid TLS accesses in Object::Lookup and Object::GetPrototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified Object::GetPrototype a bit Created 7 years, 9 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/handles.cc ('k') | src/ia32/stub-cache-ia32.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5971 matching lines...) Expand 10 before | Expand all | Expand 10 after
5982 if (proto_result.IsProperty()) { 5982 if (proto_result.IsProperty()) {
5983 // If the inherited property could induce readonly-ness, bail out. 5983 // If the inherited property could induce readonly-ness, bail out.
5984 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) { 5984 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) {
5985 Bailout("improper object on prototype chain for store"); 5985 Bailout("improper object on prototype chain for store");
5986 return NULL; 5986 return NULL;
5987 } 5987 }
5988 // We only need to check up to the preexisting property. 5988 // We only need to check up to the preexisting property.
5989 proto = proto_result.holder(); 5989 proto = proto_result.holder();
5990 } else { 5990 } else {
5991 // Otherwise, find the top prototype. 5991 // Otherwise, find the top prototype.
5992 while (proto->GetPrototype()->IsJSObject()) proto = proto->GetPrototype(); 5992 while (proto->GetPrototype(isolate())->IsJSObject()) {
5993 ASSERT(proto->GetPrototype()->IsNull()); 5993 proto = proto->GetPrototype(isolate());
5994 }
5995 ASSERT(proto->GetPrototype(isolate())->IsNull());
5994 } 5996 }
5995 ASSERT(proto->IsJSObject()); 5997 ASSERT(proto->IsJSObject());
5996 AddInstruction(new(zone()) HCheckPrototypeMaps( 5998 AddInstruction(new(zone()) HCheckPrototypeMaps(
5997 Handle<JSObject>(JSObject::cast(map->prototype())), 5999 Handle<JSObject>(JSObject::cast(map->prototype())),
5998 Handle<JSObject>(JSObject::cast(proto)), 6000 Handle<JSObject>(JSObject::cast(proto)),
5999 zone())); 6001 zone()));
6000 } 6002 }
6001 6003
6002 int index = ComputeLoadStoreFieldIndex(map, name, lookup); 6004 int index = ComputeLoadStoreFieldIndex(map, name, lookup);
6003 bool is_in_object = index < 0; 6005 bool is_in_object = index < 0;
(...skipping 4788 matching lines...) Expand 10 before | Expand all | Expand 10 after
10792 } 10794 }
10793 } 10795 }
10794 10796
10795 #ifdef DEBUG 10797 #ifdef DEBUG
10796 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10798 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10797 if (allocator_ != NULL) allocator_->Verify(); 10799 if (allocator_ != NULL) allocator_->Verify();
10798 #endif 10800 #endif
10799 } 10801 }
10800 10802
10801 } } // namespace v8::internal 10803 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698