| OLD | NEW |
| 1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2010 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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 // Enable logging before setting up the heap | 650 // Enable logging before setting up the heap |
| 651 logger_->Setup(); | 651 logger_->Setup(); |
| 652 | 652 |
| 653 CpuProfiler::Setup(); | 653 CpuProfiler::Setup(); |
| 654 HeapProfiler::Setup(); | 654 HeapProfiler::Setup(); |
| 655 | 655 |
| 656 // Setup the platform OS support. | 656 // Setup the platform OS support. |
| 657 OS::Setup(); | 657 OS::Setup(); |
| 658 | 658 |
| 659 // If the serializer is enabled we will use only the platform to determine |
| 660 // the CPU. We can do that without generating probe code, so we don't need |
| 661 // the heap to be set up first. We move up the detection to here so that |
| 662 // the builtins can make use of the information. |
| 663 if (Serializer::enabled()) CPU::Setup(); |
| 664 |
| 659 // Initialize other runtime facilities | 665 // Initialize other runtime facilities |
| 660 #if defined(USE_SIMULATOR) | 666 #if defined(USE_SIMULATOR) |
| 661 #if defined(V8_TARGET_ARCH_ARM) | 667 #if defined(V8_TARGET_ARCH_ARM) |
| 662 Simulator::Initialize(); | 668 Simulator::Initialize(); |
| 663 #elif defined(V8_TARGET_ARCH_MIPS) | 669 #elif defined(V8_TARGET_ARCH_MIPS) |
| 664 ::assembler::mips::Simulator::Initialize(); | 670 ::assembler::mips::Simulator::Initialize(); |
| 665 #endif | 671 #endif |
| 666 #endif | 672 #endif |
| 667 | 673 |
| 668 { // NOLINT | 674 { // NOLINT |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 stub_cache_->Clear(); | 718 stub_cache_->Clear(); |
| 713 } | 719 } |
| 714 | 720 |
| 715 // Deserializing may put strange things in the root array's copy of the | 721 // Deserializing may put strange things in the root array's copy of the |
| 716 // stack guard. | 722 // stack guard. |
| 717 heap_.SetStackLimits(); | 723 heap_.SetStackLimits(); |
| 718 | 724 |
| 719 // Setup the CPU support. Must be done after heap setup and after | 725 // Setup the CPU support. Must be done after heap setup and after |
| 720 // any deserialization because we have to have the initial heap | 726 // any deserialization because we have to have the initial heap |
| 721 // objects in place for creating the code object used for probing. | 727 // objects in place for creating the code object used for probing. |
| 722 CPU::Setup(); | 728 if (!Serializer::enabled()) CPU::Setup(); |
| 723 | 729 |
| 724 deoptimizer_data_ = new DeoptimizerData; | 730 deoptimizer_data_ = new DeoptimizerData; |
| 725 runtime_profiler_ = new RuntimeProfiler(this); | 731 runtime_profiler_ = new RuntimeProfiler(this); |
| 726 runtime_profiler_->Setup(); | 732 runtime_profiler_->Setup(); |
| 727 | 733 |
| 728 // If we are deserializing, log non-function code objects and compiled | 734 // If we are deserializing, log non-function code objects and compiled |
| 729 // functions found in the snapshot. | 735 // functions found in the snapshot. |
| 730 if (des != NULL && FLAG_log_code) { | 736 if (des != NULL && FLAG_log_code) { |
| 731 HandleScope scope; | 737 HandleScope scope; |
| 732 LOG(this, LogCodeObjects()); | 738 LOG(this, LogCodeObjects()); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 | 822 |
| 817 #ifdef DEBUG | 823 #ifdef DEBUG |
| 818 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 824 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 819 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 825 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 820 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 826 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 821 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 827 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 822 #undef ISOLATE_FIELD_OFFSET | 828 #undef ISOLATE_FIELD_OFFSET |
| 823 #endif | 829 #endif |
| 824 | 830 |
| 825 } } // namespace v8::internal | 831 } } // namespace v8::internal |
| OLD | NEW |