OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 : address_(Runtime::FunctionForId(id)->entry) {} | 514 : address_(Runtime::FunctionForId(id)->entry) {} |
515 | 515 |
516 | 516 |
517 ExternalReference::ExternalReference(Runtime::Function* f) | 517 ExternalReference::ExternalReference(Runtime::Function* f) |
518 : address_(f->entry) {} | 518 : address_(f->entry) {} |
519 | 519 |
520 | 520 |
521 ExternalReference::ExternalReference(const IC_Utility& ic_utility) | 521 ExternalReference::ExternalReference(const IC_Utility& ic_utility) |
522 : address_(ic_utility.address()) {} | 522 : address_(ic_utility.address()) {} |
523 | 523 |
524 | 524 #ifdef ENABLE_DEBUGGER_SUPPORT |
525 ExternalReference::ExternalReference(const Debug_Address& debug_address) | 525 ExternalReference::ExternalReference(const Debug_Address& debug_address) |
526 : address_(debug_address.address()) {} | 526 : address_(debug_address.address()) {} |
527 | 527 #endif |
528 | 528 |
529 ExternalReference::ExternalReference(StatsCounter* counter) | 529 ExternalReference::ExternalReference(StatsCounter* counter) |
530 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} | 530 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} |
531 | 531 |
532 | 532 |
533 ExternalReference::ExternalReference(Top::AddressId id) | 533 ExternalReference::ExternalReference(Top::AddressId id) |
534 : address_(Top::get_address_from_id(id)) {} | 534 : address_(Top::get_address_from_id(id)) {} |
535 | 535 |
536 | 536 |
537 ExternalReference::ExternalReference(const SCTableReference& table_ref) | 537 ExternalReference::ExternalReference(const SCTableReference& table_ref) |
(...skipping 12 matching lines...) Expand all Loading... |
550 ExternalReference ExternalReference::address_of_stack_guard_limit() { | 550 ExternalReference ExternalReference::address_of_stack_guard_limit() { |
551 return ExternalReference(StackGuard::address_of_jslimit()); | 551 return ExternalReference(StackGuard::address_of_jslimit()); |
552 } | 552 } |
553 | 553 |
554 | 554 |
555 ExternalReference ExternalReference::address_of_regexp_stack_limit() { | 555 ExternalReference ExternalReference::address_of_regexp_stack_limit() { |
556 return ExternalReference(RegExpStack::limit_address()); | 556 return ExternalReference(RegExpStack::limit_address()); |
557 } | 557 } |
558 | 558 |
559 | 559 |
560 ExternalReference ExternalReference::debug_break() { | |
561 return ExternalReference(FUNCTION_ADDR(Debug::Break)); | |
562 } | |
563 | |
564 | |
565 ExternalReference ExternalReference::new_space_start() { | 560 ExternalReference ExternalReference::new_space_start() { |
566 return ExternalReference(Heap::NewSpaceStart()); | 561 return ExternalReference(Heap::NewSpaceStart()); |
567 } | 562 } |
568 | 563 |
| 564 |
569 ExternalReference ExternalReference::new_space_allocation_top_address() { | 565 ExternalReference ExternalReference::new_space_allocation_top_address() { |
570 return ExternalReference(Heap::NewSpaceAllocationTopAddress()); | 566 return ExternalReference(Heap::NewSpaceAllocationTopAddress()); |
571 } | 567 } |
572 | 568 |
| 569 |
573 ExternalReference ExternalReference::heap_always_allocate_scope_depth() { | 570 ExternalReference ExternalReference::heap_always_allocate_scope_depth() { |
574 return ExternalReference(Heap::always_allocate_scope_depth_address()); | 571 return ExternalReference(Heap::always_allocate_scope_depth_address()); |
575 } | 572 } |
576 | 573 |
| 574 |
577 ExternalReference ExternalReference::new_space_allocation_limit_address() { | 575 ExternalReference ExternalReference::new_space_allocation_limit_address() { |
578 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); | 576 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); |
579 } | 577 } |
580 | 578 |
581 ExternalReference ExternalReference::debug_step_in_fp_address() { | |
582 return ExternalReference(Debug::step_in_fp_addr()); | |
583 } | |
584 | |
585 | 579 |
586 static double add_two_doubles(double x, double y) { | 580 static double add_two_doubles(double x, double y) { |
587 return x + y; | 581 return x + y; |
588 } | 582 } |
589 | 583 |
590 | 584 |
591 static double sub_two_doubles(double x, double y) { | 585 static double sub_two_doubles(double x, double y) { |
592 return x - y; | 586 return x - y; |
593 } | 587 } |
594 | 588 |
(...skipping 16 matching lines...) Expand all Loading... |
611 break; | 605 break; |
612 case Token::MUL: | 606 case Token::MUL: |
613 function = &mul_two_doubles; | 607 function = &mul_two_doubles; |
614 break; | 608 break; |
615 default: | 609 default: |
616 UNREACHABLE(); | 610 UNREACHABLE(); |
617 } | 611 } |
618 return ExternalReference(FUNCTION_ADDR(function)); | 612 return ExternalReference(FUNCTION_ADDR(function)); |
619 } | 613 } |
620 | 614 |
| 615 |
| 616 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 617 ExternalReference ExternalReference::debug_break() { |
| 618 return ExternalReference(FUNCTION_ADDR(Debug::Break)); |
| 619 } |
| 620 |
| 621 |
| 622 ExternalReference ExternalReference::debug_step_in_fp_address() { |
| 623 return ExternalReference(Debug::step_in_fp_addr()); |
| 624 } |
| 625 #endif |
| 626 |
621 } } // namespace v8::internal | 627 } } // namespace v8::internal |
OLD | NEW |