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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 SimpleListPrinter printer(stream); | 447 SimpleListPrinter printer(stream); |
448 if (IsEmpty()) printer.Add("None"); | 448 if (IsEmpty()) printer.Add("None"); |
449 if (Contains(UNDEFINED)) printer.Add("Undefined"); | 449 if (Contains(UNDEFINED)) printer.Add("Undefined"); |
450 if (Contains(NULL_TYPE)) printer.Add("Null"); | 450 if (Contains(NULL_TYPE)) printer.Add("Null"); |
451 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap"); | 451 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap"); |
452 if (Contains(GENERIC)) printer.Add("Generic"); | 452 if (Contains(GENERIC)) printer.Add("Generic"); |
453 stream->Add(")"); | 453 stream->Add(")"); |
454 } | 454 } |
455 | 455 |
456 | 456 |
457 Handle<Type> CompareNilICStub::GetType( | 457 Type* CompareNilICStub::GetType(Zone* zone, Handle<Map> map) { |
458 Isolate* isolate, | |
459 Handle<Map> map) { | |
460 if (state_.Contains(CompareNilICStub::GENERIC)) { | 458 if (state_.Contains(CompareNilICStub::GENERIC)) { |
461 return Type::Any(isolate); | 459 return Type::Any(zone); |
462 } | 460 } |
463 | 461 |
464 Handle<Type> result = Type::None(isolate); | 462 Type* result = Type::None(zone); |
465 if (state_.Contains(CompareNilICStub::UNDEFINED)) { | 463 if (state_.Contains(CompareNilICStub::UNDEFINED)) { |
466 result = Type::Union(result, Type::Undefined(isolate), isolate); | 464 result = Type::Union(result, Type::Undefined(zone), zone); |
467 } | 465 } |
468 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { | 466 if (state_.Contains(CompareNilICStub::NULL_TYPE)) { |
469 result = Type::Union(result, Type::Null(isolate), isolate); | 467 result = Type::Union(result, Type::Null(zone), zone); |
470 } | 468 } |
471 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { | 469 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) { |
472 Handle<Type> type = map.is_null() | 470 Type* type = |
473 ? Type::Detectable(isolate) : Type::Class(map, isolate); | 471 map.is_null() ? Type::Detectable(zone) : Type::Class(map, zone); |
474 result = Type::Union(result, type, isolate); | 472 result = Type::Union(result, type, zone); |
475 } | 473 } |
476 | 474 |
477 return result; | 475 return result; |
478 } | 476 } |
479 | 477 |
480 | 478 |
481 Handle<Type> CompareNilICStub::GetInputType( | 479 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) { |
482 Isolate* isolate, | 480 Type* output_type = GetType(zone, map); |
483 Handle<Map> map) { | 481 Type* nil_type = |
484 Handle<Type> output_type = GetType(isolate, map); | 482 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone); |
485 Handle<Type> nil_type = nil_value_ == kNullValue | 483 return Type::Union(output_type, nil_type, zone); |
486 ? Type::Null(isolate) : Type::Undefined(isolate); | |
487 return Type::Union(output_type, nil_type, isolate); | |
488 } | 484 } |
489 | 485 |
490 | 486 |
491 void InstanceofStub::PrintName(StringStream* stream) { | 487 void InstanceofStub::PrintName(StringStream* stream) { |
492 const char* args = ""; | 488 const char* args = ""; |
493 if (HasArgsInRegisters()) { | 489 if (HasArgsInRegisters()) { |
494 args = "_REGS"; | 490 args = "_REGS"; |
495 } | 491 } |
496 | 492 |
497 const char* inline_check = ""; | 493 const char* inline_check = ""; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 InstallDescriptor(isolate, &stub3); | 780 InstallDescriptor(isolate, &stub3); |
785 } | 781 } |
786 | 782 |
787 InternalArrayConstructorStub::InternalArrayConstructorStub( | 783 InternalArrayConstructorStub::InternalArrayConstructorStub( |
788 Isolate* isolate) { | 784 Isolate* isolate) { |
789 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 785 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
790 } | 786 } |
791 | 787 |
792 | 788 |
793 } } // namespace v8::internal | 789 } } // namespace v8::internal |
OLD | NEW |