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

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

Issue 2146063004: Remove failing assert in Function::ClearCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/object.h ('k') | no next file » | 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/become.h" 10 #include "vm/become.h"
(...skipping 5264 matching lines...) Expand 10 before | Expand all | Expand 10 after
5275 5275
5276 5276
5277 bool Function::HasCode() const { 5277 bool Function::HasCode() const {
5278 ASSERT(raw_ptr()->code_ != Code::null()); 5278 ASSERT(raw_ptr()->code_ != Code::null());
5279 return raw_ptr()->code_ != StubCode::LazyCompile_entry()->code(); 5279 return raw_ptr()->code_ != StubCode::LazyCompile_entry()->code();
5280 } 5280 }
5281 5281
5282 5282
5283 void Function::ClearCode() const { 5283 void Function::ClearCode() const {
5284 ASSERT(Thread::Current()->IsMutatorThread()); 5284 ASSERT(Thread::Current()->IsMutatorThread());
5285 ASSERT((usage_counter() != 0) || (ic_data_array() == Array::null()));
5286 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); 5285 StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
5287 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); 5286 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
5288 } 5287 }
5289 5288
5290 5289
5291 void Function::EnsureHasCompiledUnoptimizedCode() const { 5290 void Function::EnsureHasCompiledUnoptimizedCode() const {
5292 Thread* thread = Thread::Current(); 5291 Thread* thread = Thread::Current();
5293 Zone* zone = thread->zone(); 5292 Zone* zone = thread->zone();
5294 ASSERT(thread->IsMutatorThread()); 5293 ASSERT(thread->IsMutatorThread());
5295 5294
(...skipping 17299 matching lines...) Expand 10 before | Expand all | Expand 10 after
22595 return UserTag::null(); 22594 return UserTag::null();
22596 } 22595 }
22597 22596
22598 22597
22599 const char* UserTag::ToCString() const { 22598 const char* UserTag::ToCString() const {
22600 const String& tag_label = String::Handle(label()); 22599 const String& tag_label = String::Handle(label());
22601 return tag_label.ToCString(); 22600 return tag_label.ToCString();
22602 } 22601 }
22603 22602
22604 } // namespace dart 22603 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698