OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // function returns a register containing the holder - either object_reg or | 422 // function returns a register containing the holder - either object_reg or |
423 // holder_reg. | 423 // holder_reg. |
424 // The function can optionally (when save_at_depth != | 424 // The function can optionally (when save_at_depth != |
425 // kInvalidProtoDepth) save the object at the given depth by moving | 425 // kInvalidProtoDepth) save the object at the given depth by moving |
426 // it to [esp + kPointerSize]. | 426 // it to [esp + kPointerSize]. |
427 | 427 |
428 Register CheckPrototypes(JSObject* object, | 428 Register CheckPrototypes(JSObject* object, |
429 Register object_reg, | 429 Register object_reg, |
430 JSObject* holder, | 430 JSObject* holder, |
431 Register holder_reg, | 431 Register holder_reg, |
432 Register scratch, | 432 Register scratch1, |
| 433 Register scratch2, |
433 String* name, | 434 String* name, |
434 Label* miss, | 435 Label* miss) { |
435 Register extra = no_reg) { | 436 return CheckPrototypes(object, object_reg, holder, holder_reg, scratch1, |
436 return CheckPrototypes(object, object_reg, holder, holder_reg, scratch, | 437 scratch2, name, kInvalidProtoDepth, miss); |
437 name, kInvalidProtoDepth, miss, extra); | |
438 } | 438 } |
439 | 439 |
440 Register CheckPrototypes(JSObject* object, | 440 Register CheckPrototypes(JSObject* object, |
441 Register object_reg, | 441 Register object_reg, |
442 JSObject* holder, | 442 JSObject* holder, |
443 Register holder_reg, | 443 Register holder_reg, |
444 Register scratch, | 444 Register scratch1, |
| 445 Register scratch2, |
445 String* name, | 446 String* name, |
446 int save_at_depth, | 447 int save_at_depth, |
447 Label* miss, | 448 Label* miss); |
448 Register extra = no_reg); | |
449 | 449 |
450 protected: | 450 protected: |
451 Object* GetCodeWithFlags(Code::Flags flags, const char* name); | 451 Object* GetCodeWithFlags(Code::Flags flags, const char* name); |
452 Object* GetCodeWithFlags(Code::Flags flags, String* name); | 452 Object* GetCodeWithFlags(Code::Flags flags, String* name); |
453 | 453 |
454 MacroAssembler* masm() { return &masm_; } | 454 MacroAssembler* masm() { return &masm_; } |
455 void set_failure(Failure* failure) { failure_ = failure; } | 455 void set_failure(Failure* failure) { failure_ = failure; } |
456 | 456 |
457 void GenerateLoadField(JSObject* object, | 457 void GenerateLoadField(JSObject* object, |
458 JSObject* holder, | 458 JSObject* holder, |
459 Register receiver, | 459 Register receiver, |
460 Register scratch1, | 460 Register scratch1, |
461 Register scratch2, | 461 Register scratch2, |
| 462 Register scratch3, |
462 int index, | 463 int index, |
463 String* name, | 464 String* name, |
464 Label* miss); | 465 Label* miss); |
465 | 466 |
466 bool GenerateLoadCallback(JSObject* object, | 467 bool GenerateLoadCallback(JSObject* object, |
467 JSObject* holder, | 468 JSObject* holder, |
468 Register receiver, | 469 Register receiver, |
469 Register name_reg, | 470 Register name_reg, |
470 Register scratch1, | 471 Register scratch1, |
471 Register scratch2, | 472 Register scratch2, |
| 473 Register scratch3, |
472 AccessorInfo* callback, | 474 AccessorInfo* callback, |
473 String* name, | 475 String* name, |
474 Label* miss, | 476 Label* miss, |
475 Failure** failure); | 477 Failure** failure); |
476 | 478 |
477 void GenerateLoadConstant(JSObject* object, | 479 void GenerateLoadConstant(JSObject* object, |
478 JSObject* holder, | 480 JSObject* holder, |
479 Register receiver, | 481 Register receiver, |
480 Register scratch1, | 482 Register scratch1, |
481 Register scratch2, | 483 Register scratch2, |
| 484 Register scratch3, |
482 Object* value, | 485 Object* value, |
483 String* name, | 486 String* name, |
484 Label* miss); | 487 Label* miss); |
485 | 488 |
486 void GenerateLoadInterceptor(JSObject* object, | 489 void GenerateLoadInterceptor(JSObject* object, |
487 JSObject* holder, | 490 JSObject* holder, |
488 LookupResult* lookup, | 491 LookupResult* lookup, |
489 Register receiver, | 492 Register receiver, |
490 Register name_reg, | 493 Register name_reg, |
491 Register scratch1, | 494 Register scratch1, |
492 Register scratch2, | 495 Register scratch2, |
| 496 Register scratch3, |
493 String* name, | 497 String* name, |
494 Label* miss); | 498 Label* miss); |
495 | 499 |
496 static void LookupPostInterceptor(JSObject* holder, | 500 static void LookupPostInterceptor(JSObject* holder, |
497 String* name, | 501 String* name, |
498 LookupResult* lookup); | 502 LookupResult* lookup); |
499 | 503 |
500 private: | 504 private: |
501 HandleScope scope_; | 505 HandleScope scope_; |
502 MacroAssembler masm_; | 506 MacroAssembler masm_; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 | 747 |
744 JSFunction* constant_function_; | 748 JSFunction* constant_function_; |
745 bool is_simple_api_call_; | 749 bool is_simple_api_call_; |
746 FunctionTemplateInfo* expected_receiver_type_; | 750 FunctionTemplateInfo* expected_receiver_type_; |
747 CallHandlerInfo* api_call_info_; | 751 CallHandlerInfo* api_call_info_; |
748 }; | 752 }; |
749 | 753 |
750 } } // namespace v8::internal | 754 } } // namespace v8::internal |
751 | 755 |
752 #endif // V8_STUB_CACHE_H_ | 756 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |