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

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

Issue 19287003: Use proper internal name for implicit static final getters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/debugger.cc ('k') | runtime/vm/mirrors_api_impl.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 #include "vm/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 Append(for_effect); 795 Append(for_effect);
796 if (!is_open()) return; 796 if (!is_open()) return;
797 } 797 }
798 798
799 Value* return_value = for_value.value(); 799 Value* return_value = for_value.value();
800 if (FLAG_enable_type_checks) { 800 if (FLAG_enable_type_checks) {
801 const Function& function = owner()->parsed_function()->function(); 801 const Function& function = owner()->parsed_function()->function();
802 const bool is_implicit_dynamic_getter = 802 const bool is_implicit_dynamic_getter =
803 (!function.is_static() && 803 (!function.is_static() &&
804 ((function.kind() == RawFunction::kImplicitGetter) || 804 ((function.kind() == RawFunction::kImplicitGetter) ||
805 (function.kind() == RawFunction::kConstImplicitGetter))); 805 (function.kind() == RawFunction::kImplicitStaticFinalGetter)));
806 // Implicit getters do not need a type check at return, unless they compute 806 // Implicit getters do not need a type check at return, unless they compute
807 // the initial value of a static field. 807 // the initial value of a static field.
808 // The body of a constructor cannot modify the type of the 808 // The body of a constructor cannot modify the type of the
809 // constructed instance, which is passed in as an implicit parameter. 809 // constructed instance, which is passed in as an implicit parameter.
810 // However, factories may create an instance of the wrong type. 810 // However, factories may create an instance of the wrong type.
811 if (!is_implicit_dynamic_getter && !function.IsConstructor()) { 811 if (!is_implicit_dynamic_getter && !function.IsConstructor()) {
812 const AbstractType& dst_type = 812 const AbstractType& dst_type =
813 AbstractType::ZoneHandle( 813 AbstractType::ZoneHandle(
814 owner()->parsed_function()->function().result_type()); 814 owner()->parsed_function()->function().result_type());
815 return_value = BuildAssignableValue(node->value()->token_pos(), 815 return_value = BuildAssignableValue(node->value()->token_pos(),
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
3546 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3546 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3547 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3547 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3548 OS::SNPrint(chars, len, kFormat, function_name, reason); 3548 OS::SNPrint(chars, len, kFormat, function_name, reason);
3549 const Error& error = Error::Handle( 3549 const Error& error = Error::Handle(
3550 LanguageError::New(String::Handle(String::New(chars)))); 3550 LanguageError::New(String::Handle(String::New(chars))));
3551 Isolate::Current()->long_jump_base()->Jump(1, error); 3551 Isolate::Current()->long_jump_base()->Jump(1, error);
3552 } 3552 }
3553 3553
3554 3554
3555 } // namespace dart 3555 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698