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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 static_cast<OverwriteMode>(mode)); | 220 static_cast<OverwriteMode>(mode)); |
221 stub.GetCode(isolate); | 221 stub.GetCode(isolate); |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
225 // Generate special versions of the stub. | 225 // Generate special versions of the stub. |
226 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime); | 226 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime); |
227 } | 227 } |
228 | 228 |
229 | 229 |
| 230 void CallICStub::GenerateAheadOfTime(Isolate* isolate) { |
| 231 // Generate the uninitialized versions of the stub. |
| 232 for (int arg_count = 0; arg_count < 4; arg_count++) { |
| 233 CallICStub stub(CallIC::State(arg_count, CallIC::METHOD)); |
| 234 stub.GetCode(isolate); |
| 235 CallICStub stub2(CallIC::State(arg_count, CallIC::FUNCTION)); |
| 236 stub2.GetCode(isolate); |
| 237 } |
| 238 } |
| 239 |
| 240 |
230 void BinaryOpICStub::PrintState(StringStream* stream) { | 241 void BinaryOpICStub::PrintState(StringStream* stream) { |
231 state_.Print(stream); | 242 state_.Print(stream); |
232 } | 243 } |
233 | 244 |
234 | 245 |
235 // static | 246 // static |
236 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate, | 247 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate, |
237 const BinaryOpIC::State& state) { | 248 const BinaryOpIC::State& state) { |
238 BinaryOpICStub stub(state); | 249 BinaryOpICStub stub(state); |
239 stub.GetCode(isolate); | 250 stub.GetCode(isolate); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 503 |
493 | 504 |
494 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) { | 505 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) { |
495 Type* output_type = GetType(zone, map); | 506 Type* output_type = GetType(zone, map); |
496 Type* nil_type = | 507 Type* nil_type = |
497 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone); | 508 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone); |
498 return Type::Union(output_type, nil_type, zone); | 509 return Type::Union(output_type, nil_type, zone); |
499 } | 510 } |
500 | 511 |
501 | 512 |
| 513 void CallICStub::PrintState(StringStream* stream) { |
| 514 state_.Print(stream); |
| 515 } |
| 516 |
| 517 |
502 void InstanceofStub::PrintName(StringStream* stream) { | 518 void InstanceofStub::PrintName(StringStream* stream) { |
503 const char* args = ""; | 519 const char* args = ""; |
504 if (HasArgsInRegisters()) { | 520 if (HasArgsInRegisters()) { |
505 args = "_REGS"; | 521 args = "_REGS"; |
506 } | 522 } |
507 | 523 |
508 const char* inline_check = ""; | 524 const char* inline_check = ""; |
509 if (HasCallSiteInlineCheck()) { | 525 if (HasCallSiteInlineCheck()) { |
510 inline_check = "_INLINE"; | 526 inline_check = "_INLINE"; |
511 } | 527 } |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 InstallDescriptor(isolate, &stub3); | 829 InstallDescriptor(isolate, &stub3); |
814 } | 830 } |
815 | 831 |
816 InternalArrayConstructorStub::InternalArrayConstructorStub( | 832 InternalArrayConstructorStub::InternalArrayConstructorStub( |
817 Isolate* isolate) { | 833 Isolate* isolate) { |
818 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 834 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
819 } | 835 } |
820 | 836 |
821 | 837 |
822 } } // namespace v8::internal | 838 } } // namespace v8::internal |
OLD | NEW |