1. 26 Feb, 2015 1 commit
    • marja's avatar
      [strong] Declaration-after-use errors. · 1eddcf5b
      marja authored
      We cannot yet detect use-before-declaration in general, because for that we'd
      need to analyze the context when compiling. But we can detect an error case
      where we first see a use, then a declaration.
      
      For this, I also added end position tracking (needed for error messages) to
      VariableProxy.
      
      Note: the position naming is completely inconsistent: start_position &
      end_position, position & end_position, pos & end_pos, beg_pos & end_pos, to name
      a few. This doesn't fix all of it, but tries to unify towards start_position &
      end_position whenever possible w/ minimal changes.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/943543002
      
      Cr-Commit-Position: refs/heads/master@{#26880}
      1eddcf5b
  2. 17 Feb, 2015 1 commit
  3. 11 Feb, 2015 3 commits
  4. 12 Nov, 2014 1 commit
  5. 04 Aug, 2014 1 commit
  6. 30 Jul, 2014 1 commit
  7. 26 Jun, 2014 1 commit
  8. 24 Jun, 2014 1 commit
  9. 20 Jun, 2014 1 commit
  10. 18 Jun, 2014 1 commit
  11. 13 Jun, 2014 1 commit
  12. 03 Jun, 2014 1 commit
  13. 29 Apr, 2014 1 commit
  14. 02 Apr, 2014 1 commit
  15. 11 Mar, 2014 1 commit
  16. 28 Feb, 2013 1 commit
  17. 16 Nov, 2012 1 commit
  18. 29 Aug, 2012 1 commit
  19. 28 Aug, 2012 1 commit
    • rossberg@chromium.org's avatar
      Allocate block-scoped global bindings to global context. · ccc827a6
      rossberg@chromium.org authored
      - The global object has a reference to the current global scope chain.
        Running a script adds to the chain if it contains global lexical declarations.
      - Scripts are executed relative to a global, not a native context.
      - Harmony let and const bindings are allocated to the innermost global context;
        var and function still live on the global object.
        (Lexical bindings are not reflected on the global object at all,
        but that will probably change later using accessors, as for modules.)
      - Compilation of scripts now needs a (global) context (previously only eval did).
      - The global scope chain represents one logical scope, so collision tests take
        the chain into account.
      
      R=svenpanne@chromium.org
      BUG=
      
      Review URL: https://chromiumcodereview.appspot.com/10872084
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      ccc827a6
  20. 23 Aug, 2012 1 commit
  21. 08 Mar, 2012 1 commit
  22. 08 Nov, 2011 1 commit
    • keuchel@chromium.org's avatar
      Reapply r9870 "Remove some initialization checks based on source positions.". · 72dba271
      keuchel@chromium.org authored
      This reverts r9896 "Revert r9870 due to browser-test failures." See below for
      the diff from the previous version for the ia32 platform. The code for other
      platforms has been changed accordingly.
      
      TEST=mjsunit/compiler/lazy-const-lookup.js
      
      diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
      index 2cbf518..1990f2f 100644
      --- a/src/ia32/full-codegen-ia32.cc
      +++ b/src/ia32/full-codegen-ia32.cc
      @@ -1258,13 +1258,17 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
               // binding is initialized:
               //   function() { f(); let x = 1; function f() { x = 2; } }
               //
      -        // Check that we always have valid source position.
      -        ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
      -        ASSERT(proxy->position() != RelocInfo::kNoPosition);
      -        bool skip_init_check =
      -            var->mode() != CONST &&
      -            var->scope()->DeclarationScope() == scope()->DeclarationScope() &&
      -            var->initializer_position() < proxy->position();
      +        bool skip_init_check;
      +        if (var->scope()->DeclarationScope() != scope()->DeclarationScope()) {
      +          skip_init_check = false;
      +        } else {
      +          // Check that we always have valid source position.
      +          ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
      +          ASSERT(proxy->position() != RelocInfo::kNoPosition);
      +          skip_init_check = var->mode() != CONST &&
      +              var->initializer_position() < proxy->position();
      +        }
      +
               if (!skip_init_check) {
                 // Let and const need a read barrier.
                 Label done;
      
      Review URL: http://codereview.chromium.org/8479034
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      72dba271
  23. 07 Nov, 2011 1 commit
  24. 03 Nov, 2011 4 commits
  25. 31 Oct, 2011 1 commit
  26. 25 Oct, 2011 1 commit
  27. 17 Oct, 2011 1 commit
  28. 11 Oct, 2011 1 commit
  29. 14 Sep, 2011 1 commit
  30. 07 Sep, 2011 1 commit
  31. 16 Aug, 2011 1 commit
  32. 11 Aug, 2011 1 commit
  33. 16 Jun, 2011 2 commits
  34. 15 Jun, 2011 1 commit