diff options
| author | Ben Murdoch <benm@google.com> | 2011-10-20 14:36:23 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-10-20 14:37:16 +0100 |
| commit | 203a29f4f37141ddcebc5015e4d3ab2100f2ee45 (patch) | |
| tree | babb7cf58c7206b5543f3179e3558d16a2e862a5 /src/compiler.h | |
| parent | afcf6d0da905bea0fdfb8b2c48629777819d4370 (diff) | |
| download | android_external_v8-203a29f4f37141ddcebc5015e4d3ab2100f2ee45.tar.gz android_external_v8-203a29f4f37141ddcebc5015e4d3ab2100f2ee45.tar.bz2 android_external_v8-203a29f4f37141ddcebc5015e4d3ab2100f2ee45.zip | |
Merge V8 at r9719: Roll to 3.2.10.39
Bug: 5483703
Change-Id: Idd0a6e0d51047cdd5a87eb745ca41e4994645ea2
Diffstat (limited to 'src/compiler.h')
| -rw-r--r-- | src/compiler.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/compiler.h b/src/compiler.h index e75e8695..a6a0d903 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); @@ -163,6 +163,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(); } @@ -185,8 +188,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_; |
