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

Side by Side Diff: runtime/vm/ast.cc

Issue 10832126: Store pointer instead of reference to LocalVariable in ast and flow graph. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_printer_test.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include "vm/ast.h" 5 #include "vm/ast.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 10
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 295
296 AstNode* LoadLocalNode::MakeAssignmentNode(AstNode* rhs) { 296 AstNode* LoadLocalNode::MakeAssignmentNode(AstNode* rhs) {
297 if (local().is_final()) { 297 if (local().is_final()) {
298 return NULL; 298 return NULL;
299 } 299 }
300 if (HasPseudo()) { 300 if (HasPseudo()) {
301 return NULL; 301 return NULL;
302 } 302 }
303 return new StoreLocalNode(token_pos(), local(), rhs); 303 return new StoreLocalNode(token_pos(), &local(), rhs);
304 } 304 }
305 305
306 306
307 AstNode* LoadStaticFieldNode::MakeAssignmentNode(AstNode* rhs) { 307 AstNode* LoadStaticFieldNode::MakeAssignmentNode(AstNode* rhs) {
308 return new StoreStaticFieldNode(token_pos(), field(), rhs); 308 return new StoreStaticFieldNode(token_pos(), field(), rhs);
309 } 309 }
310 310
311 311
312 AstNode* InstanceGetterNode::MakeAssignmentNode(AstNode* rhs) { 312 AstNode* InstanceGetterNode::MakeAssignmentNode(AstNode* rhs) {
313 return new InstanceSetterNode(token_pos(), receiver(), field_name(), rhs); 313 return new InstanceSetterNode(token_pos(), receiver(), field_name(), rhs);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (result.IsError() || result.IsNull()) { 371 if (result.IsError() || result.IsNull()) {
372 // TODO(turnidge): We could get better error messages by returning 372 // TODO(turnidge): We could get better error messages by returning
373 // the Error object directly to the parser. This will involve 373 // the Error object directly to the parser. This will involve
374 // replumbing all of the EvalConstExpr methods. 374 // replumbing all of the EvalConstExpr methods.
375 return NULL; 375 return NULL;
376 } 376 }
377 return &Instance::ZoneHandle(Instance::Cast(result).raw()); 377 return &Instance::ZoneHandle(Instance::Cast(result).raw());
378 } 378 }
379 379
380 } // namespace dart 380 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_printer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698