Bug 1055337 - Fix up comment per review (r=jorendorff)

--HG--
extra : rebase_source : f1ae705106b5401340f262981df1cf5889a87f38
This commit is contained in:
Luke Wagner 2014-08-29 16:09:08 -05:00
Родитель abe53c3109
Коммит 14b9dabdd8
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -245,8 +245,8 @@ class FunctionBox : public ObjectBox, public SharedContext
bool inWith:1; /* some enclosing scope is a with-statement */ bool inWith:1; /* some enclosing scope is a with-statement */
bool inGenexpLambda:1; /* lambda from generator expression */ bool inGenexpLambda:1; /* lambda from generator expression */
bool hasDestructuringArgs:1; /* arguments list contains destructuring expression */ bool hasDestructuringArgs:1; /* arguments list contains destructuring expression */
bool useAsm:1; /* function contains "use asm" directive */ bool useAsm:1; /* see useAsmOrInsideUseAsm */
bool insideUseAsm:1; /* nested function of function of "use asm" directive */ bool insideUseAsm:1; /* see useAsmOrInsideUseAsm */
// Fields for use in heuristics. // Fields for use in heuristics.
bool usesArguments:1; /* contains a free use of 'arguments' */ bool usesArguments:1; /* contains a free use of 'arguments' */
@ -292,8 +292,11 @@ class FunctionBox : public ObjectBox, public SharedContext
return length != function()->nargs() - function()->hasRest(); return length != function()->nargs() - function()->hasRest();
} }
// Return whether this function has either specified "use asm" or is // Return whether this or an enclosing function is being parsed and
// (transitively) nested inside a function that has. // validated as asm.js. Note: if asm.js validation fails, this will be false
// while the function is being reparsed. This flag can be used to disable
// certain parsing features that are necessary in general, but unnecessary
// for validated asm.js.
bool useAsmOrInsideUseAsm() const { bool useAsmOrInsideUseAsm() const {
return useAsm || insideUseAsm; return useAsm || insideUseAsm;
} }