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

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

Issue 2650703003: [parser]: Skipping inner funcs / initial implemetation of storing scope analysis data from preparse… (Closed)
Patch Set: code review (vogelheim) Created 3 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_PARSING_PREPARSED_SCOPE_DATA_H_
6 #define V8_PARSING_PREPARSED_SCOPE_DATA_H_
7
8 #include <vector>
9
10 #include "src/globals.h"
jochen (gone - plz use gerrit) 2017/01/25 11:16:01 for DISALLOW_COPY_AND_ASSIGN, you only need src/ba
marja 2017/01/25 11:50:29 For ScopeType I need globals.h.
11
12 namespace v8 {
13 namespace internal {
14
15 class PreParsedScopeData {
16 public:
17 PreParsedScopeData() : current_scope_(nullptr) {}
jochen (gone - plz use gerrit) 2017/01/25 11:16:01 nit. don't inline non-trivial ctors, and add a dto
marja 2017/01/25 11:50:29 Confused about this comment (in the context of one
18
19 class ScopeScope {
20 public:
21 ScopeScope(PreParsedScopeData* data, ScopeType scope_type,
22 int start_position, int end_position);
23 ~ScopeScope();
24
25 // TODO(marja): The functions for adding information about local variables
26 // will appear here.
27
28 private:
29 PreParsedScopeData* data_;
30 size_t index_in_data_;
31 ScopeScope* previous_scope_;
32
33 int inner_scope_count_;
34 int variable_count_;
35 DISALLOW_COPY_AND_ASSIGN(ScopeScope);
36 };
37
38 private:
39 friend class ScopeScope;
jochen (gone - plz use gerrit) 2017/01/25 11:16:01 nit, you don't need to friend inner classes
marja 2017/01/25 11:50:29 Done.
40 friend class ScopeTestHelper;
41
42 // TODO(marja): Make the backing store more efficient once we know exactly
43 // what data is needed.
44 std::vector<int> backing_store_;
45 ScopeScope* current_scope_;
jochen (gone - plz use gerrit) 2017/01/25 11:16:01 you can just declare this as ScopeScope* current_s
marja 2017/01/25 11:50:28 Done.
46
47 DISALLOW_COPY_AND_ASSIGN(PreParsedScopeData);
48 };
49
50 } // namespace internal
51 } // namespace v8
52
53 #endif // V8_PARSING_PREPARSED_SCOPE_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698