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

Side by Side Diff: src/d8.h

Issue 7219003: removed some unnecessary stuff from d8's initialization (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: corrected the behavior of when to launch interactive shell Created 9 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 | « no previous file | src/d8.cc » ('j') | src/d8.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 static void ReportException(TryCatch* try_catch); 122 static void ReportException(TryCatch* try_catch);
123 static void OnExit(); 123 static void OnExit();
124 static int* LookupCounter(const char* name); 124 static int* LookupCounter(const char* name);
125 static void* CreateHistogram(const char* name, 125 static void* CreateHistogram(const char* name,
126 int min, 126 int min,
127 int max, 127 int max,
128 size_t buckets); 128 size_t buckets);
129 static void AddHistogramSample(void* histogram, int sample); 129 static void AddHistogramSample(void* histogram, int sample);
130 static void MapCounters(const char* name); 130 static void MapCounters(const char* name);
131 static Handle<String> ReadFile(const char* name); 131 static Handle<String> ReadFile(const char* name);
132 static void Initialize(); 132 static void Initialize(bool test_shell);
133 static void RenewEvaluationContext(); 133 static void RenewEvaluationContext();
134 static void InstallUtilityScript(); 134 static void InstallUtilityScript();
135 static void RunShell(); 135 static void RunShell();
136 static int RunScript(char* filename); 136 static int RunScript(char* filename);
137 static int RunMain(int argc, char* argv[]); 137 static int RunMain(int argc, char* argv[], bool* executed);
138 static int Main(int argc, char* argv[]); 138 static int Main(int argc, char* argv[]);
139 static Handle<ObjectTemplate> CreateGlobalTemplate(); 139 static Handle<ObjectTemplate> CreateGlobalTemplate();
140 static Handle<Array> GetCompletions(Handle<String> text, 140 static Handle<Array> GetCompletions(Handle<String> text,
141 Handle<String> full); 141 Handle<String> full);
142 #ifdef ENABLE_DEBUGGER_SUPPORT 142 #ifdef ENABLE_DEBUGGER_SUPPORT
143 static Handle<Object> DebugMessageDetails(Handle<String> message); 143 static Handle<Object> DebugMessageDetails(Handle<String> message);
144 static Handle<Value> DebugCommandToJSONRequest(Handle<String> command); 144 static Handle<Value> DebugCommandToJSONRequest(Handle<String> command);
145 #endif 145 #endif
146 146
147 #ifdef WIN32 147 #ifdef WIN32
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 static Handle<Value> System(const Arguments& args); 195 static Handle<Value> System(const Arguments& args);
196 static Handle<Value> ChangeDirectory(const Arguments& args); 196 static Handle<Value> ChangeDirectory(const Arguments& args);
197 static Handle<Value> SetEnvironment(const Arguments& args); 197 static Handle<Value> SetEnvironment(const Arguments& args);
198 static Handle<Value> UnsetEnvironment(const Arguments& args); 198 static Handle<Value> UnsetEnvironment(const Arguments& args);
199 static Handle<Value> SetUMask(const Arguments& args); 199 static Handle<Value> SetUMask(const Arguments& args);
200 static Handle<Value> MakeDirectory(const Arguments& args); 200 static Handle<Value> MakeDirectory(const Arguments& args);
201 static Handle<Value> RemoveDirectory(const Arguments& args); 201 static Handle<Value> RemoveDirectory(const Arguments& args);
202 202
203 static void AddOSMethods(Handle<ObjectTemplate> os_template); 203 static void AddOSMethods(Handle<ObjectTemplate> os_template);
204 204
205 static Handle<Context> utility_context() { return utility_context_; }
206
207 static const char* kHistoryFileName; 205 static const char* kHistoryFileName;
208 static const char* kPrompt; 206 static const char* kPrompt;
209 207
210 private: 208 private:
211 static Persistent<Context> utility_context_; 209 static Persistent<Context> utility_context_;
212 static Persistent<Context> evaluation_context_; 210 static Persistent<Context> evaluation_context_;
213 static CounterMap* counter_map_; 211 static CounterMap* counter_map_;
214 // We statically allocate a set of local counters to be used if we 212 // We statically allocate a set of local counters to be used if we
215 // don't want to store the stats in a memory-mapped file 213 // don't want to store the stats in a memory-mapped file
216 static CounterCollection local_counters_; 214 static CounterCollection local_counters_;
(...skipping 25 matching lines...) Expand all
242 const char* name_; 240 const char* name_;
243 LineEditor* next_; 241 LineEditor* next_;
244 static LineEditor* first_; 242 static LineEditor* first_;
245 }; 243 };
246 244
247 245
248 } // namespace v8 246 } // namespace v8
249 247
250 248
251 #endif // V8_D8_H_ 249 #endif // V8_D8_H_
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | src/d8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698