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

Side by Side Diff: src/ast/variables.cc

Issue 2394403002: [cleanup] Remove dead code from Variable and simplify PatternRewriter slightly (Closed)
Patch Set: Created 4 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/ast/variables.h ('k') | src/parsing/parser.h » ('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/ast/variables.h" 5 #include "src/ast/variables.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/globals.h" 8 #include "src/globals.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 22 matching lines...) Expand all
33 33
34 34
35 bool Variable::IsGlobalObjectProperty() const { 35 bool Variable::IsGlobalObjectProperty() const {
36 // Temporaries are never global, they must always be allocated in the 36 // Temporaries are never global, they must always be allocated in the
37 // activation frame. 37 // activation frame.
38 return (IsDynamicVariableMode(mode()) || 38 return (IsDynamicVariableMode(mode()) ||
39 (IsDeclaredVariableMode(mode()) && !IsLexicalVariableMode(mode()))) && 39 (IsDeclaredVariableMode(mode()) && !IsLexicalVariableMode(mode()))) &&
40 scope_ != NULL && scope_->is_script_scope(); 40 scope_ != NULL && scope_->is_script_scope();
41 } 41 }
42 42
43
44 bool Variable::IsStaticGlobalObjectProperty() const {
45 // Temporaries are never global, they must always be allocated in the
46 // activation frame.
47 return (IsDeclaredVariableMode(mode()) && !IsLexicalVariableMode(mode())) &&
48 scope_ != NULL && scope_->is_script_scope();
49 }
50
51
52 } // namespace internal 43 } // namespace internal
53 } // namespace v8 44 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/variables.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698