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

Side by Side Diff: src/ic.cc

Issue 3140: Use null instead of undefined for deleted elements in code caches.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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 | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // invalid stub again. 157 // invalid stub again.
158 map->RemoveFromCodeCache(index); 158 map->RemoveFromCodeCache(index);
159 159
160 return MONOMORPHIC_PROTOTYPE_FAILURE; 160 return MONOMORPHIC_PROTOTYPE_FAILURE;
161 } 161 }
162 162
163 // The builtins object is special. It only changes when JavaScript 163 // The builtins object is special. It only changes when JavaScript
164 // builtins are loaded lazily. It is important to keep inline 164 // builtins are loaded lazily. It is important to keep inline
165 // caches for the builtins object monomorphic. Therefore, if we get 165 // caches for the builtins object monomorphic. Therefore, if we get
166 // an inline cache miss for the builtins object after lazily loading 166 // an inline cache miss for the builtins object after lazily loading
167 // JavaScript builtins, we clear the code cache and return 167 // JavaScript builtins, we return uninitialized as the state to
168 // uninitialized as the state to force the inline cache back to 168 // force the inline cache back to monomorphic state.
169 // monomorphic state.
170 if (receiver->IsJSBuiltinsObject()) { 169 if (receiver->IsJSBuiltinsObject()) {
171 map->ClearCodeCache();
172 return UNINITIALIZED; 170 return UNINITIALIZED;
173 } 171 }
174 172
175 return MONOMORPHIC; 173 return MONOMORPHIC;
176 } 174 }
177 175
178 176
179 RelocMode IC::ComputeMode() { 177 RelocMode IC::ComputeMode() {
180 Address addr = address(); 178 Address addr = address();
181 Code* code = Code::cast(Heap::FindCodeObject(addr)); 179 Code* code = Code::cast(Heap::FindCodeObject(addr));
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 #undef ADDR 1153 #undef ADDR
1156 }; 1154 };
1157 1155
1158 1156
1159 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1157 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1160 return IC_utilities[id]; 1158 return IC_utilities[id];
1161 } 1159 }
1162 1160
1163 1161
1164 } } // namespace v8::internal 1162 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698