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

Side by Side Diff: src/ic.h

Issue 12040042: Merged r13480, r13481 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 11 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 | « no previous file | src/ic.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Clear the inline cache to initial state. 103 // Clear the inline cache to initial state.
104 static void Clear(Address address); 104 static void Clear(Address address);
105 105
106 // Computes the reloc info for this IC. This is a fairly expensive 106 // Computes the reloc info for this IC. This is a fairly expensive
107 // operation as it has to search through the heap to find the code 107 // operation as it has to search through the heap to find the code
108 // object that contains this IC site. 108 // object that contains this IC site.
109 RelocInfo::Mode ComputeMode(); 109 RelocInfo::Mode ComputeMode();
110 110
111 // Returns if this IC is for contextual (no explicit receiver) 111 // Returns if this IC is for contextual (no explicit receiver)
112 // access to properties. 112 // access to properties.
113 bool IsContextual(Handle<Object> receiver) { 113 bool IsUndeclaredGlobal(Handle<Object> receiver) {
114 if (receiver->IsGlobalObject()) { 114 if (receiver->IsGlobalObject()) {
115 return SlowIsContextual(); 115 return SlowIsUndeclaredGlobal();
116 } else { 116 } else {
117 ASSERT(!SlowIsContextual()); 117 ASSERT(!SlowIsUndeclaredGlobal());
118 return false; 118 return false;
119 } 119 }
120 } 120 }
121 121
122 bool SlowIsContextual() { 122 bool SlowIsUndeclaredGlobal() {
123 return ComputeMode() == RelocInfo::CODE_TARGET_CONTEXT; 123 return ComputeMode() == RelocInfo::CODE_TARGET_CONTEXT;
124 } 124 }
125 125
126 // Determines which map must be used for keeping the code stub. 126 // Determines which map must be used for keeping the code stub.
127 // These methods should not be called with undefined or null. 127 // These methods should not be called with undefined or null.
128 static inline InlineCacheHolderFlag GetCodeCacheForObject(Object* object, 128 static inline InlineCacheHolderFlag GetCodeCacheForObject(Object* object,
129 JSObject* holder); 129 JSObject* holder);
130 static inline InlineCacheHolderFlag GetCodeCacheForObject(JSObject* object, 130 static inline InlineCacheHolderFlag GetCodeCacheForObject(JSObject* object,
131 JSObject* holder); 131 JSObject* holder);
132 static inline JSObject* GetCodeCacheHolder(Object* object, 132 static inline JSObject* GetCodeCacheHolder(Object* object,
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 884
885 // Helper for BinaryOpIC and CompareIC. 885 // Helper for BinaryOpIC and CompareIC.
886 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 886 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
887 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 887 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
888 888
889 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss); 889 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_Miss);
890 890
891 } } // namespace v8::internal 891 } } // namespace v8::internal
892 892
893 #endif // V8_IC_H_ 893 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « no previous file | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698