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

Side by Side Diff: src/bootstrapper.cc

Issue 2469002: - Add a pointer to Bootstrapper from Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 6 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/bootstrapper.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 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (delete_these_non_arrays_on_tear_down == NULL) { 104 if (delete_these_non_arrays_on_tear_down == NULL) {
105 delete_these_non_arrays_on_tear_down = new List<char*>(2); 105 delete_these_non_arrays_on_tear_down = new List<char*>(2);
106 } 106 }
107 // The resources are small objects and we only make a fixed number of 107 // The resources are small objects and we only make a fixed number of
108 // them, but let's clean them up on exit for neatness. 108 // them, but let's clean them up on exit for neatness.
109 delete_these_non_arrays_on_tear_down-> 109 delete_these_non_arrays_on_tear_down->
110 Add(reinterpret_cast<char*>(this)); 110 Add(reinterpret_cast<char*>(this));
111 } 111 }
112 112
113 113
114 Bootstrapper::Bootstrapper() {
115 }
116
117
114 Handle<String> Bootstrapper::NativesSourceLookup(int index) { 118 Handle<String> Bootstrapper::NativesSourceLookup(int index) {
115 ASSERT(0 <= index && index < Natives::GetBuiltinsCount()); 119 ASSERT(0 <= index && index < Natives::GetBuiltinsCount());
116 if (HEAP->natives_source_cache()->get(index)->IsUndefined()) { 120 if (HEAP->natives_source_cache()->get(index)->IsUndefined()) {
117 if (!Snapshot::IsEnabled() || FLAG_new_snapshot) { 121 if (!Snapshot::IsEnabled() || FLAG_new_snapshot) {
118 // We can use external strings for the natives. 122 // We can use external strings for the natives.
119 NativesExternalStringResource* resource = 123 NativesExternalStringResource* resource =
120 new NativesExternalStringResource( 124 new NativesExternalStringResource(
121 Natives::GetScriptSource(index).start()); 125 Natives::GetScriptSource(index).start());
122 Handle<String> source_code = 126 Handle<String> source_code =
123 Factory::NewExternalStringFromAscii(resource); 127 Factory::NewExternalStringFromAscii(resource);
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 } 1810 }
1807 1811
1808 1812
1809 // Restore statics that are thread local. 1813 // Restore statics that are thread local.
1810 char* BootstrapperActive::RestoreState(char* from) { 1814 char* BootstrapperActive::RestoreState(char* from) {
1811 nesting_ = *reinterpret_cast<int*>(from); 1815 nesting_ = *reinterpret_cast<int*>(from);
1812 return from + sizeof(nesting_); 1816 return from + sizeof(nesting_);
1813 } 1817 }
1814 1818
1815 } } // namespace v8::internal 1819 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698