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

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

Issue 463103002: Fix bug with CHA dependencies by recording a set of classes for registering code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: address remaining comments Created 6 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 | « runtime/vm/isolate.cc ('k') | tests/language/cha_deopt1_deferred_lib.dart » ('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/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 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 }; 2589 };
2590 2590
2591 2591
2592 class CHACodeArray : public WeakCodeReferences { 2592 class CHACodeArray : public WeakCodeReferences {
2593 public: 2593 public:
2594 explicit CHACodeArray(const Class& cls) 2594 explicit CHACodeArray(const Class& cls)
2595 : WeakCodeReferences(Array::Handle(cls.cha_codes())), cls_(cls) { 2595 : WeakCodeReferences(Array::Handle(cls.cha_codes())), cls_(cls) {
2596 } 2596 }
2597 2597
2598 virtual void UpdateArrayTo(const Array& value) { 2598 virtual void UpdateArrayTo(const Array& value) {
2599 // TODO(fschneider): Fails for classes in the VM isolate.
2599 cls_.set_cha_codes(value); 2600 cls_.set_cha_codes(value);
2600 } 2601 }
2601 2602
2602 virtual void ReportDeoptimization(const Code& code) { 2603 virtual void ReportDeoptimization(const Code& code) {
2603 if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) { 2604 if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
2604 Function& function = Function::Handle(code.function()); 2605 Function& function = Function::Handle(code.function());
2605 OS::PrintErr("Deoptimizing %s because CHA optimized (%s).\n", 2606 OS::PrintErr("Deoptimizing %s because CHA optimized (%s).\n",
2606 function.ToFullyQualifiedCString(), 2607 function.ToFullyQualifiedCString(),
2607 cls_.ToCString()); 2608 cls_.ToCString());
2608 } 2609 }
(...skipping 16793 matching lines...) Expand 10 before | Expand all | Expand 10 after
19402 return tag_label.ToCString(); 19403 return tag_label.ToCString();
19403 } 19404 }
19404 19405
19405 19406
19406 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 19407 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
19407 Instance::PrintJSONImpl(stream, ref); 19408 Instance::PrintJSONImpl(stream, ref);
19408 } 19409 }
19409 19410
19410 19411
19411 } // namespace dart 19412 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | tests/language/cha_deopt1_deferred_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698