OLD | NEW |
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 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 if (!ConfigureGlobalObjects(global_template)) return; | 1746 if (!ConfigureGlobalObjects(global_template)) return; |
1747 } else { | 1747 } else { |
1748 // We get here if there was no context snapshot. | 1748 // We get here if there was no context snapshot. |
1749 CreateRoots(); | 1749 CreateRoots(); |
1750 Handle<JSFunction> empty_function = CreateEmptyFunction(); | 1750 Handle<JSFunction> empty_function = CreateEmptyFunction(); |
1751 Handle<GlobalObject> inner_global; | 1751 Handle<GlobalObject> inner_global; |
1752 Handle<JSGlobalProxy> global_proxy = | 1752 Handle<JSGlobalProxy> global_proxy = |
1753 CreateNewGlobals(global_template, global_object, &inner_global); | 1753 CreateNewGlobals(global_template, global_object, &inner_global); |
1754 HookUpGlobalProxy(inner_global, global_proxy); | 1754 HookUpGlobalProxy(inner_global, global_proxy); |
1755 InitializeGlobal(inner_global, empty_function); | 1755 InitializeGlobal(inner_global, empty_function); |
| 1756 InstallJSFunctionResultCaches(); |
1756 if (!InstallNatives()) return; | 1757 if (!InstallNatives()) return; |
1757 InstallJSFunctionResultCaches(); | |
1758 | 1758 |
1759 MakeFunctionInstancePrototypeWritable(); | 1759 MakeFunctionInstancePrototypeWritable(); |
1760 | 1760 |
1761 if (!ConfigureGlobalObjects(global_template)) return; | 1761 if (!ConfigureGlobalObjects(global_template)) return; |
1762 i::Counters::contexts_created_from_scratch.Increment(); | 1762 i::Counters::contexts_created_from_scratch.Increment(); |
1763 } | 1763 } |
1764 | 1764 |
1765 result_ = global_context_; | 1765 result_ = global_context_; |
1766 } | 1766 } |
1767 | 1767 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 } | 1806 } |
1807 | 1807 |
1808 | 1808 |
1809 // Restore statics that are thread local. | 1809 // Restore statics that are thread local. |
1810 char* BootstrapperActive::RestoreState(char* from) { | 1810 char* BootstrapperActive::RestoreState(char* from) { |
1811 nesting_ = *reinterpret_cast<int*>(from); | 1811 nesting_ = *reinterpret_cast<int*>(from); |
1812 return from + sizeof(nesting_); | 1812 return from + sizeof(nesting_); |
1813 } | 1813 } |
1814 | 1814 |
1815 } } // namespace v8::internal | 1815 } } // namespace v8::internal |
OLD | NEW |