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

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

Issue 1278003002: Change heuristic to determine which fields contain modifieable double boxes: do it if field was ini… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: better 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
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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 7211 matching lines...) Expand 10 before | Expand all | Expand 10 after
7222 result.set_name(name); 7222 result.set_name(name);
7223 result.set_is_static(is_static); 7223 result.set_is_static(is_static);
7224 if (is_static) { 7224 if (is_static) {
7225 result.set_value(Object::null_instance()); 7225 result.set_value(Object::null_instance());
7226 } else { 7226 } else {
7227 result.SetOffset(0); 7227 result.SetOffset(0);
7228 } 7228 }
7229 result.set_is_final(is_final); 7229 result.set_is_final(is_final);
7230 result.set_is_const(is_const); 7230 result.set_is_const(is_const);
7231 result.set_is_synthetic(is_synthetic); 7231 result.set_is_synthetic(is_synthetic);
7232 result.set_is_double_initialized(false);
7232 result.set_owner(owner); 7233 result.set_owner(owner);
7233 result.set_token_pos(token_pos); 7234 result.set_token_pos(token_pos);
7234 result.set_has_initializer(false); 7235 result.set_has_initializer(false);
7235 result.set_initializer(Function::Handle()); 7236 result.set_initializer(Function::Handle());
7236 result.set_is_unboxing_candidate(true); 7237 result.set_is_unboxing_candidate(true);
7237 result.set_guarded_cid(FLAG_use_field_guards ? kIllegalCid : kDynamicCid); 7238 result.set_guarded_cid(FLAG_use_field_guards ? kIllegalCid : kDynamicCid);
7238 result.set_is_nullable(FLAG_use_field_guards ? false : true); 7239 result.set_is_nullable(FLAG_use_field_guards ? false : true);
7239 result.set_guarded_list_length_in_object_offset(Field::kUnknownLengthOffset); 7240 result.set_guarded_list_length_in_object_offset(Field::kUnknownLengthOffset);
7240 // Presently, we only attempt to remember the list length for final fields. 7241 // Presently, we only attempt to remember the list length for final fields.
7241 if (is_final && FLAG_use_field_guards) { 7242 if (is_final && FLAG_use_field_guards) {
(...skipping 14100 matching lines...) Expand 10 before | Expand all | Expand 10 after
21342 return tag_label.ToCString(); 21343 return tag_label.ToCString();
21343 } 21344 }
21344 21345
21345 21346
21346 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21347 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21347 Instance::PrintJSONImpl(stream, ref); 21348 Instance::PrintJSONImpl(stream, ref);
21348 } 21349 }
21349 21350
21350 21351
21351 } // namespace dart 21352 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698