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

Side by Side Diff: runtime/vm/parser.h

Issue 1528873002: VM: Use read-only handle Object::dynamic_type() where possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/parser.cc » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_PARSER_H_ 5 #ifndef VM_PARSER_H_
6 #define VM_PARSER_H_ 6 #define VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 first_parameter_index_(0), 56 first_parameter_index_(0),
57 first_stack_local_index_(0), 57 first_stack_local_index_(0),
58 num_copied_params_(0), 58 num_copied_params_(0),
59 num_stack_locals_(0), 59 num_stack_locals_(0),
60 have_seen_await_expr_(false) { 60 have_seen_await_expr_(false) {
61 ASSERT(function.IsZoneHandle()); 61 ASSERT(function.IsZoneHandle());
62 // Every function has a local variable for the current context. 62 // Every function has a local variable for the current context.
63 LocalVariable* temp = new(zone()) LocalVariable( 63 LocalVariable* temp = new(zone()) LocalVariable(
64 function.token_pos(), 64 function.token_pos(),
65 Symbols::CurrentContextVar(), 65 Symbols::CurrentContextVar(),
66 Type::ZoneHandle(zone(), Type::DynamicType())); 66 Object::dynamic_type());
67 ASSERT(temp != NULL); 67 ASSERT(temp != NULL);
68 current_context_var_ = temp; 68 current_context_var_ = temp;
69 } 69 }
70 70
71 const Function& function() const { return function_; } 71 const Function& function() const { return function_; }
72 const Code& code() const { return code_; } 72 const Code& code() const { return code_; }
73 73
74 SequenceNode* node_sequence() const { return node_sequence_; } 74 SequenceNode* node_sequence() const { return node_sequence_; }
75 void SetNodeSequence(SequenceNode* node_sequence); 75 void SetNodeSequence(SequenceNode* node_sequence);
76 76
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 890
891 // Indentation of parser trace. 891 // Indentation of parser trace.
892 intptr_t trace_indent_; 892 intptr_t trace_indent_;
893 893
894 DISALLOW_COPY_AND_ASSIGN(Parser); 894 DISALLOW_COPY_AND_ASSIGN(Parser);
895 }; 895 };
896 896
897 } // namespace dart 897 } // namespace dart
898 898
899 #endif // VM_PARSER_H_ 899 #endif // VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698