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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 #endif // DEBUG | 515 #endif // DEBUG |
516 | 516 |
517 | 517 |
518 // ----------------------------------------------------------------------------- | 518 // ----------------------------------------------------------------------------- |
519 // Implementation of ExternalReference | 519 // Implementation of ExternalReference |
520 | 520 |
521 ExternalReference::ExternalReference(Builtins::CFunctionId id) | 521 ExternalReference::ExternalReference(Builtins::CFunctionId id) |
522 : address_(Redirect(Builtins::c_function_address(id))) {} | 522 : address_(Redirect(Builtins::c_function_address(id))) {} |
523 | 523 |
524 | 524 |
| 525 ExternalReference::ExternalReference(ApiFunction* fun) |
| 526 : address_(Redirect(fun->address())) {} |
| 527 |
| 528 |
525 ExternalReference::ExternalReference(Builtins::Name name) | 529 ExternalReference::ExternalReference(Builtins::Name name) |
526 : address_(Builtins::builtin_address(name)) {} | 530 : address_(Builtins::builtin_address(name)) {} |
527 | 531 |
528 | 532 |
529 ExternalReference::ExternalReference(Runtime::FunctionId id) | 533 ExternalReference::ExternalReference(Runtime::FunctionId id) |
530 : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} | 534 : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} |
531 | 535 |
532 | 536 |
533 ExternalReference::ExternalReference(Runtime::Function* f) | 537 ExternalReference::ExternalReference(Runtime::Function* f) |
534 : address_(Redirect(f->entry)) {} | 538 : address_(Redirect(f->entry)) {} |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 | 605 |
602 ExternalReference ExternalReference::heap_always_allocate_scope_depth() { | 606 ExternalReference ExternalReference::heap_always_allocate_scope_depth() { |
603 return ExternalReference(Heap::always_allocate_scope_depth_address()); | 607 return ExternalReference(Heap::always_allocate_scope_depth_address()); |
604 } | 608 } |
605 | 609 |
606 | 610 |
607 ExternalReference ExternalReference::new_space_allocation_limit_address() { | 611 ExternalReference ExternalReference::new_space_allocation_limit_address() { |
608 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); | 612 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); |
609 } | 613 } |
610 | 614 |
| 615 |
| 616 ExternalReference ExternalReference::handle_scope_extensions_address() { |
| 617 return ExternalReference(HandleScope::current_extensions_address()); |
| 618 } |
| 619 |
| 620 |
| 621 ExternalReference ExternalReference::handle_scope_next_address() { |
| 622 return ExternalReference(HandleScope::current_next_address()); |
| 623 } |
| 624 |
| 625 |
| 626 ExternalReference ExternalReference::handle_scope_limit_address() { |
| 627 return ExternalReference(HandleScope::current_limit_address()); |
| 628 } |
| 629 |
| 630 |
| 631 ExternalReference ExternalReference::scheduled_exception_address() { |
| 632 return ExternalReference(Top::scheduled_exception_address()); |
| 633 } |
| 634 |
| 635 |
611 #ifdef V8_NATIVE_REGEXP | 636 #ifdef V8_NATIVE_REGEXP |
612 | 637 |
613 ExternalReference ExternalReference::re_check_stack_guard_state() { | 638 ExternalReference ExternalReference::re_check_stack_guard_state() { |
614 Address function; | 639 Address function; |
615 #ifdef V8_TARGET_ARCH_X64 | 640 #ifdef V8_TARGET_ARCH_X64 |
616 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 641 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
617 #elif V8_TARGET_ARCH_IA32 | 642 #elif V8_TARGET_ARCH_IA32 |
618 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 643 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
619 #elif V8_TARGET_ARCH_ARM | 644 #elif V8_TARGET_ARCH_ARM |
620 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); | 645 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); | 735 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); |
711 } | 736 } |
712 | 737 |
713 | 738 |
714 ExternalReference ExternalReference::debug_step_in_fp_address() { | 739 ExternalReference ExternalReference::debug_step_in_fp_address() { |
715 return ExternalReference(Debug::step_in_fp_addr()); | 740 return ExternalReference(Debug::step_in_fp_addr()); |
716 } | 741 } |
717 #endif | 742 #endif |
718 | 743 |
719 } } // namespace v8::internal | 744 } } // namespace v8::internal |
OLD | NEW |