| 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 Type::Any(isolate); | 483 return handle(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 = Type::Union(result, Type::Undefined(isolate), isolate); | 488 result = handle(Type::Union(result, handle(Type::Undefined(), isolate)), |
| 489 isolate); |
| 489 } | 490 } |
| 490 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { | 491 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { |
| 491 result = Type::Union(result, Type::Null(isolate), isolate); | 492 result = handle(Type::Union(result, handle(Type::Null(), isolate)), |
| 493 isolate); |
| 492 } | 494 } |
| 493 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { | 495 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { |
| 494 Handle<Type> type = map.is_null() | 496 Type* type = map.is_null() ? Type::Detectable() : Type::Class(map); |
| 495 ? Type::Detectable(isolate) : Type::Class(map, isolate); | 497 result = handle(Type::Union(result, handle(type, isolate)), isolate); |
| 496 result = Type::Union(result, type, isolate); | |
| 497 } | 498 } |
| 498 | 499 |
| 499 return result; | 500 return result; |
| 500 } | 501 } |
| 501 | 502 |
| 502 | 503 |
| 503 Handle<Type> CompareNilICStub::GetInputType( | 504 Handle<Type> CompareNilICStub::GetInputType( |
| 504 Isolate* isolate, | 505 Isolate* isolate, |
| 505 Handle<Map> map) { | 506 Handle<Map> map) { |
| 506 Handle<Type> output_type = GetType(isolate, map); | 507 Handle<Type> output_type = GetType(isolate, map); |
| 507 Handle<Type> nil_type = nil_value_ == kNullValue | 508 Handle<Type> nil_type = handle(nil_value_ == kNullValue |
| 508 ? Type::Null(isolate) : Type::Undefined(isolate); | 509 ? Type::Null() : Type::Undefined(), isolate); |
| 509 return Type::Union(output_type, nil_type, isolate); | 510 return handle(Type::Union(output_type, nil_type), isolate); |
| 510 } | 511 } |
| 511 | 512 |
| 512 | 513 |
| 513 void InstanceofStub::PrintName(StringStream* stream) { | 514 void InstanceofStub::PrintName(StringStream* stream) { |
| 514 const char* args = ""; | 515 const char* args = ""; |
| 515 if (HasArgsInRegisters()) { | 516 if (HasArgsInRegisters()) { |
| 516 args = "_REGS"; | 517 args = "_REGS"; |
| 517 } | 518 } |
| 518 | 519 |
| 519 const char* inline_check = ""; | 520 const char* inline_check = ""; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 InstallDescriptor(isolate, &stub3); | 814 InstallDescriptor(isolate, &stub3); |
| 814 } | 815 } |
| 815 | 816 |
| 816 InternalArrayConstructorStub::InternalArrayConstructorStub( | 817 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 817 Isolate* isolate) { | 818 Isolate* isolate) { |
| 818 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 819 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 819 } | 820 } |
| 820 | 821 |
| 821 | 822 |
| 822 } } // namespace v8::internal | 823 } } // namespace v8::internal |
| OLD | NEW |