| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index e0a437ac6de8419a777a631772a828796080f763..b5c20849ec07f14c5feb8e73e42162dde080ba41 100644
|
| --- a/src/compiler.h
|
| +++ b/src/compiler.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2010 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -80,6 +80,12 @@ class CompilationInfo BASE_EMBEDDED {
|
| ASSERT(is_lazy());
|
| flags_ |= IsInLoop::encode(true);
|
| }
|
| + void MarkAsNative() {
|
| + flags_ |= IsNative::encode(true);
|
| + }
|
| + bool is_native() const {
|
| + return IsNative::decode(flags_);
|
| + }
|
| void SetFunction(FunctionLiteral* literal) {
|
| ASSERT(function_ == NULL);
|
| function_ = literal;
|
| @@ -152,6 +158,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()) {
|
| MarkAsStrict();
|
| }
|
| @@ -174,6 +183,8 @@ class CompilationInfo BASE_EMBEDDED {
|
| class IsInLoop: public BitField<bool, 3, 1> {};
|
| // Strict mode - used in eager compilation.
|
| class IsStrict: public BitField<bool, 4, 1> {};
|
| + // Is this a function from our natives.
|
| + class IsNative: public BitField<bool, 6, 1> {};
|
|
|
| unsigned flags_;
|
|
|
|
|