| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 370     if (raw_map != NULL && !CanRetainOtherContext(raw_map, *native_context_)) { | 370     if (raw_map != NULL && !CanRetainOtherContext(raw_map, *native_context_)) { | 
| 371       map = handle(raw_map, isolate_); | 371       map = handle(raw_map, isolate_); | 
| 372     } | 372     } | 
| 373   } | 373   } | 
| 374 | 374 | 
| 375   if (code->is_compare_ic_stub()) { | 375   if (code->is_compare_ic_stub()) { | 
| 376     int stub_minor_key = code->stub_info(); | 376     int stub_minor_key = code->stub_info(); | 
| 377     CompareIC::StubInfoToType( | 377     CompareIC::StubInfoToType( | 
| 378         stub_minor_key, left_type, right_type, combined_type, map, isolate()); | 378         stub_minor_key, left_type, right_type, combined_type, map, isolate()); | 
| 379   } else if (code->is_compare_nil_ic_stub()) { | 379   } else if (code->is_compare_nil_ic_stub()) { | 
| 380     CompareNilICStub::State state(code->compare_nil_state()); | 380     CompareNilICStub stub(code->extended_extra_ic_state()); | 
| 381     *combined_type = CompareNilICStub::StateToType(isolate_, state, map); | 381     *combined_type = stub.GetType(isolate_, map); | 
| 382     Handle<Type> nil_type = handle(code->compare_nil_value() == kNullValue | 382     *left_type = *right_type = stub.GetInputType(isolate_, map); | 
| 383         ? Type::Null() : Type::Undefined(), isolate_); |  | 
| 384     *left_type = *right_type = |  | 
| 385         handle(Type::Union(*combined_type, nil_type), isolate_); |  | 
| 386   } | 383   } | 
| 387 } | 384 } | 
| 388 | 385 | 
| 389 | 386 | 
| 390 Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) { | 387 Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) { | 
| 391   Handle<Object> object = GetInfo(id); | 388   Handle<Object> object = GetInfo(id); | 
| 392   if (!object->IsCode()) { | 389   if (!object->IsCode()) { | 
| 393     return handle(Type::None(), isolate()); | 390     return handle(Type::None(), isolate()); | 
| 394   } | 391   } | 
| 395   Handle<Code> code = Handle<Code>::cast(object); | 392   Handle<Code> code = Handle<Code>::cast(object); | 
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 715   // TODO(verwaest): Return Smi rather than Integer32. | 712   // TODO(verwaest): Return Smi rather than Integer32. | 
| 716   if (info.IsSmi()) return Representation::Integer32(); | 713   if (info.IsSmi()) return Representation::Integer32(); | 
| 717   if (info.IsInteger32()) return Representation::Integer32(); | 714   if (info.IsInteger32()) return Representation::Integer32(); | 
| 718   if (info.IsDouble()) return Representation::Double(); | 715   if (info.IsDouble()) return Representation::Double(); | 
| 719   if (info.IsNumber()) return Representation::Double(); | 716   if (info.IsNumber()) return Representation::Double(); | 
| 720   return Representation::Tagged(); | 717   return Representation::Tagged(); | 
| 721 } | 718 } | 
| 722 | 719 | 
| 723 | 720 | 
| 724 } }  // namespace v8::internal | 721 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|