OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 private: | 277 private: |
278 // Update the inline cache and the global stub cache based on the | 278 // Update the inline cache and the global stub cache based on the |
279 // lookup result. | 279 // lookup result. |
280 void UpdateCaches(LookupResult* lookup, | 280 void UpdateCaches(LookupResult* lookup, |
281 State state, | 281 State state, |
282 Handle<Object> object, | 282 Handle<Object> object, |
283 Handle<String> name); | 283 Handle<String> name); |
284 | 284 |
285 // Stub accessors. | 285 // Stub accessors. |
286 static Code* megamorphic_stub() { | 286 static Code* megamorphic_stub() { |
287 return Builtins::builtin(Builtins::LoadIC_Megamorphic); | 287 return Isolate::Current()->builtins()->builtin( |
| 288 Builtins::LoadIC_Megamorphic); |
288 } | 289 } |
289 static Code* initialize_stub() { | 290 static Code* initialize_stub() { |
290 return Builtins::builtin(Builtins::LoadIC_Initialize); | 291 return Isolate::Current()->builtins()->builtin( |
| 292 Builtins::LoadIC_Initialize); |
291 } | 293 } |
292 static Code* pre_monomorphic_stub() { | 294 static Code* pre_monomorphic_stub() { |
293 return Builtins::builtin(Builtins::LoadIC_PreMonomorphic); | 295 return Isolate::Current()->builtins()->builtin( |
| 296 Builtins::LoadIC_PreMonomorphic); |
294 } | 297 } |
295 | 298 |
296 static void Clear(Address address, Code* target); | 299 static void Clear(Address address, Code* target); |
297 | 300 |
298 static bool PatchInlinedLoad(Address address, Object* map, int index); | 301 static bool PatchInlinedLoad(Address address, Object* map, int index); |
299 | 302 |
300 friend class IC; | 303 friend class IC; |
301 }; | 304 }; |
302 | 305 |
303 | 306 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 340 |
338 private: | 341 private: |
339 // Update the inline cache. | 342 // Update the inline cache. |
340 void UpdateCaches(LookupResult* lookup, | 343 void UpdateCaches(LookupResult* lookup, |
341 State state, | 344 State state, |
342 Handle<Object> object, | 345 Handle<Object> object, |
343 Handle<String> name); | 346 Handle<String> name); |
344 | 347 |
345 // Stub accessors. | 348 // Stub accessors. |
346 static Code* initialize_stub() { | 349 static Code* initialize_stub() { |
347 return Builtins::builtin(Builtins::KeyedLoadIC_Initialize); | 350 return Isolate::Current()->builtins()->builtin( |
| 351 Builtins::KeyedLoadIC_Initialize); |
348 } | 352 } |
349 static Code* megamorphic_stub() { | 353 static Code* megamorphic_stub() { |
350 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); | 354 return Isolate::Current()->builtins()->builtin( |
| 355 Builtins::KeyedLoadIC_Generic); |
351 } | 356 } |
352 static Code* generic_stub() { | 357 static Code* generic_stub() { |
353 return Builtins::builtin(Builtins::KeyedLoadIC_Generic); | 358 return Isolate::Current()->builtins()->builtin( |
| 359 Builtins::KeyedLoadIC_Generic); |
354 } | 360 } |
355 static Code* pre_monomorphic_stub() { | 361 static Code* pre_monomorphic_stub() { |
356 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic); | 362 return Isolate::Current()->builtins()->builtin( |
| 363 Builtins::KeyedLoadIC_PreMonomorphic); |
357 } | 364 } |
358 static Code* string_stub() { | 365 static Code* string_stub() { |
359 return Builtins::builtin(Builtins::KeyedLoadIC_String); | 366 return Isolate::Current()->builtins()->builtin( |
| 367 Builtins::KeyedLoadIC_String); |
360 } | 368 } |
361 static Code* external_array_stub(JSObject::ElementsKind elements_kind); | 369 static Code* external_array_stub(JSObject::ElementsKind elements_kind); |
362 | 370 |
363 static Code* indexed_interceptor_stub() { | 371 static Code* indexed_interceptor_stub() { |
364 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor); | 372 return Isolate::Current()->builtins()->builtin( |
| 373 Builtins::KeyedLoadIC_IndexedInterceptor); |
365 } | 374 } |
366 | 375 |
367 static void Clear(Address address, Code* target); | 376 static void Clear(Address address, Code* target); |
368 | 377 |
369 // Support for patching the map that is checked in an inlined | 378 // Support for patching the map that is checked in an inlined |
370 // version of keyed load. | 379 // version of keyed load. |
371 static bool PatchInlinedLoad(Address address, Object* map); | 380 static bool PatchInlinedLoad(Address address, Object* map); |
372 | 381 |
373 friend class IC; | 382 friend class IC; |
374 }; | 383 }; |
(...skipping 17 matching lines...) Expand all Loading... |
392 private: | 401 private: |
393 // Update the inline cache and the global stub cache based on the | 402 // Update the inline cache and the global stub cache based on the |
394 // lookup result. | 403 // lookup result. |
395 void UpdateCaches(LookupResult* lookup, | 404 void UpdateCaches(LookupResult* lookup, |
396 State state, Handle<JSObject> receiver, | 405 State state, Handle<JSObject> receiver, |
397 Handle<String> name, | 406 Handle<String> name, |
398 Handle<Object> value); | 407 Handle<Object> value); |
399 | 408 |
400 // Stub accessors. | 409 // Stub accessors. |
401 static Code* megamorphic_stub() { | 410 static Code* megamorphic_stub() { |
402 return Builtins::builtin(Builtins::StoreIC_Megamorphic); | 411 return Isolate::Current()->builtins()->builtin( |
| 412 Builtins::StoreIC_Megamorphic); |
403 } | 413 } |
404 static Code* initialize_stub() { | 414 static Code* initialize_stub() { |
405 return Builtins::builtin(Builtins::StoreIC_Initialize); | 415 return Isolate::Current()->builtins()->builtin( |
| 416 Builtins::StoreIC_Initialize); |
406 } | 417 } |
407 | 418 |
408 static void Clear(Address address, Code* target); | 419 static void Clear(Address address, Code* target); |
409 friend class IC; | 420 friend class IC; |
410 }; | 421 }; |
411 | 422 |
412 | 423 |
413 class KeyedStoreIC: public IC { | 424 class KeyedStoreIC: public IC { |
414 public: | 425 public: |
415 KeyedStoreIC() : IC(NO_EXTRA_FRAME) { } | 426 KeyedStoreIC() : IC(NO_EXTRA_FRAME) { } |
(...skipping 25 matching lines...) Expand all Loading... |
441 private: | 452 private: |
442 // Update the inline cache. | 453 // Update the inline cache. |
443 void UpdateCaches(LookupResult* lookup, | 454 void UpdateCaches(LookupResult* lookup, |
444 State state, | 455 State state, |
445 Handle<JSObject> receiver, | 456 Handle<JSObject> receiver, |
446 Handle<String> name, | 457 Handle<String> name, |
447 Handle<Object> value); | 458 Handle<Object> value); |
448 | 459 |
449 // Stub accessors. | 460 // Stub accessors. |
450 static Code* initialize_stub() { | 461 static Code* initialize_stub() { |
451 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize); | 462 return Isolate::Current()->builtins()->builtin( |
| 463 Builtins::KeyedStoreIC_Initialize); |
452 } | 464 } |
453 static Code* megamorphic_stub() { | 465 static Code* megamorphic_stub() { |
454 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); | 466 return Isolate::Current()->builtins()->builtin( |
| 467 Builtins::KeyedStoreIC_Generic); |
455 } | 468 } |
456 static Code* generic_stub() { | 469 static Code* generic_stub() { |
457 return Builtins::builtin(Builtins::KeyedStoreIC_Generic); | 470 return Isolate::Current()->builtins()->builtin( |
| 471 Builtins::KeyedStoreIC_Generic); |
458 } | 472 } |
459 static Code* external_array_stub(JSObject::ElementsKind elements_kind); | 473 static Code* external_array_stub(JSObject::ElementsKind elements_kind); |
460 | 474 |
461 static void Clear(Address address, Code* target); | 475 static void Clear(Address address, Code* target); |
462 | 476 |
463 // Support for patching the map that is checked in an inlined | 477 // Support for patching the map that is checked in an inlined |
464 // version of keyed store. | 478 // version of keyed store. |
465 // The address is the patch point for the IC call | 479 // The address is the patch point for the IC call |
466 // (Assembler::kCallTargetAddressOffset before the end of | 480 // (Assembler::kCallTargetAddressOffset before the end of |
467 // the call/return address). | 481 // the call/return address). |
(...skipping 24 matching lines...) Expand all Loading... |
492 static const char* GetName(TypeInfo type_info); | 506 static const char* GetName(TypeInfo type_info); |
493 | 507 |
494 static State ToState(TypeInfo type_info); | 508 static State ToState(TypeInfo type_info); |
495 | 509 |
496 static TypeInfo GetTypeInfo(Object* left, Object* right); | 510 static TypeInfo GetTypeInfo(Object* left, Object* right); |
497 }; | 511 }; |
498 | 512 |
499 } } // namespace v8::internal | 513 } } // namespace v8::internal |
500 | 514 |
501 #endif // V8_IC_H_ | 515 #endif // V8_IC_H_ |
OLD | NEW |