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

Side by Side Diff: src/compiler.h

Issue 6321007: Disable aggressive optimizations on the last optimization attempt. (Closed)
Patch Set: Review fixes Created 9 years, 11 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 | « no previous file | src/compiler.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // parameters which then can be executed. If the source code contains other 202 // parameters which then can be executed. If the source code contains other
203 // functions, they will be compiled and allocated as part of the compilation 203 // functions, they will be compiled and allocated as part of the compilation
204 // of the source code. 204 // of the source code.
205 205
206 // Please note this interface returns shared function infos. This means you 206 // Please note this interface returns shared function infos. This means you
207 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a 207 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a
208 // real function with a context. 208 // real function with a context.
209 209
210 class Compiler : public AllStatic { 210 class Compiler : public AllStatic {
211 public: 211 public:
212 // All routines return a JSFunction. 212 // Default maximum number of function optimization attempts before we
213 // If an error occurs an exception is raised and 213 // give up.
214 // the return handle contains NULL. 214 static const int kDefaultMaxOptCount = 10;
215
216 // All routines return a SharedFunctionInfo.
217 // If an error occurs an exception is raised and the return handle
218 // contains NULL.
215 219
216 // Compile a String source within a context. 220 // Compile a String source within a context.
217 static Handle<SharedFunctionInfo> Compile(Handle<String> source, 221 static Handle<SharedFunctionInfo> Compile(Handle<String> source,
218 Handle<Object> script_name, 222 Handle<Object> script_name,
219 int line_offset, 223 int line_offset,
220 int column_offset, 224 int column_offset,
221 v8::Extension* extension, 225 v8::Extension* extension,
222 ScriptDataImpl* pre_data, 226 ScriptDataImpl* pre_data,
223 Handle<Object> script_data, 227 Handle<Object> script_data,
224 NativesFlag is_natives_code); 228 NativesFlag is_natives_code);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 FrameElement::ClearConstantList(); 269 FrameElement::ClearConstantList();
266 Result::ClearConstantList(); 270 Result::ClearConstantList();
267 } 271 }
268 } 272 }
269 }; 273 };
270 274
271 275
272 } } // namespace v8::internal 276 } } // namespace v8::internal
273 277
274 #endif // V8_COMPILER_H_ 278 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698