WIP: thisbinding draft
authorDavid Teller <dteller@mozilla.com>
Sat, 05 Aug 2017 17:58:46 +0200
changeset 641383 470dc71503ead093d80b2cc49b18f2bd40f6c9d2
parent 641382 0909a011cb51c8ab0ac976cf47970987625ecee7
child 641384 1cda64878981601d5ed4204f9f25567a68831ce4
push id72504
push userdteller@mozilla.com
push dateSun, 06 Aug 2017 22:28:40 +0000
milestone57.0a1
WIP: thisbinding MozReview-Commit-ID: DFcE1wjZEqj
js/src/frontend/BinSource.cpp
--- a/js/src/frontend/BinSource.cpp
+++ b/js/src/frontend/BinSource.cpp
@@ -150,17 +150,19 @@ private:
     bool readString(SimpleTokenReader* reader, MutableHandleAtom);
     bool readString(SimpleTokenReader* reader, MutableHandle<PropertyName*>);
     bool readBool(SimpleTokenReader* reader, Maybe<bool>&);
     bool readNumber(SimpleTokenReader* reader, Maybe<double>&);
 
     const Directives& currentDirectives() const {
         return this->currentDirectives_;
     }
-    ThisBinding thisBinding() const;
+    ThisBinding thisBinding() const {
+        return this->thisBinding_;
+    }
     const ReadOnlyCompileOptions& options() const {
         return this->options_;
     }
 
     // Names
 
     // --- GC.
 
@@ -214,16 +216,17 @@ private:
 
     JS_DECLARE_NEW_METHODS(new_, allocParseNode, inline)
 
 private:
     const ReadOnlyCompileOptions& options_;
     JSContext* cx;
     LifoAlloc& alloc;
     Directives currentDirectives_;
+    ThisBinding thisBinding_;
 
     // Needs access to AutoGCRooter.
     friend void TraceBinParser(JSTracer* trc, AutoGCRooter* parser);
 };
 
 class BinParseContext: public ParseContext {
 public:
     BinParseContext(ASTReader*, GlobalSharedContext*, Directives*);