| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap"); | 473 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap"); |
| 474 if (Contains(GENERIC)) printer.Add("Generic"); | 474 if (Contains(GENERIC)) printer.Add("Generic"); |
| 475 stream->Add(")"); | 475 stream->Add(")"); |
| 476 } | 476 } |
| 477 | 477 |
| 478 | 478 |
| 479 Handle<Type> CompareNilICStub::GetType( | 479 Handle<Type> CompareNilICStub::GetType( |
| 480 Isolate* isolate, | 480 Isolate* isolate, |
| 481 Handle<Map> map) { | 481 Handle<Map> map) { |
| 482 if (state_.Contains(CompareNilICStub::GENERIC)) { | 482 if (state_.Contains(CompareNilICStub::GENERIC)) { |
| 483 return handle(Type::Any(), isolate); | 483 return Type::Any(isolate); |
| 484 } | 484 } |
| 485 | 485 |
| 486 Handle<Type> result(Type::None(), isolate); | 486 Handle<Type> result = Type::None(isolate); |
| 487 if (state_.Contains(CompareNilICStub::UNDEFINED)) { | 487 if (state_.Contains(CompareNilICStub::UNDEFINED)) { |
| 488 result = handle(Type::Union(result, handle(Type::Undefined(), isolate)), | 488 result = Type::Union(result, Type::Undefined(isolate), isolate); |
| 489 isolate); | |
| 490 } | 489 } |
| 491 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { | 490 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { |
| 492 result = handle(Type::Union(result, handle(Type::Null(), isolate)), | 491 result = Type::Union(result, Type::Null(isolate), isolate); |
| 493 isolate); | |
| 494 } | 492 } |
| 495 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { | 493 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { |
| 496 Type* type = map.is_null() ? Type::Detectable() : Type::Class(map); | 494 Handle<Type> type = map.is_null() |
| 497 result = handle(Type::Union(result, handle(type, isolate)), isolate); | 495 ? Type::Detectable(isolate) : Type::Class(map, isolate); |
| 496 result = Type::Union(result, type, isolate); |
| 498 } | 497 } |
| 499 | 498 |
| 500 return result; | 499 return result; |
| 501 } | 500 } |
| 502 | 501 |
| 503 | 502 |
| 504 Handle<Type> CompareNilICStub::GetInputType( | 503 Handle<Type> CompareNilICStub::GetInputType( |
| 505 Isolate* isolate, | 504 Isolate* isolate, |
| 506 Handle<Map> map) { | 505 Handle<Map> map) { |
| 507 Handle<Type> output_type = GetType(isolate, map); | 506 Handle<Type> output_type = GetType(isolate, map); |
| 508 Handle<Type> nil_type = handle(nil_value_ == kNullValue | 507 Handle<Type> nil_type = nil_value_ == kNullValue |
| 509 ? Type::Null() : Type::Undefined(), isolate); | 508 ? Type::Null(isolate) : Type::Undefined(isolate); |
| 510 return handle(Type::Union(output_type, nil_type), isolate); | 509 return Type::Union(output_type, nil_type, isolate); |
| 511 } | 510 } |
| 512 | 511 |
| 513 | 512 |
| 514 void InstanceofStub::PrintName(StringStream* stream) { | 513 void InstanceofStub::PrintName(StringStream* stream) { |
| 515 const char* args = ""; | 514 const char* args = ""; |
| 516 if (HasArgsInRegisters()) { | 515 if (HasArgsInRegisters()) { |
| 517 args = "_REGS"; | 516 args = "_REGS"; |
| 518 } | 517 } |
| 519 | 518 |
| 520 const char* inline_check = ""; | 519 const char* inline_check = ""; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 case READ_ELEMENT: stream->Add("ReadElement"); break; | 588 case READ_ELEMENT: stream->Add("ReadElement"); break; |
| 590 case NEW_NON_STRICT_FAST: stream->Add("NewNonStrictFast"); break; | 589 case NEW_NON_STRICT_FAST: stream->Add("NewNonStrictFast"); break; |
| 591 case NEW_NON_STRICT_SLOW: stream->Add("NewNonStrictSlow"); break; | 590 case NEW_NON_STRICT_SLOW: stream->Add("NewNonStrictSlow"); break; |
| 592 case NEW_STRICT: stream->Add("NewStrict"); break; | 591 case NEW_STRICT: stream->Add("NewStrict"); break; |
| 593 } | 592 } |
| 594 } | 593 } |
| 595 | 594 |
| 596 | 595 |
| 597 void CallFunctionStub::PrintName(StringStream* stream) { | 596 void CallFunctionStub::PrintName(StringStream* stream) { |
| 598 stream->Add("CallFunctionStub_Args%d", argc_); | 597 stream->Add("CallFunctionStub_Args%d", argc_); |
| 599 if (ReceiverMightBeImplicit()) stream->Add("_Implicit"); | |
| 600 if (RecordCallTarget()) stream->Add("_Recording"); | 598 if (RecordCallTarget()) stream->Add("_Recording"); |
| 601 } | 599 } |
| 602 | 600 |
| 603 | 601 |
| 604 void CallConstructStub::PrintName(StringStream* stream) { | 602 void CallConstructStub::PrintName(StringStream* stream) { |
| 605 stream->Add("CallConstructStub"); | 603 stream->Add("CallConstructStub"); |
| 606 if (RecordCallTarget()) stream->Add("_Recording"); | 604 if (RecordCallTarget()) stream->Add("_Recording"); |
| 607 } | 605 } |
| 608 | 606 |
| 609 | 607 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 762 |
| 765 | 763 |
| 766 // static | 764 // static |
| 767 void BinaryOpICStub::InstallDescriptors(Isolate* isolate) { | 765 void BinaryOpICStub::InstallDescriptors(Isolate* isolate) { |
| 768 BinaryOpICStub stub(Token::ADD, NO_OVERWRITE); | 766 BinaryOpICStub stub(Token::ADD, NO_OVERWRITE); |
| 769 InstallDescriptor(isolate, &stub); | 767 InstallDescriptor(isolate, &stub); |
| 770 } | 768 } |
| 771 | 769 |
| 772 | 770 |
| 773 // static | 771 // static |
| 772 void BinaryOpWithAllocationSiteStub::InstallDescriptors(Isolate* isolate) { |
| 773 BinaryOpWithAllocationSiteStub stub(Token::ADD, NO_OVERWRITE); |
| 774 InstallDescriptor(isolate, &stub); |
| 775 } |
| 776 |
| 777 |
| 778 // static |
| 774 void NewStringAddStub::InstallDescriptors(Isolate* isolate) { | 779 void NewStringAddStub::InstallDescriptors(Isolate* isolate) { |
| 775 NewStringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED); | 780 NewStringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED); |
| 776 InstallDescriptor(isolate, &stub); | 781 InstallDescriptor(isolate, &stub); |
| 777 } | 782 } |
| 778 | 783 |
| 779 | 784 |
| 780 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 785 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
| 781 : argument_count_(ANY) { | 786 : argument_count_(ANY) { |
| 782 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 787 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 783 } | 788 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 807 InstallDescriptor(isolate, &stub3); | 812 InstallDescriptor(isolate, &stub3); |
| 808 } | 813 } |
| 809 | 814 |
| 810 InternalArrayConstructorStub::InternalArrayConstructorStub( | 815 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 811 Isolate* isolate) { | 816 Isolate* isolate) { |
| 812 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 817 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 813 } | 818 } |
| 814 | 819 |
| 815 | 820 |
| 816 } } // namespace v8::internal | 821 } } // namespace v8::internal |
| OLD | NEW |