Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/variables.cc

Issue 1382513003: Test for var declarations in eval which conflict with let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mask out eval bit Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/variables.h ('k') | test/mjsunit/harmony/block-eval-var-over-legacy-const.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/variables.h" 5 #include "src/variables.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/scopes.h" 8 #include "src/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 26 matching lines...) Expand all
37 name_(name), 37 name_(name),
38 mode_(mode), 38 mode_(mode),
39 kind_(kind), 39 kind_(kind),
40 location_(VariableLocation::UNALLOCATED), 40 location_(VariableLocation::UNALLOCATED),
41 index_(-1), 41 index_(-1),
42 initializer_position_(RelocInfo::kNoPosition), 42 initializer_position_(RelocInfo::kNoPosition),
43 has_strong_mode_reference_(false), 43 has_strong_mode_reference_(false),
44 strong_mode_reference_start_position_(RelocInfo::kNoPosition), 44 strong_mode_reference_start_position_(RelocInfo::kNoPosition),
45 strong_mode_reference_end_position_(RelocInfo::kNoPosition), 45 strong_mode_reference_end_position_(RelocInfo::kNoPosition),
46 local_if_not_shadowed_(NULL), 46 local_if_not_shadowed_(NULL),
47 is_from_eval_(false),
47 force_context_allocation_(false), 48 force_context_allocation_(false),
48 is_used_(false), 49 is_used_(false),
49 initialization_flag_(initialization_flag), 50 initialization_flag_(initialization_flag),
50 maybe_assigned_(maybe_assigned_flag) { 51 maybe_assigned_(maybe_assigned_flag) {
51 // Var declared variables never need initialization. 52 // Var declared variables never need initialization.
52 DCHECK(!(mode == VAR && initialization_flag == kNeedsInitialization)); 53 DCHECK(!(mode == VAR && initialization_flag == kNeedsInitialization));
53 } 54 }
54 55
55 56
56 bool Variable::IsGlobalObjectProperty() const { 57 bool Variable::IsGlobalObjectProperty() const {
(...skipping 15 matching lines...) Expand all
72 73
73 int Variable::CompareIndex(Variable* const* v, Variable* const* w) { 74 int Variable::CompareIndex(Variable* const* v, Variable* const* w) {
74 int x = (*v)->index(); 75 int x = (*v)->index();
75 int y = (*w)->index(); 76 int y = (*w)->index();
76 // Consider sorting them according to type as well? 77 // Consider sorting them according to type as well?
77 return x - y; 78 return x - y;
78 } 79 }
79 80
80 } // namespace internal 81 } // namespace internal
81 } // namespace v8 82 } // namespace v8
OLDNEW
« no previous file with comments | « src/variables.h ('k') | test/mjsunit/harmony/block-eval-var-over-legacy-const.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698