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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 static_cast<OverwriteMode>(mode)); | 222 static_cast<OverwriteMode>(mode)); |
223 stub.GetCode(isolate); | 223 stub.GetCode(isolate); |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 // Generate special versions of the stub. | 227 // Generate special versions of the stub. |
228 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime); | 228 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime); |
229 } | 229 } |
230 | 230 |
231 | 231 |
| 232 void CallICStub::GenerateAheadOfTime(Isolate* isolate) { |
| 233 // Generate the uninitialized versions of the stub. |
| 234 for (int arg_count = 0; arg_count < 4; arg_count++) { |
| 235 CallICStub stub(CallIC::State::DefaultCallState(arg_count, CallIC::METHOD)); |
| 236 stub.GetCode(isolate); |
| 237 CallICStub stub2(CallIC::State::DefaultCallState(arg_count, |
| 238 CallIC::FUNCTION)); |
| 239 stub2.GetCode(isolate); |
| 240 } |
| 241 } |
| 242 |
| 243 |
232 void BinaryOpICStub::PrintState(StringStream* stream) { | 244 void BinaryOpICStub::PrintState(StringStream* stream) { |
233 state_.Print(stream); | 245 state_.Print(stream); |
234 } | 246 } |
235 | 247 |
236 | 248 |
237 // static | 249 // static |
238 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate, | 250 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate, |
239 const BinaryOpIC::State& state) { | 251 const BinaryOpIC::State& state) { |
240 BinaryOpICStub stub(state); | 252 BinaryOpICStub stub(state); |
241 stub.GetCode(isolate); | 253 stub.GetCode(isolate); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 506 |
495 | 507 |
496 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) { | 508 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) { |
497 Type* output_type = GetType(zone, map); | 509 Type* output_type = GetType(zone, map); |
498 Type* nil_type = | 510 Type* nil_type = |
499 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone); | 511 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone); |
500 return Type::Union(output_type, nil_type, zone); | 512 return Type::Union(output_type, nil_type, zone); |
501 } | 513 } |
502 | 514 |
503 | 515 |
| 516 void CallICStub::PrintState(StringStream* stream) { |
| 517 state_.Print(stream); |
| 518 } |
| 519 |
| 520 |
504 void InstanceofStub::PrintName(StringStream* stream) { | 521 void InstanceofStub::PrintName(StringStream* stream) { |
505 const char* args = ""; | 522 const char* args = ""; |
506 if (HasArgsInRegisters()) { | 523 if (HasArgsInRegisters()) { |
507 args = "_REGS"; | 524 args = "_REGS"; |
508 } | 525 } |
509 | 526 |
510 const char* inline_check = ""; | 527 const char* inline_check = ""; |
511 if (HasCallSiteInlineCheck()) { | 528 if (HasCallSiteInlineCheck()) { |
512 inline_check = "_INLINE"; | 529 inline_check = "_INLINE"; |
513 } | 530 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 case READ_ELEMENT: stream->Add("ReadElement"); break; | 593 case READ_ELEMENT: stream->Add("ReadElement"); break; |
577 case NEW_SLOPPY_FAST: stream->Add("NewSloppyFast"); break; | 594 case NEW_SLOPPY_FAST: stream->Add("NewSloppyFast"); break; |
578 case NEW_SLOPPY_SLOW: stream->Add("NewSloppySlow"); break; | 595 case NEW_SLOPPY_SLOW: stream->Add("NewSloppySlow"); break; |
579 case NEW_STRICT: stream->Add("NewStrict"); break; | 596 case NEW_STRICT: stream->Add("NewStrict"); break; |
580 } | 597 } |
581 } | 598 } |
582 | 599 |
583 | 600 |
584 void CallFunctionStub::PrintName(StringStream* stream) { | 601 void CallFunctionStub::PrintName(StringStream* stream) { |
585 stream->Add("CallFunctionStub_Args%d", argc_); | 602 stream->Add("CallFunctionStub_Args%d", argc_); |
586 if (RecordCallTarget()) stream->Add("_Recording"); | |
587 } | 603 } |
588 | 604 |
589 | 605 |
590 void CallConstructStub::PrintName(StringStream* stream) { | 606 void CallConstructStub::PrintName(StringStream* stream) { |
591 stream->Add("CallConstructStub"); | 607 stream->Add("CallConstructStub"); |
592 if (RecordCallTarget()) stream->Add("_Recording"); | 608 if (RecordCallTarget()) stream->Add("_Recording"); |
593 } | 609 } |
594 | 610 |
595 | 611 |
596 void ArrayConstructorStub::PrintName(StringStream* stream) { | 612 void ArrayConstructorStub::PrintName(StringStream* stream) { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 InstallDescriptor(isolate, &stub3); | 831 InstallDescriptor(isolate, &stub3); |
816 } | 832 } |
817 | 833 |
818 InternalArrayConstructorStub::InternalArrayConstructorStub( | 834 InternalArrayConstructorStub::InternalArrayConstructorStub( |
819 Isolate* isolate) { | 835 Isolate* isolate) { |
820 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 836 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
821 } | 837 } |
822 | 838 |
823 | 839 |
824 } } // namespace v8::internal | 840 } } // namespace v8::internal |
OLD | NEW |