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

Side by Side Diff: src/compiler.h

Issue 9207002: Add a deoptimization count to each function to limit number of re-compilations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
Jakob Kummerow 2012/01/16 11:41:25 nit: 2012
fschneider 2012/01/19 10:26:11 Done.
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
11 // with the distribution. 11 // with the distribution.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // of the source code. 269 // of the source code.
270 270
271 // Please note this interface returns shared function infos. This means you 271 // Please note this interface returns shared function infos. This means you
272 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a 272 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a
273 // real function with a context. 273 // real function with a context.
274 274
275 class Compiler : public AllStatic { 275 class Compiler : public AllStatic {
276 public: 276 public:
277 // Default maximum number of function optimization attempts before we 277 // Default maximum number of function optimization attempts before we
278 // give up. 278 // give up.
279 static const int kDefaultMaxOptCount = 10; 279 static const int kDefaultMaxDeoptCount = 10;
280 280
281 static const int kMaxInliningLevels = 3; 281 static const int kMaxInliningLevels = 3;
282 282
283 // All routines return a SharedFunctionInfo. 283 // All routines return a SharedFunctionInfo.
284 // If an error occurs an exception is raised and the return handle 284 // If an error occurs an exception is raised and the return handle
285 // contains NULL. 285 // contains NULL.
286 286
287 // Compile a String source within a context. 287 // Compile a String source within a context.
288 static Handle<SharedFunctionInfo> Compile(Handle<String> source, 288 static Handle<SharedFunctionInfo> Compile(Handle<String> source,
289 Handle<Object> script_name, 289 Handle<Object> script_name,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 323 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
324 CompilationInfo* info, 324 CompilationInfo* info,
325 Handle<SharedFunctionInfo> shared); 325 Handle<SharedFunctionInfo> shared);
326 }; 326 };
327 327
328 328
329 } } // namespace v8::internal 329 } } // namespace v8::internal
330 330
331 #endif // V8_COMPILER_H_ 331 #endif // V8_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698