| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 CompareIC::State state = ICCompareStub::CompareState(code->stub_info()); | 415 CompareIC::State state = ICCompareStub::CompareState(code->stub_info()); |
| 416 result = CompareIC::StateToType(isolate_, state); | 416 result = CompareIC::StateToType(isolate_, state); |
| 417 } | 417 } |
| 418 return result; | 418 return result; |
| 419 } | 419 } |
| 420 | 420 |
| 421 | 421 |
| 422 Handle<Type> TypeFeedbackOracle::IncrementType(CountOperation* expr) { | 422 Handle<Type> TypeFeedbackOracle::IncrementType(CountOperation* expr) { |
| 423 Handle<Object> object = GetInfo(expr->CountBinOpFeedbackId()); | 423 Handle<Object> object = GetInfo(expr->CountBinOpFeedbackId()); |
| 424 Handle<Type> unknown(Type::None(), isolate_); | 424 Handle<Type> unknown(Type::None(), isolate_); |
| 425 ASSERT(object->IsCode()); | |
| 426 if (!object->IsCode()) return unknown; | 425 if (!object->IsCode()) return unknown; |
| 427 Handle<Code> code = Handle<Code>::cast(object); | 426 Handle<Code> code = Handle<Code>::cast(object); |
| 428 if (!code->is_binary_op_stub()) return unknown; | 427 if (!code->is_binary_op_stub()) return unknown; |
| 429 | 428 |
| 430 BinaryOpStub stub(code->extended_extra_ic_state()); | 429 BinaryOpStub stub(code->extended_extra_ic_state()); |
| 431 return stub.GetLeftType(isolate()); | 430 return stub.GetLeftType(isolate()); |
| 432 } | 431 } |
| 433 | 432 |
| 434 | 433 |
| 435 void TypeFeedbackOracle::CollectPolymorphicMaps(Handle<Code> code, | 434 void TypeFeedbackOracle::CollectPolymorphicMaps(Handle<Code> code, |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 if (info.IsUninitialized()) return Representation::None(); | 680 if (info.IsUninitialized()) return Representation::None(); |
| 682 if (info.IsSmi()) return Representation::Smi(); | 681 if (info.IsSmi()) return Representation::Smi(); |
| 683 if (info.IsInteger32()) return Representation::Integer32(); | 682 if (info.IsInteger32()) return Representation::Integer32(); |
| 684 if (info.IsDouble()) return Representation::Double(); | 683 if (info.IsDouble()) return Representation::Double(); |
| 685 if (info.IsNumber()) return Representation::Double(); | 684 if (info.IsNumber()) return Representation::Double(); |
| 686 return Representation::Tagged(); | 685 return Representation::Tagged(); |
| 687 } | 686 } |
| 688 | 687 |
| 689 | 688 |
| 690 } } // namespace v8::internal | 689 } } // namespace v8::internal |
| OLD | NEW |