| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index 4eb33e2976f3634412a1f311015f8f700244ed04..ea74d60db6f4034595b7ecbfebaab4571264b560 100644
|
| --- a/src/compiler.h
|
| +++ b/src/compiler.h
|
| @@ -83,11 +83,11 @@ class CompilationInfo BASE_EMBEDDED {
|
| ASSERT(is_lazy());
|
| flags_ |= IsInLoop::encode(true);
|
| }
|
| - void MarkAsAllowingNativesSyntax() {
|
| - flags_ |= IsNativesSyntaxAllowed::encode(true);
|
| + void MarkAsNative() {
|
| + flags_ |= IsNative::encode(true);
|
| }
|
| - bool allows_natives_syntax() const {
|
| - return IsNativesSyntaxAllowed::decode(flags_);
|
| + bool is_native() const {
|
| + return IsNative::decode(flags_);
|
| }
|
| void SetFunction(FunctionLiteral* literal) {
|
| ASSERT(function_ == NULL);
|
| @@ -167,6 +167,9 @@ class CompilationInfo BASE_EMBEDDED {
|
|
|
| void Initialize(Mode mode) {
|
| mode_ = V8::UseCrankshaft() ? mode : NONOPT;
|
| + if (script_->type()->value() == Script::TYPE_NATIVE) {
|
| + MarkAsNative();
|
| + }
|
| if (!shared_info_.is_null() && shared_info_->strict_mode()) {
|
| MarkAsStrictMode();
|
| }
|
| @@ -189,8 +192,8 @@ class CompilationInfo BASE_EMBEDDED {
|
| class IsInLoop: public BitField<bool, 3, 1> {};
|
| // Strict mode - used in eager compilation.
|
| 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 IsNative: public BitField<bool, 6, 1> {};
|
|
|
| unsigned flags_;
|
|
|
|
|