Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index 4eb33e2976f3634412a1f311015f8f700244ed04..a02ed1d777b5ddc22d25d83b6e4b79fafd17bdab 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -89,6 +89,12 @@ class CompilationInfo BASE_EMBEDDED { |
| bool allows_natives_syntax() const { |
| return IsNativesSyntaxAllowed::decode(flags_); |
| } |
| + void MarkAsES5Native() { |
|
Lasse Reichstein
2011/05/26 08:26:55
Why ES5Native and not just Native?
Is there any na
Mads Ager (chromium)
2011/05/26 10:14:07
Following naming elsewhere to not have two names f
|
| + flags_ |= IsES5Native::encode(true); |
| + } |
| + bool is_es5_native() const { |
| + return IsES5Native::decode(flags_); |
| + } |
| void SetFunction(FunctionLiteral* literal) { |
| ASSERT(function_ == NULL); |
| function_ = literal; |
| @@ -167,9 +173,11 @@ class CompilationInfo BASE_EMBEDDED { |
| void Initialize(Mode mode) { |
| mode_ = V8::UseCrankshaft() ? mode : NONOPT; |
| - if (!shared_info_.is_null() && shared_info_->strict_mode()) { |
| - MarkAsStrictMode(); |
| + if (!shared_info_.is_null()) { |
| + if (shared_info_->strict_mode()) MarkAsStrictMode(); |
| + if (shared_info_->es5_native()) MarkAsES5Native(); |
| } |
| + |
| } |
| void SetMode(Mode mode) { |
| @@ -191,6 +199,9 @@ class CompilationInfo BASE_EMBEDDED { |
| class IsStrictMode: public BitField<bool, 4, 1> {}; |
| // Native syntax (%-stuff) allowed? |
| class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {}; |
| + // Is this a function from our natives. |
| + class IsES5Native: public BitField<bool, 6, 1> {}; |
| + |
| unsigned flags_; |