• keuchel@chromium.org's avatar
    Introduce extended mode. · 1e9a7267
    keuchel@chromium.org authored
    This CL introduces a third mode next to the non-strict
    (henceforth called 'classic mode') and 'strict mode'
    which is called 'extended mode' as in the current
    ES.next specification drafts. The extended mode is based on
    the 'strict mode' and adds new functionality to it. This
    means that most of the semantics of these two modes
    coincide.
    
    The 'extended mode' is entered instead of the 'strict mode'
    during parsing when using the 'strict mode' directive
    "use strict" and when the the harmony-scoping flag is
    active. This should be changed once it is fully specified how the 'extended mode' is entered.
    
    This change introduces a new 3 valued enum LanguageMode
    (see globals.h) corresponding to the modes which is mostly
    used by the frontend code. This includes the following
    components:
    * (Pre)Parser
    * Compiler
    * SharedFunctionInfo, Scope and ScopeInfo
    * runtime functions: StoreContextSlot,
      ResolvePossiblyDirectEval, InitializeVarGlobal,
      DeclareGlobals
    
    The old enum StrictModeFlag is still used in the backend
    when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
    * SetProperty runtime function, Delete builtin
    * StoreIC and KeyedStoreIC
    * StubCache
    
    Review URL: http://codereview.chromium.org/8417035
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    1e9a7267
accessors.cc 22.1 KB