| OLD | NEW |
| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()); | 171 return KeyedStoreIC::GetKeyedAccessStoreMode(code->extra_ic_state()); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 return STANDARD_STORE; | 174 return STANDARD_STORE; |
| 175 } | 175 } |
| 176 | 176 |
| 177 | 177 |
| 178 void TypeFeedbackOracle::CallReceiverTypes(TypeFeedbackId id, | 178 void TypeFeedbackOracle::CallReceiverTypes(TypeFeedbackId id, |
| 179 Handle<String> name, | 179 Handle<String> name, |
| 180 int arity, | 180 int arity, |
| 181 ContextualMode contextual_mode, | |
| 182 SmallMapList* types) { | 181 SmallMapList* types) { |
| 183 // Note: Currently we do not take string extra ic data into account | 182 // Note: Currently we do not take string extra ic data into account |
| 184 // here. | 183 // here. |
| 185 ExtraICState extra_ic_state = | |
| 186 CallIC::Contextual::encode(contextual_mode); | |
| 187 Code::Flags flags = Code::ComputeMonomorphicFlags( | 184 Code::Flags flags = Code::ComputeMonomorphicFlags( |
| 188 Code::CALL_IC, extra_ic_state, OWN_MAP, Code::NORMAL, arity); | 185 Code::CALL_IC, kNoExtraICState, OWN_MAP, Code::NORMAL, arity); |
| 189 CollectReceiverTypes(id, name, flags, types); | 186 CollectReceiverTypes(id, name, flags, types); |
| 190 } | 187 } |
| 191 | 188 |
| 192 | 189 |
| 193 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) { | 190 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) { |
| 194 Handle<Object> value = GetInfo(id); | 191 Handle<Object> value = GetInfo(id); |
| 195 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; | 192 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; |
| 196 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); | 193 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); |
| 197 ASSERT(check != RECEIVER_MAP_CHECK); | 194 ASSERT(check != RECEIVER_MAP_CHECK); |
| 198 return check; | 195 return check; |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 #ifdef DEBUG | 568 #ifdef DEBUG |
| 572 Object* result = NULL; | 569 Object* result = NULL; |
| 573 // Dictionary has been allocated with sufficient size for all elements. | 570 // Dictionary has been allocated with sufficient size for all elements. |
| 574 ASSERT(maybe_result->ToObject(&result)); | 571 ASSERT(maybe_result->ToObject(&result)); |
| 575 ASSERT(*dictionary_ == result); | 572 ASSERT(*dictionary_ == result); |
| 576 #endif | 573 #endif |
| 577 } | 574 } |
| 578 | 575 |
| 579 | 576 |
| 580 } } // namespace v8::internal | 577 } } // namespace v8::internal |
| OLD | NEW |