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

Side by Side Diff: src/heap.cc

Issue 290633010: Move microtask queueing logic from JavaScript to C++ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Handle comments Created 6 years, 7 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/heap.h ('k') | src/isolate.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "api.h" 8 #include "api.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 2890
2891 set_undefined_cell(*factory->NewCell(factory->undefined_value())); 2891 set_undefined_cell(*factory->NewCell(factory->undefined_value()));
2892 2892
2893 // The symbol registry is initialized lazily. 2893 // The symbol registry is initialized lazily.
2894 set_symbol_registry(undefined_value()); 2894 set_symbol_registry(undefined_value());
2895 2895
2896 // Allocate object to hold object observation state. 2896 // Allocate object to hold object observation state.
2897 set_observation_state(*factory->NewJSObjectFromMap( 2897 set_observation_state(*factory->NewJSObjectFromMap(
2898 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); 2898 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize)));
2899 2899
2900 // Allocate object to hold object microtask state. 2900 // Microtask queue uses the empty fixed array as a sentinel for "empty".
2901 set_microtask_state(*factory->NewJSObjectFromMap( 2901 // Number of queued microtasks stored in Isolate::pending_microtask_count().
2902 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); 2902 set_microtask_queue(empty_fixed_array());
2903 2903
2904 set_frozen_symbol(*factory->NewPrivateSymbol()); 2904 set_frozen_symbol(*factory->NewPrivateSymbol());
2905 set_nonexistent_symbol(*factory->NewPrivateSymbol()); 2905 set_nonexistent_symbol(*factory->NewPrivateSymbol());
2906 set_elements_transition_symbol(*factory->NewPrivateSymbol()); 2906 set_elements_transition_symbol(*factory->NewPrivateSymbol());
2907 set_uninitialized_symbol(*factory->NewPrivateSymbol()); 2907 set_uninitialized_symbol(*factory->NewPrivateSymbol());
2908 set_megamorphic_symbol(*factory->NewPrivateSymbol()); 2908 set_megamorphic_symbol(*factory->NewPrivateSymbol());
2909 set_observed_symbol(*factory->NewPrivateSymbol()); 2909 set_observed_symbol(*factory->NewPrivateSymbol());
2910 2910
2911 Handle<SeededNumberDictionary> slow_element_dictionary = 2911 Handle<SeededNumberDictionary> slow_element_dictionary =
2912 SeededNumberDictionary::New(isolate(), 0, TENURED); 2912 SeededNumberDictionary::New(isolate(), 0, TENURED);
(...skipping 3553 matching lines...) Expand 10 before | Expand all | Expand 10 after
6466 static_cast<int>(object_sizes_last_time_[index])); 6466 static_cast<int>(object_sizes_last_time_[index]));
6467 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6467 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6468 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6468 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6469 6469
6470 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6470 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6471 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6471 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6472 ClearObjectStats(); 6472 ClearObjectStats();
6473 } 6473 }
6474 6474
6475 } } // namespace v8::internal 6475 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698