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

Unified Diff: src/objects.h

Issue 7572019: Fix a bug in scope analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix a bug. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | src/parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698