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

Side by Side Diff: src/type-info.cc

Issue 12226090: Order arguments of ComputeMonomorphicFlags to match ComputeFlags. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/stub-cache.cc ('k') | no next file » | 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 : Handle<Map>(first_map); 210 : Handle<Map>(first_map);
211 } 211 }
212 return Handle<Map>::cast(map_or_code); 212 return Handle<Map>::cast(map_or_code);
213 } 213 }
214 214
215 215
216 void TypeFeedbackOracle::LoadReceiverTypes(Property* expr, 216 void TypeFeedbackOracle::LoadReceiverTypes(Property* expr,
217 Handle<String> name, 217 Handle<String> name,
218 SmallMapList* types) { 218 SmallMapList* types) {
219 Code::Flags flags = 219 Code::Flags flags =
220 Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NORMAL); 220 Code::ComputeMonomorphicFlags(Code::LOAD_IC, Code::NORMAL);
Jakob Kummerow 2013/02/11 14:47:28 Missed one here.
221 CollectReceiverTypes(expr->PropertyFeedbackId(), name, flags, types); 221 CollectReceiverTypes(expr->PropertyFeedbackId(), name, flags, types);
222 } 222 }
223 223
224 224
225 void TypeFeedbackOracle::StoreReceiverTypes(Assignment* expr, 225 void TypeFeedbackOracle::StoreReceiverTypes(Assignment* expr,
226 Handle<String> name, 226 Handle<String> name,
227 SmallMapList* types) { 227 SmallMapList* types) {
228 Code::Flags flags = 228 Code::Flags flags =
229 Code::ComputeMonomorphicFlags(Code::STORE_IC, Code::NORMAL); 229 Code::ComputeMonomorphicFlags(Code::STORE_IC, Code::NORMAL);
Jakob Kummerow 2013/02/11 14:47:28 And another one.
230 CollectReceiverTypes(expr->AssignmentFeedbackId(), name, flags, types); 230 CollectReceiverTypes(expr->AssignmentFeedbackId(), name, flags, types);
231 } 231 }
232 232
233 233
234 void TypeFeedbackOracle::CallReceiverTypes(Call* expr, 234 void TypeFeedbackOracle::CallReceiverTypes(Call* expr,
235 Handle<String> name, 235 Handle<String> name,
236 CallKind call_kind, 236 CallKind call_kind,
237 SmallMapList* types) { 237 SmallMapList* types) {
238 int arity = expr->arguments()->length(); 238 int arity = expr->arguments()->length();
239 239
240 // Note: Currently we do not take string extra ic data into account 240 // Note: Currently we do not take string extra ic data into account
241 // here. 241 // here.
242 Code::ExtraICState extra_ic_state = 242 Code::ExtraICState extra_ic_state =
243 CallIC::Contextual::encode(call_kind == CALL_AS_FUNCTION); 243 CallIC::Contextual::encode(call_kind == CALL_AS_FUNCTION);
244 244
245 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC, 245 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::CALL_IC,
246 extra_ic_state,
246 Code::NORMAL, 247 Code::NORMAL,
247 extra_ic_state, 248 arity,
248 OWN_MAP, 249 OWN_MAP);
249 arity);
250 CollectReceiverTypes(expr->CallFeedbackId(), name, flags, types); 250 CollectReceiverTypes(expr->CallFeedbackId(), name, flags, types);
251 } 251 }
252 252
253 253
254 CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) { 254 CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) {
255 Handle<Object> value = GetInfo(expr->CallFeedbackId()); 255 Handle<Object> value = GetInfo(expr->CallFeedbackId());
256 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; 256 if (!value->IsSmi()) return RECEIVER_MAP_CHECK;
257 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); 257 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value());
258 ASSERT(check != RECEIVER_MAP_CHECK); 258 ASSERT(check != RECEIVER_MAP_CHECK);
259 return check; 259 return check;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 USE(maybe_result); 712 USE(maybe_result);
713 #ifdef DEBUG 713 #ifdef DEBUG
714 Object* result = NULL; 714 Object* result = NULL;
715 // Dictionary has been allocated with sufficient size for all elements. 715 // Dictionary has been allocated with sufficient size for all elements.
716 ASSERT(maybe_result->ToObject(&result)); 716 ASSERT(maybe_result->ToObject(&result));
717 ASSERT(*dictionary_ == result); 717 ASSERT(*dictionary_ == result);
718 #endif 718 #endif
719 } 719 }
720 720
721 } } // namespace v8::internal 721 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698