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

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

Issue 1289813005: Use Object::null_instance and Object::null_function and do not create Handles everytime. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-patch Created 5 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
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/dart_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) 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 /* is_static = */ true, 1409 /* is_static = */ true,
1410 /* is_const = */ field.is_const(), 1410 /* is_const = */ field.is_const(),
1411 /* is_abstract = */ false, 1411 /* is_abstract = */ false,
1412 /* is_external = */ false, 1412 /* is_external = */ false,
1413 /* is_native = */ false, 1413 /* is_native = */ false,
1414 cls, 1414 cls,
1415 field.token_pos())); 1415 field.token_pos()));
1416 getter.set_result_type(type); 1416 getter.set_result_type(type);
1417 getter.set_is_debuggable(false); 1417 getter.set_is_debuggable(false);
1418 cls.AddFunction(getter); 1418 cls.AddFunction(getter);
1419 field.set_value(Instance::Handle(I, Object::sentinel().raw())); 1419 field.set_value(Object::sentinel());
1420 } 1420 }
1421 } 1421 }
1422 } 1422 }
1423 } 1423 }
1424 // Collect interfaces, super interfaces, and super classes of this class. 1424 // Collect interfaces, super interfaces, and super classes of this class.
1425 const GrowableObjectArray& interfaces = 1425 const GrowableObjectArray& interfaces =
1426 GrowableObjectArray::Handle(I, GrowableObjectArray::New()); 1426 GrowableObjectArray::Handle(I, GrowableObjectArray::New());
1427 CollectInterfaces(cls, interfaces); 1427 CollectInterfaces(cls, interfaces);
1428 // Include superclasses in list of interfaces and super interfaces. 1428 // Include superclasses in list of interfaces and super interfaces.
1429 super_class = cls.SuperClass(); 1429 super_class = cls.SuperClass();
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
3219 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); 3219 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
3220 field ^= fields_array.At(0); 3220 field ^= fields_array.At(0);
3221 ASSERT(field.Offset() == ByteBuffer::data_offset()); 3221 ASSERT(field.Offset() == ByteBuffer::data_offset());
3222 name ^= field.name(); 3222 name ^= field.name();
3223 expected_name ^= String::New("_data"); 3223 expected_name ^= String::New("_data");
3224 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3224 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3225 #endif 3225 #endif
3226 } 3226 }
3227 3227
3228 } // namespace dart 3228 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698