Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: src/heap.cc

Issue 143003013: Initial patch for a64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/globals.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 set_js_construct_entry_code(*stub.GetCode(isolate())); 2841 set_js_construct_entry_code(*stub.GetCode(isolate()));
2842 } 2842 }
2843 2843
2844 2844
2845 void Heap::CreateFixedStubs() { 2845 void Heap::CreateFixedStubs() {
2846 // Here we create roots for fixed stubs. They are needed at GC 2846 // Here we create roots for fixed stubs. They are needed at GC
2847 // for cooking and uncooking (check out frames.cc). 2847 // for cooking and uncooking (check out frames.cc).
2848 // The eliminates the need for doing dictionary lookup in the 2848 // The eliminates the need for doing dictionary lookup in the
2849 // stub cache for these stubs. 2849 // stub cache for these stubs.
2850 HandleScope scope(isolate()); 2850 HandleScope scope(isolate());
2851
2852 // Create stubs that should be there, so we don't unexpectedly have to
2853 // create them if we need them during the creation of another stub.
2854 // Stub creation mixes raw pointers and handles in an unsafe manner so
2855 // we cannot create stubs while we are creating stubs.
2856 CodeStub::GenerateStubsAheadOfTime(isolate());
2857
2858 // MacroAssembler::Abort calls (usually enabled with --debug-code) depend on
2859 // CEntryStub, so we need to call GenerateStubsAheadOfTime before JSEntryStub
2860 // is created.
2861
2851 // gcc-4.4 has problem generating correct code of following snippet: 2862 // gcc-4.4 has problem generating correct code of following snippet:
2852 // { JSEntryStub stub; 2863 // { JSEntryStub stub;
2853 // js_entry_code_ = *stub.GetCode(); 2864 // js_entry_code_ = *stub.GetCode();
2854 // } 2865 // }
2855 // { JSConstructEntryStub stub; 2866 // { JSConstructEntryStub stub;
2856 // js_construct_entry_code_ = *stub.GetCode(); 2867 // js_construct_entry_code_ = *stub.GetCode();
2857 // } 2868 // }
2858 // To workaround the problem, make separate functions without inlining. 2869 // To workaround the problem, make separate functions without inlining.
2859 Heap::CreateJSEntryStub(); 2870 Heap::CreateJSEntryStub();
2860 Heap::CreateJSConstructEntryStub(); 2871 Heap::CreateJSConstructEntryStub();
2861
2862 // Create stubs that should be there, so we don't unexpectedly have to
2863 // create them if we need them during the creation of another stub.
2864 // Stub creation mixes raw pointers and handles in an unsafe manner so
2865 // we cannot create stubs while we are creating stubs.
2866 CodeStub::GenerateStubsAheadOfTime(isolate());
2867 } 2872 }
2868 2873
2869 2874
2870 bool Heap::CreateInitialObjects() { 2875 bool Heap::CreateInitialObjects() {
2871 Object* obj; 2876 Object* obj;
2872 2877
2873 // The -0 value must be set before NumberFromDouble works. 2878 // The -0 value must be set before NumberFromDouble works.
2874 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); 2879 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED);
2875 if (!maybe_obj->ToObject(&obj)) return false; 2880 if (!maybe_obj->ToObject(&obj)) return false;
2876 } 2881 }
(...skipping 5109 matching lines...) Expand 10 before | Expand all | Expand 10 after
7986 if (FLAG_parallel_recompilation) { 7991 if (FLAG_parallel_recompilation) {
7987 heap_->relocation_mutex_->Lock(); 7992 heap_->relocation_mutex_->Lock();
7988 #ifdef DEBUG 7993 #ifdef DEBUG
7989 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7994 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7990 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7995 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7991 #endif // DEBUG 7996 #endif // DEBUG
7992 } 7997 }
7993 } 7998 }
7994 7999
7995 } } // namespace v8::internal 8000 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698