| Index: src/compiler.h
|
| ===================================================================
|
| --- src/compiler.h (revision 8618)
|
| +++ src/compiler.h (working copy)
|
| @@ -89,6 +89,12 @@
|
| bool allows_natives_syntax() const {
|
| return IsNativesSyntaxAllowed::decode(flags_);
|
| }
|
| + void MarkAsNative() {
|
| + flags_ |= IsNative::encode(true);
|
| + }
|
| + bool is_native() const {
|
| + return IsNative::decode(flags_);
|
| + }
|
| void SetFunction(FunctionLiteral* literal) {
|
| ASSERT(function_ == NULL);
|
| function_ = literal;
|
| @@ -167,8 +173,9 @@
|
|
|
| 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_->native()) MarkAsNative();
|
| }
|
| }
|
|
|
| @@ -191,7 +198,10 @@
|
| 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_;
|
|
|
| // Fields filled in by the compilation pipeline.
|
| @@ -289,24 +299,6 @@
|
| };
|
|
|
|
|
| -// During compilation we need a global list of handles to constants
|
| -// for frame elements. When the zone gets deleted, we make sure to
|
| -// clear this list of handles as well.
|
| -class CompilationZoneScope : public ZoneScope {
|
| - public:
|
| - CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode)
|
| - : ZoneScope(isolate, mode) {}
|
| -
|
| - virtual ~CompilationZoneScope() {
|
| - if (ShouldDeleteOnExit()) {
|
| - Isolate* isolate = Isolate::Current();
|
| - isolate->frame_element_constant_list()->Clear();
|
| - isolate->result_constant_list()->Clear();
|
| - }
|
| - }
|
| -};
|
| -
|
| -
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_COMPILER_H_
|
|
|