Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index 44ac9c85ce385083f4ce6905c832529eef9c2fb6..9f3752342768ef3f29454cc7c5f2556e9f1a600a 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -49,6 +49,7 @@ class CompilationInfo BASE_EMBEDDED { |
| bool is_lazy() const { return (flags_ & IsLazy::mask()) != 0; } |
| bool is_eval() const { return (flags_ & IsEval::mask()) != 0; } |
| bool is_global() const { return (flags_ & IsGlobal::mask()) != 0; } |
| + bool is_strict() const { return (flags_ & IsStrict::mask()) != 0; } |
| bool is_in_loop() const { return (flags_ & IsInLoop::mask()) != 0; } |
| FunctionLiteral* function() const { return function_; } |
| Scope* scope() const { return scope_; } |
| @@ -69,6 +70,10 @@ class CompilationInfo BASE_EMBEDDED { |
| ASSERT(!is_lazy()); |
| flags_ |= IsGlobal::encode(true); |
| } |
| + void MarkAsStrict() { |
| + ASSERT(!is_lazy()); |
| + flags_ |= IsStrict::encode(true); |
| + } |
| void MarkAsInLoop() { |
| ASSERT(is_lazy()); |
| flags_ |= IsInLoop::encode(true); |
| @@ -160,6 +165,7 @@ class CompilationInfo BASE_EMBEDDED { |
| // Flags that can be set for eager compilation. |
| class IsEval: public BitField<bool, 1, 1> {}; |
| class IsGlobal: public BitField<bool, 2, 1> {}; |
| + class IsStrict: public BitField<bool, 4, 1> {}; |
|
Lasse Reichstein
2011/02/03 12:36:01
Move it below IsInLoop, to keep bits in order.
Martin Maly
2011/02/04 01:02:34
Done. Added comment to clarify that IsStrict is us
|
| // Flags that can be set for lazy compilation. |
| class IsInLoop: public BitField<bool, 3, 1> {}; |
| @@ -230,7 +236,8 @@ class Compiler : public AllStatic { |
| // Compile a String source within a context for Eval. |
| static Handle<SharedFunctionInfo> CompileEval(Handle<String> source, |
| Handle<Context> context, |
| - bool is_global); |
| + bool is_global, |
| + bool is_strict); |
| // Compile from function info (used for lazy compilation). Returns true on |
| // success and false if the compilation resulted in a stack overflow. |