| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 | 329 |
| 330 | 330 |
| 331 ZoneMapList* TypeFeedbackOracle::CollectReceiverTypes(int position, | 331 ZoneMapList* TypeFeedbackOracle::CollectReceiverTypes(int position, |
| 332 Handle<String> name, | 332 Handle<String> name, |
| 333 Code::Flags flags) { | 333 Code::Flags flags) { |
| 334 Isolate* isolate = Isolate::Current(); | 334 Isolate* isolate = Isolate::Current(); |
| 335 Handle<Object> object = GetInfo(position); | 335 Handle<Object> object = GetInfo(position); |
| 336 if (object->IsUndefined() || object->IsSmi()) return NULL; | 336 if (object->IsUndefined() || object->IsSmi()) return NULL; |
| 337 | 337 |
| 338 if (*object == isolate->builtins()->builtin(Builtins::StoreIC_GlobalProxy)) { | 338 if (*object == isolate->builtins()->builtin(Builtins::kStoreIC_GlobalProxy)) { |
| 339 // TODO(fschneider): We could collect the maps and signal that | 339 // TODO(fschneider): We could collect the maps and signal that |
| 340 // we need a generic store (or load) here. | 340 // we need a generic store (or load) here. |
| 341 ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC); | 341 ASSERT(Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC); |
| 342 return NULL; | 342 return NULL; |
| 343 } else if (object->IsMap()) { | 343 } else if (object->IsMap()) { |
| 344 ZoneMapList* types = new ZoneMapList(1); | 344 ZoneMapList* types = new ZoneMapList(1); |
| 345 types->Add(Handle<Map>::cast(object)); | 345 types->Add(Handle<Map>::cast(object)); |
| 346 return types; | 346 return types; |
| 347 } else if (Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { | 347 } else if (Handle<Code>::cast(object)->ic_state() == MEGAMORPHIC) { |
| 348 ZoneMapList* types = new ZoneMapList(4); | 348 ZoneMapList* types = new ZoneMapList(4); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 source_positions->Add(position); | 458 source_positions->Add(position); |
| 459 } | 459 } |
| 460 } else { | 460 } else { |
| 461 ASSERT(RelocInfo::IsPosition(mode)); | 461 ASSERT(RelocInfo::IsPosition(mode)); |
| 462 position = static_cast<int>(info->data()); | 462 position = static_cast<int>(info->data()); |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 | 466 |
| 467 } } // namespace v8::internal | 467 } } // namespace v8::internal |
| OLD | NEW |