Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 79ce093245145580d12fca4be5a0179f71cf7293..97d2cb8fb11e94117ba80f6b4fe8e16b16ee3855 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -4732,6 +4732,13 @@ class SharedFunctionInfo: public HeapObject { |
| inline bool native(); |
| inline void set_native(bool value); |
| + // Indicates that the function was created by the Function function. |
| + // Though it's anonymous, toString should treat it as if it had the name |
| + // "anonymous". We don't set the name itself so that the system does not |
| + // see a binding for it. |
| + inline bool name_should_print_as_anonymous(); |
| + inline void set_name_should_print_as_anonymous(bool flag); |
| + |
| // Indicates whether the function is a bound function created using |
| // the bind function. |
| inline bool bound(); |
| @@ -4917,7 +4924,6 @@ class SharedFunctionInfo: public HeapObject { |
| // Bit positions in compiler_hints. |
| static const int kCodeAgeSize = 3; |
| static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1; |
| - static const int kBoundFunction = 9; |
|
Kevin Millikin (Chromium)
2011/08/04 16:32:09
Strange that this worked. I guess we don't really
|
| enum CompilerHints { |
| kHasOnlySimpleThisPropertyAssignments, |
| @@ -4928,7 +4934,10 @@ class SharedFunctionInfo: public HeapObject { |
| kStrictModeFunction, |
| kUsesArguments, |
| kHasDuplicateParameters, |
| - kNative |
| + kNative, |
| + kBoundFunction, |
| + kNameShouldPrintAsAnonymous, |
| + kCompilerHintsCount // Pseudo entry |
| }; |
| private: |
| @@ -4942,6 +4951,9 @@ class SharedFunctionInfo: public HeapObject { |
| static const int kCompilerHintsSize = kIntSize; |
| #endif |
| + STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <= |
| + SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte); |
| + |
| public: |
| // Constants for optimizing codegen for strict mode function and |
| // native tests. |