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

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

Issue 22183002: Forwarding constructors are never const (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | tests/language/language.status » ('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/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 String& ctor_name = String::Handle(func.name()); 1369 String& ctor_name = String::Handle(func.name());
1370 ctor_name = String::SubString(ctor_name, super_name.Length()); 1370 ctor_name = String::SubString(ctor_name, super_name.Length());
1371 String& clone_name = 1371 String& clone_name =
1372 String::Handle(String::Concat(mixin_name, ctor_name)); 1372 String::Handle(String::Concat(mixin_name, ctor_name));
1373 clone_name = Symbols::New(clone_name); 1373 clone_name = Symbols::New(clone_name);
1374 1374
1375 const Function& clone = Function::Handle( 1375 const Function& clone = Function::Handle(
1376 Function::New(clone_name, 1376 Function::New(clone_name,
1377 func.kind(), 1377 func.kind(),
1378 func.is_static(), 1378 func.is_static(),
1379 func.is_const(), 1379 false, // Not const.
1380 func.is_abstract(), 1380 false, // Not abstract.
1381 func.is_external(), 1381 false, // Not external.
1382 mixin_app, 1382 mixin_app,
1383 mixin_app.token_pos())); 1383 mixin_app.token_pos()));
1384 1384
1385 clone.set_num_fixed_parameters(func.num_fixed_parameters()); 1385 clone.set_num_fixed_parameters(func.num_fixed_parameters());
1386 clone.SetNumOptionalParameters(func.NumOptionalParameters(), 1386 clone.SetNumOptionalParameters(func.NumOptionalParameters(),
1387 func.HasOptionalPositionalParameters()); 1387 func.HasOptionalPositionalParameters());
1388 clone.set_result_type(dynamic_type); 1388 clone.set_result_type(dynamic_type);
1389 1389
1390 const int num_parameters = func.NumParameters(); 1390 const int num_parameters = func.NumParameters();
1391 // The cloned ctor shares the parameter names array with the 1391 // The cloned ctor shares the parameter names array with the
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 expected_name ^= String::New("_offset"); 2166 expected_name ^= String::New("_offset");
2167 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 2167 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
2168 field ^= fields_array.At(2); 2168 field ^= fields_array.At(2);
2169 ASSERT(field.Offset() == TypedDataView::length_offset()); 2169 ASSERT(field.Offset() == TypedDataView::length_offset());
2170 name ^= field.name(); 2170 name ^= field.name();
2171 ASSERT(name.Equals("length")); 2171 ASSERT(name.Equals("length"));
2172 #endif 2172 #endif
2173 } 2173 }
2174 2174
2175 } // namespace dart 2175 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698