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

Side by Side Diff: src/isolate.cc

Issue 170253002: Revert r19409: "Allow ICs to be generated for own global proxy." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/ic.cc ('k') | src/objects-inl.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 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 native_context->security_token()) 771 native_context->security_token())
772 return YES; 772 return YES;
773 } 773 }
774 774
775 return UNKNOWN; 775 return UNKNOWN;
776 } 776 }
777 777
778 778
779 bool Isolate::MayNamedAccess(JSObject* receiver, Object* key, 779 bool Isolate::MayNamedAccess(JSObject* receiver, Object* key,
780 v8::AccessType type) { 780 v8::AccessType type) {
781 ASSERT(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); 781 ASSERT(receiver->IsAccessCheckNeeded());
782 782
783 // The callers of this method are not expecting a GC. 783 // The callers of this method are not expecting a GC.
784 DisallowHeapAllocation no_gc; 784 DisallowHeapAllocation no_gc;
785 785
786 // Skip checks for hidden properties access. Note, we do not 786 // Skip checks for hidden properties access. Note, we do not
787 // require existence of a context in this case. 787 // require existence of a context in this case.
788 if (key == heap_.hidden_string()) return true; 788 if (key == heap_.hidden_string()) return true;
789 789
790 // Check for compatibility between the security tokens in the 790 // Check for compatibility between the security tokens in the
791 // current lexical context and the accessed object. 791 // current lexical context and the accessed object.
(...skipping 30 matching lines...) Expand all
822 type, 822 type,
823 v8::Utils::ToLocal(data)); 823 v8::Utils::ToLocal(data));
824 } 824 }
825 return result; 825 return result;
826 } 826 }
827 827
828 828
829 bool Isolate::MayIndexedAccess(JSObject* receiver, 829 bool Isolate::MayIndexedAccess(JSObject* receiver,
830 uint32_t index, 830 uint32_t index,
831 v8::AccessType type) { 831 v8::AccessType type) {
832 ASSERT(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); 832 ASSERT(receiver->IsAccessCheckNeeded());
833 // Check for compatibility between the security tokens in the 833 // Check for compatibility between the security tokens in the
834 // current lexical context and the accessed object. 834 // current lexical context and the accessed object.
835 ASSERT(context()); 835 ASSERT(context());
836 836
837 MayAccessDecision decision = MayAccessPreCheck(this, receiver, type); 837 MayAccessDecision decision = MayAccessPreCheck(this, receiver, type);
838 if (decision != UNKNOWN) return decision == YES; 838 if (decision != UNKNOWN) return decision == YES;
839 839
840 // Get indexed access check callback 840 // Get indexed access check callback
841 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); 841 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
842 if (!constructor->shared()->IsApiFunction()) return false; 842 if (!constructor->shared()->IsApiFunction()) return false;
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 2319
2320 #ifdef DEBUG 2320 #ifdef DEBUG
2321 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2321 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2322 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2322 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2323 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2323 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2324 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2324 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2325 #undef ISOLATE_FIELD_OFFSET 2325 #undef ISOLATE_FIELD_OFFSET
2326 #endif 2326 #endif
2327 2327
2328 } } // namespace v8::internal 2328 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698