| 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 CallKind call_kind, | 181 ContextualMode contextual_mode, |
| 182 SmallMapList* types) { | 182 SmallMapList* types) { |
| 183 // Note: Currently we do not take string extra ic data into account | 183 // Note: Currently we do not take string extra ic data into account |
| 184 // here. | 184 // here. |
| 185 ContextualMode contextual_mode = call_kind == CALL_AS_FUNCTION | |
| 186 ? CONTEXTUAL | |
| 187 : NOT_CONTEXTUAL; | |
| 188 ExtraICState extra_ic_state = | 185 ExtraICState extra_ic_state = |
| 189 CallIC::Contextual::encode(contextual_mode); | 186 CallIC::Contextual::encode(contextual_mode); |
| 190 | |
| 191 Code::Flags flags = Code::ComputeMonomorphicFlags( | 187 Code::Flags flags = Code::ComputeMonomorphicFlags( |
| 192 Code::CALL_IC, extra_ic_state, OWN_MAP, Code::NORMAL, arity); | 188 Code::CALL_IC, extra_ic_state, OWN_MAP, Code::NORMAL, arity); |
| 193 CollectReceiverTypes(id, name, flags, types); | 189 CollectReceiverTypes(id, name, flags, types); |
| 194 } | 190 } |
| 195 | 191 |
| 196 | 192 |
| 197 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) { | 193 CheckType TypeFeedbackOracle::GetCallCheckType(TypeFeedbackId id) { |
| 198 Handle<Object> value = GetInfo(id); | 194 Handle<Object> value = GetInfo(id); |
| 199 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; | 195 if (!value->IsSmi()) return RECEIVER_MAP_CHECK; |
| 200 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); | 196 CheckType check = static_cast<CheckType>(Smi::cast(*value)->value()); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 #ifdef DEBUG | 571 #ifdef DEBUG |
| 576 Object* result = NULL; | 572 Object* result = NULL; |
| 577 // Dictionary has been allocated with sufficient size for all elements. | 573 // Dictionary has been allocated with sufficient size for all elements. |
| 578 ASSERT(maybe_result->ToObject(&result)); | 574 ASSERT(maybe_result->ToObject(&result)); |
| 579 ASSERT(*dictionary_ == result); | 575 ASSERT(*dictionary_ == result); |
| 580 #endif | 576 #endif |
| 581 } | 577 } |
| 582 | 578 |
| 583 | 579 |
| 584 } } // namespace v8::internal | 580 } } // namespace v8::internal |
| OLD | NEW |