Chromium Code Reviews| Index: src/objects.h |
| =================================================================== |
| --- src/objects.h (revision 10399) |
| +++ src/objects.h (working copy) |
| @@ -5110,8 +5110,8 @@ |
| // A counter used to determine when to stress the deoptimizer with a |
| // deopt. |
| - inline Smi* deopt_counter(); |
| - inline void set_deopt_counter(Smi* counter); |
| + inline Smi* stress_deopt_counter(); |
| + inline void set_stress_deopt_counter(Smi* counter); |
| // Add information on assignments of the form this.x = ...; |
| void SetThisPropertyAssignmentsInfo( |
| @@ -5193,10 +5193,10 @@ |
| void EnableDeoptimizationSupport(Code* recompiled); |
| // Disable (further) attempted optimization of all functions sharing this |
|
Jakob Kummerow
2012/01/16 11:41:25
nit: truncated comment (missing "shared function i
fschneider
2012/01/19 10:26:11
Done.
|
| - // shared function info. The function is the one we actually tried to |
| - // optimize. |
| - void DisableOptimization(JSFunction* function); |
| + void DisableOptimization(); |
| + void IncrementAndCheckDeoptCount(); |
| + |
| // Lookup the bailout ID and ASSERT that it exists in the non-optimized |
| // code, returns whether it asserted (i.e., always true if assertions are |
| // disabled). |
| @@ -5224,8 +5224,8 @@ |
| bool HasSourceCode(); |
| Object* GetSourceCode(); |
| - inline int opt_count(); |
| - inline void set_opt_count(int opt_count); |
| + inline int deopt_count(); |
| + inline void set_deopt_count(int deopt_count); |
| // Source size of this function. |
| int SourceSize(); |
| @@ -5249,6 +5249,10 @@ |
| void SharedFunctionInfoVerify(); |
| #endif |
| + // Prints the name of the function using PrintF. |
| + void PrintName() { PrintName(stdout); } |
| + void PrintName(FILE* out); |
| + |
| // Helpers to compile the shared code. Returns true on success, false on |
| // failure (e.g., stack overflow during compilation). |
| static bool EnsureCompiled(Handle<SharedFunctionInfo> shared, |
| @@ -5300,10 +5304,10 @@ |
| kFunctionTokenPositionOffset + kPointerSize; |
| static const int kThisPropertyAssignmentsCountOffset = |
| kCompilerHintsOffset + kPointerSize; |
| - static const int kOptCountOffset = |
| + static const int kDeoptCountOffset = |
| kThisPropertyAssignmentsCountOffset + kPointerSize; |
| // Total size. |
| - static const int kSize = kOptCountOffset + kPointerSize; |
| + static const int kSize = kDeoptCountOffset + kPointerSize; |
| #else |
| // The only reason to use smi fields instead of int fields |
| // is to allow iteration without maps decoding during |
| @@ -5336,11 +5340,11 @@ |
| static const int kThisPropertyAssignmentsCountOffset = |
| kCompilerHintsOffset + kIntSize; |
| - static const int kOptCountOffset = |
| + static const int kDeoptCountOffset = |
| kThisPropertyAssignmentsCountOffset + kIntSize; |
| // Total size. |
| - static const int kSize = kOptCountOffset + kIntSize; |
| + static const int kSize = kDeoptCountOffset + kIntSize; |
| #endif |
| @@ -5563,10 +5567,8 @@ |
| DECL_ACCESSORS(next_function_link, Object) |
| // Prints the name of the function using PrintF. |
| - inline void PrintName() { |
| - PrintName(stdout); |
| - } |
| - void PrintName(FILE* out); |
| + void PrintName() { PrintName(stdout); } |
| + void PrintName(FILE* out) { shared()->PrintName(out); } |
| // Casting. |
| static inline JSFunction* cast(Object* obj); |