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

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

Issue 652743007: - Do not attempt to set parameter types if they (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | « no previous file | runtime/vm/object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 } 1139 }
1140 } 1140 }
1141 1141
1142 1142
1143 void ClassFinalizer::ResolveAndFinalizeSignature(const Class& cls, 1143 void ClassFinalizer::ResolveAndFinalizeSignature(const Class& cls,
1144 const Function& function) { 1144 const Function& function) {
1145 // Resolve result type. 1145 // Resolve result type.
1146 AbstractType& type = AbstractType::Handle(function.result_type()); 1146 AbstractType& type = AbstractType::Handle(function.result_type());
1147 // It is not a compile time error if this name does not resolve to a class or 1147 // It is not a compile time error if this name does not resolve to a class or
1148 // interface. 1148 // interface.
1149 type = FinalizeType(cls, type, kCanonicalize); 1149 AbstractType& finalized_type =
1150 AbstractType::Handle(FinalizeType(cls, type, kCanonicalize));
1150 // The result type may be malformed or malbounded. 1151 // The result type may be malformed or malbounded.
1151 function.set_result_type(type); 1152 if (type.raw() != finalized_type.raw()) {
1153 function.set_result_type(type);
1154 }
1152 // Resolve formal parameter types. 1155 // Resolve formal parameter types.
1153 const intptr_t num_parameters = function.NumParameters(); 1156 const intptr_t num_parameters = function.NumParameters();
1154 for (intptr_t i = 0; i < num_parameters; i++) { 1157 for (intptr_t i = 0; i < num_parameters; i++) {
1155 type = function.ParameterTypeAt(i); 1158 type = function.ParameterTypeAt(i);
1156 type = FinalizeType(cls, type, kCanonicalize); 1159 finalized_type = FinalizeType(cls, type, kCanonicalize);
1157 // The parameter type may be malformed or malbounded. 1160 // The parameter type may be malformed or malbounded.
1158 function.SetParameterTypeAt(i, type); 1161 if (type.raw() != finalized_type.raw()) {
1162 function.SetParameterTypeAt(i, type);
1163 }
1159 } 1164 }
1160 } 1165 }
1161 1166
1162 1167
1163 // Check if an instance field, getter, or method of same name exists 1168 // Check if an instance field, getter, or method of same name exists
1164 // in any super class. 1169 // in any super class.
1165 static RawClass* FindSuperOwnerOfInstanceMember(const Class& cls, 1170 static RawClass* FindSuperOwnerOfInstanceMember(const Class& cls,
1166 const String& name, 1171 const String& name,
1167 const String& getter_name) { 1172 const String& getter_name) {
1168 Class& super_class = Class::Handle(); 1173 Class& super_class = Class::Handle();
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); 3078 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
3074 field ^= fields_array.At(0); 3079 field ^= fields_array.At(0);
3075 ASSERT(field.Offset() == ByteBuffer::data_offset()); 3080 ASSERT(field.Offset() == ByteBuffer::data_offset());
3076 name ^= field.name(); 3081 name ^= field.name();
3077 expected_name ^= String::New("_data"); 3082 expected_name ^= String::New("_data");
3078 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3083 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3079 #endif 3084 #endif
3080 } 3085 }
3081 3086
3082 } // namespace dart 3087 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698