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

Side by Side Diff: src/bootstrapper.cc

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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
« src/ast.cc ('K') | « src/ast.cc ('k') | src/builtins.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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 INSTALL_NATIVE(JSFunction, "ToString", to_string_fun); 1011 INSTALL_NATIVE(JSFunction, "ToString", to_string_fun);
1012 INSTALL_NATIVE(JSFunction, "ToDetailString", to_detail_string_fun); 1012 INSTALL_NATIVE(JSFunction, "ToDetailString", to_detail_string_fun);
1013 INSTALL_NATIVE(JSFunction, "ToObject", to_object_fun); 1013 INSTALL_NATIVE(JSFunction, "ToObject", to_object_fun);
1014 INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun); 1014 INSTALL_NATIVE(JSFunction, "ToInteger", to_integer_fun);
1015 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun); 1015 INSTALL_NATIVE(JSFunction, "ToUint32", to_uint32_fun);
1016 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun); 1016 INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun);
1017 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun); 1017 INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun);
1018 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun); 1018 INSTALL_NATIVE(JSFunction, "Instantiate", instantiate_fun);
1019 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance", 1019 INSTALL_NATIVE(JSFunction, "ConfigureTemplateInstance",
1020 configure_instance_fun); 1020 configure_instance_fun);
1021 INSTALL_NATIVE(JSFunction, "MakeMessage", make_message_fun);
1022 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun); 1021 INSTALL_NATIVE(JSFunction, "GetStackTraceLine", get_stack_trace_line_fun);
1023 INSTALL_NATIVE(JSObject, "functionCache", function_cache); 1022 INSTALL_NATIVE(JSObject, "functionCache", function_cache);
1024 } 1023 }
1025 1024
1026 #undef INSTALL_NATIVE 1025 #undef INSTALL_NATIVE
1027 1026
1028 1027
1029 bool Genesis::InstallNatives() { 1028 bool Genesis::InstallNatives() {
1030 HandleScope scope; 1029 HandleScope scope;
1031 1030
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 HandleScope scope; 1775 HandleScope scope;
1777 SaveContext saved_context(isolate); 1776 SaveContext saved_context(isolate);
1778 1777
1779 Handle<Context> new_context = Snapshot::NewContextFromSnapshot(); 1778 Handle<Context> new_context = Snapshot::NewContextFromSnapshot();
1780 if (!new_context.is_null()) { 1779 if (!new_context.is_null()) {
1781 global_context_ = 1780 global_context_ =
1782 Handle<Context>::cast(isolate->global_handles()->Create(*new_context)); 1781 Handle<Context>::cast(isolate->global_handles()->Create(*new_context));
1783 AddToWeakGlobalContextList(*global_context_); 1782 AddToWeakGlobalContextList(*global_context_);
1784 isolate->set_context(*global_context_); 1783 isolate->set_context(*global_context_);
1785 isolate->counters()->contexts_created_by_snapshot()->Increment(); 1784 isolate->counters()->contexts_created_by_snapshot()->Increment();
1786 result_ = global_context_;
1787 JSFunction* empty_function = 1785 JSFunction* empty_function =
1788 JSFunction::cast(result_->function_map()->prototype()); 1786 JSFunction::cast(global_context_->function_map()->prototype());
1789 empty_function_ = Handle<JSFunction>(empty_function); 1787 empty_function_ = Handle<JSFunction>(empty_function);
1790 Handle<GlobalObject> inner_global; 1788 Handle<GlobalObject> inner_global;
1791 Handle<JSGlobalProxy> global_proxy = 1789 Handle<JSGlobalProxy> global_proxy =
1792 CreateNewGlobals(global_template, 1790 CreateNewGlobals(global_template,
1793 global_object, 1791 global_object,
1794 &inner_global); 1792 &inner_global);
1795 1793
1796 HookUpGlobalProxy(inner_global, global_proxy); 1794 HookUpGlobalProxy(inner_global, global_proxy);
1797 HookUpInnerGlobal(inner_global); 1795 HookUpInnerGlobal(inner_global);
1798 1796
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 return from + sizeof(NestingCounterType); 1840 return from + sizeof(NestingCounterType);
1843 } 1841 }
1844 1842
1845 1843
1846 // Called when the top-level V8 mutex is destroyed. 1844 // Called when the top-level V8 mutex is destroyed.
1847 void Bootstrapper::FreeThreadResources() { 1845 void Bootstrapper::FreeThreadResources() {
1848 ASSERT(!IsActive()); 1846 ASSERT(!IsActive());
1849 } 1847 }
1850 1848
1851 } } // namespace v8::internal 1849 } } // namespace v8::internal
OLDNEW
« src/ast.cc ('K') | « src/ast.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698