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

Side by Side Diff: src/bootstrapper.cc

Issue 3066044: Generalize virtually dispatched scavenger to virtually dispatched specialized visitors. (Closed)
Patch Set: cleanup Created 10 years, 4 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
« no previous file with comments | « src/assembler.h ('k') | src/factory.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 18 matching lines...) Expand all
29 29
30 #include "accessors.h" 30 #include "accessors.h"
31 #include "api.h" 31 #include "api.h"
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "compiler.h" 33 #include "compiler.h"
34 #include "debug.h" 34 #include "debug.h"
35 #include "execution.h" 35 #include "execution.h"
36 #include "global-handles.h" 36 #include "global-handles.h"
37 #include "macro-assembler.h" 37 #include "macro-assembler.h"
38 #include "natives.h" 38 #include "natives.h"
39 #include "objects-visiting.h"
39 #include "snapshot.h" 40 #include "snapshot.h"
40 #include "stub-cache.h" 41 #include "stub-cache.h"
41 42
42 namespace v8 { 43 namespace v8 {
43 namespace internal { 44 namespace internal {
44 45
45 // A SourceCodeCache uses a FixedArray to store pairs of 46 // A SourceCodeCache uses a FixedArray to store pairs of
46 // (AsciiString*, JSFunction*), mapping names of native code files 47 // (AsciiString*, JSFunction*), mapping names of native code files
47 // (runtime.js, etc.) to precompiled functions. Instead of mapping 48 // (runtime.js, etc.) to precompiled functions. Instead of mapping
48 // names to functions it might make sense to let the JS2C tool 49 // names to functions it might make sense to let the JS2C tool
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 } 806 }
806 descriptors->SetNextEnumerationIndex(enum_index); 807 descriptors->SetNextEnumerationIndex(enum_index);
807 descriptors->Sort(); 808 descriptors->Sort();
808 809
809 initial_map->set_inobject_properties(5); 810 initial_map->set_inobject_properties(5);
810 initial_map->set_pre_allocated_property_fields(5); 811 initial_map->set_pre_allocated_property_fields(5);
811 initial_map->set_unused_property_fields(0); 812 initial_map->set_unused_property_fields(0);
812 initial_map->set_instance_size( 813 initial_map->set_instance_size(
813 initial_map->instance_size() + 5 * kPointerSize); 814 initial_map->instance_size() + 5 * kPointerSize);
814 initial_map->set_instance_descriptors(*descriptors); 815 initial_map->set_instance_descriptors(*descriptors);
815 initial_map->set_scavenger( 816 initial_map->set_visitor_id(StaticVisitorBase::GetVisitorId(*initial_map));
816 Heap::GetScavenger(initial_map->instance_type(),
817 initial_map->instance_size()));
818 } 817 }
819 818
820 { // -- J S O N 819 { // -- J S O N
821 Handle<String> name = Factory::NewStringFromAscii(CStrVector("JSON")); 820 Handle<String> name = Factory::NewStringFromAscii(CStrVector("JSON"));
822 Handle<JSFunction> cons = Factory::NewFunction( 821 Handle<JSFunction> cons = Factory::NewFunction(
823 name, 822 name,
824 Factory::the_hole_value()); 823 Factory::the_hole_value());
825 cons->SetInstancePrototype(global_context()->initial_object_prototype()); 824 cons->SetInstancePrototype(global_context()->initial_object_prototype());
826 cons->SetInstanceClassName(*name); 825 cons->SetInstanceClassName(*name);
827 Handle<JSObject> json_object = Factory::NewJSObject(cons, TENURED); 826 Handle<JSObject> json_object = Factory::NewJSObject(cons, TENURED);
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 } 1809 }
1811 1810
1812 1811
1813 // Restore statics that are thread local. 1812 // Restore statics that are thread local.
1814 char* BootstrapperActive::RestoreState(char* from) { 1813 char* BootstrapperActive::RestoreState(char* from) {
1815 nesting_ = *reinterpret_cast<int*>(from); 1814 nesting_ = *reinterpret_cast<int*>(from);
1816 return from + sizeof(nesting_); 1815 return from + sizeof(nesting_);
1817 } 1816 }
1818 1817
1819 } } // namespace v8::internal 1818 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698