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

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

Issue 2771443003: [kernel] Fix getter, run service tests in debug mode (Closed)
Patch Set: Created 3 years, 9 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 | « runtime/observatory/tests/service/service_kernel.status ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "vm/kernel_to_il.h" 9 #include "vm/kernel_to_il.h"
10 10
(...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after
3544 // initialization) and then call the implicit getter. Thus, the getter 3544 // initialization) and then call the implicit getter. Thus, the getter
3545 // cannot contain the InitStaticField instruction that normal static getters 3545 // cannot contain the InitStaticField instruction that normal static getters
3546 // contain because it would detect spurious circular initialization when it 3546 // contain because it would detect spurious circular initialization when it
3547 // checks for the transition sentinel. 3547 // checks for the transition sentinel.
3548 Expression* initializer = kernel_field->initializer(); 3548 Expression* initializer = kernel_field->initializer();
3549 ASSERT(initializer != NULL); 3549 ASSERT(initializer != NULL);
3550 body += Constant(constant_evaluator_.EvaluateExpression(initializer)); 3550 body += Constant(constant_evaluator_.EvaluateExpression(initializer));
3551 } else { 3551 } else {
3552 // The field always has an initializer because static fields without 3552 // The field always has an initializer because static fields without
3553 // initializers are initialized eagerly and do not have implicit getters. 3553 // initializers are initialized eagerly and do not have implicit getters.
3554 ASSERT(field.has_initializer());
Kevin Millikin (Google) 2017/03/22 13:09:38 I think the ASSERT is indicating that something is
3555 body += Constant(field); 3554 body += Constant(field);
3556 body += InitStaticField(field); 3555 body += InitStaticField(field);
3557 body += Constant(field); 3556 body += Constant(field);
3558 body += LoadStaticField(); 3557 body += LoadStaticField();
3559 } 3558 }
3560 body += Return(TokenPosition::kNoSource); 3559 body += Return(TokenPosition::kNoSource);
3561 3560
3562 return new (Z) FlowGraph(*parsed_function_, graph_entry_, next_block_id_ - 1); 3561 return new (Z) FlowGraph(*parsed_function_, graph_entry_, next_block_id_ - 1);
3563 } 3562 }
3564 3563
(...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after
6443 thread->clear_sticky_error(); 6442 thread->clear_sticky_error();
6444 return error.raw(); 6443 return error.raw();
6445 } 6444 }
6446 } 6445 }
6447 6446
6448 6447
6449 } // namespace kernel 6448 } // namespace kernel
6450 } // namespace dart 6449 } // namespace dart
6451 6450
6452 #endif // !defined(DART_PRECOMPILED_RUNTIME) 6451 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/service_kernel.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698