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

Side by Side Diff: src/heap.cc

Issue 68723002: Implement Math.random() purely in JavaScript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments only Created 7 years, 1 month 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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 1758
1759 if (record_slots) { 1759 if (record_slots) {
1760 // Record the updated slot if necessary. 1760 // Record the updated slot if necessary.
1761 Object** head_slot = HeapObject::RawField( 1761 Object** head_slot = HeapObject::RawField(
1762 context, FixedArray::SizeFor(index)); 1762 context, FixedArray::SizeFor(index));
1763 heap->mark_compact_collector()->RecordSlot( 1763 heap->mark_compact_collector()->RecordSlot(
1764 head_slot, head_slot, list_head); 1764 head_slot, head_slot, list_head);
1765 } 1765 }
1766 } 1766 }
1767 1767
1768 static void VisitPhantomObject(Heap*, Context*) { 1768 static void VisitPhantomObject(Heap*, Context* context) {
1769 // A bit of a hack, see the comment at the end of Genesis::Genesis().
1770 delete[] reinterpret_cast<uint32_t*>(context->random_state());
1769 } 1771 }
1770 1772
1771 static int WeakNextOffset() { 1773 static int WeakNextOffset() {
1772 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK); 1774 return FixedArray::SizeFor(Context::NEXT_CONTEXT_LINK);
1773 } 1775 }
1774 }; 1776 };
1775 1777
1776 1778
1777 void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) { 1779 void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) {
1778 // We don't record weak slots during marking or scavenges. 1780 // We don't record weak slots during marking or scavenges.
(...skipping 6179 matching lines...) Expand 10 before | Expand all | Expand 10 after
7958 if (FLAG_concurrent_recompilation) { 7960 if (FLAG_concurrent_recompilation) {
7959 heap_->relocation_mutex_->Lock(); 7961 heap_->relocation_mutex_->Lock();
7960 #ifdef DEBUG 7962 #ifdef DEBUG
7961 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7963 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7962 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7964 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7963 #endif // DEBUG 7965 #endif // DEBUG
7964 } 7966 }
7965 } 7967 }
7966 7968
7967 } } // namespace v8::internal 7969 } } // 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