diff options
author | Steve Block <steveblock@google.com> | 2011-05-26 01:26:41 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-02 15:09:56 +0100 |
commit | 44f0eee88ff00398ff7f715fab053374d808c90d (patch) | |
tree | addd100e906cd43f843f3aaf64b445f17f46fe0f /src/compiler.h | |
parent | 1b63b9ad386abd62f61af0e29246a687f5311b53 (diff) | |
download | android_external_v8-44f0eee88ff00398ff7f715fab053374d808c90d.tar.gz android_external_v8-44f0eee88ff00398ff7f715fab053374d808c90d.tar.bz2 android_external_v8-44f0eee88ff00398ff7f715fab053374d808c90d.zip |
Update V8 to r7427: Initial merge by git
As required by WebKit r82507
Change-Id: I7ae83ef3f689356043b4929255b7c1dd31d8c5df
Diffstat (limited to 'src/compiler.h')
-rw-r--r-- | src/compiler.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/compiler.h b/src/compiler.h index e0a437ac..a66c5401 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -46,6 +46,10 @@ class CompilationInfo BASE_EMBEDDED { explicit CompilationInfo(Handle<SharedFunctionInfo> shared_info); explicit CompilationInfo(Handle<JSFunction> closure); + Isolate* isolate() { + ASSERT(Isolate::Current() == isolate_); + return isolate_; + } 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; } @@ -80,6 +84,12 @@ class CompilationInfo BASE_EMBEDDED { ASSERT(is_lazy()); flags_ |= IsInLoop::encode(true); } + void MarkAsAllowingNativesSyntax() { + flags_ |= IsNativesSyntaxAllowed::encode(true); + } + bool allows_natives_syntax() const { + return IsNativesSyntaxAllowed::decode(flags_); + } void SetFunction(FunctionLiteral* literal) { ASSERT(function_ == NULL); function_ = literal; @@ -136,6 +146,8 @@ class CompilationInfo BASE_EMBEDDED { } private: + Isolate* isolate_; + // Compilation mode. // BASE is generated by the full codegen, optionally prepared for bailouts. // OPTIMIZE is optimized code generated by the Hydrogen-based backend. @@ -174,6 +186,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> {}; + // Native syntax (%-stuff) allowed? + class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {}; unsigned flags_; @@ -278,8 +292,9 @@ class CompilationZoneScope : public ZoneScope { explicit CompilationZoneScope(ZoneScopeMode mode) : ZoneScope(mode) { } virtual ~CompilationZoneScope() { if (ShouldDeleteOnExit()) { - FrameElement::ClearConstantList(); - Result::ClearConstantList(); + Isolate* isolate = Isolate::Current(); + isolate->frame_element_constant_list()->Clear(); + isolate->result_constant_list()->Clear(); } } }; |