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

Side by Side Diff: src/parsing/preparsed-scope-data.cc

Issue 2655623005: [parser] Skipping inner funcs: add info about variables. (Closed)
Patch Set: create variables only when the flag is on Created 3 years, 10 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
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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/parsing/preparsed-scope-data.h" 5 #include "src/parsing/preparsed-scope-data.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 PreParsedScopeData::ScopeScope::ScopeScope(PreParsedScopeData* data, 10 PreParsedScopeData::ScopeScope::ScopeScope(PreParsedScopeData* data,
(...skipping 17 matching lines...) Expand all
28 data->backing_store_.push_back(-1); 28 data->backing_store_.push_back(-1);
29 data->backing_store_.push_back(-1); 29 data->backing_store_.push_back(-1);
30 } 30 }
31 31
32 PreParsedScopeData::ScopeScope::~ScopeScope() { 32 PreParsedScopeData::ScopeScope::~ScopeScope() {
33 data_->current_scope_ = previous_scope_; 33 data_->current_scope_ = previous_scope_;
34 data_->backing_store_[index_in_data_] = inner_scope_count_; 34 data_->backing_store_[index_in_data_] = inner_scope_count_;
35 data_->backing_store_[index_in_data_ + 1] = variable_count_; 35 data_->backing_store_[index_in_data_ + 1] = variable_count_;
36 } 36 }
37 37
38 void PreParsedScopeData::ScopeScope::AddVariable(VariableLocation location,
39 bool maybe_assigned) {
40 data_->backing_store_.push_back(location);
41 data_->backing_store_.push_back(maybe_assigned);
42 ++variable_count_;
43 }
44
38 } // namespace internal 45 } // namespace internal
39 } // namespace v8 46 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698