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

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

Issue 1337083004: - Turn on writing of ic_data_array so that we have that information for script snapshots that would… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years, 3 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 5227 matching lines...) Expand 10 before | Expand all | Expand 10 after
5238 5238
5239 5239
5240 bool Function::HasCode() const { 5240 bool Function::HasCode() const {
5241 ASSERT(raw_ptr()->instructions_ != Instructions::null()); 5241 ASSERT(raw_ptr()->instructions_ != Instructions::null());
5242 return raw_ptr()->instructions_ != 5242 return raw_ptr()->instructions_ !=
5243 StubCode::LazyCompile_entry()->code()->ptr()->instructions_; 5243 StubCode::LazyCompile_entry()->code()->ptr()->instructions_;
5244 } 5244 }
5245 5245
5246 5246
5247 void Function::ClearCode() const { 5247 void Function::ClearCode() const {
5248 ASSERT(ic_data_array() == Array::null()); 5248 ASSERT((usage_counter() != 0) || (ic_data_array() == Array::null()));
5249 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); 5249 StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
5250 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); 5250 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
5251 } 5251 }
5252 5252
5253 5253
5254 void Function::SwitchToUnoptimizedCode() const { 5254 void Function::SwitchToUnoptimizedCode() const {
5255 ASSERT(HasOptimizedCode()); 5255 ASSERT(HasOptimizedCode());
5256 Thread* thread = Thread::Current(); 5256 Thread* thread = Thread::Current();
5257 Isolate* isolate = thread->isolate(); 5257 Isolate* isolate = thread->isolate();
5258 Zone* zone = thread->zone(); 5258 Zone* zone = thread->zone();
(...skipping 16175 matching lines...) Expand 10 before | Expand all | Expand 10 after
21434 return tag_label.ToCString(); 21434 return tag_label.ToCString();
21435 } 21435 }
21436 21436
21437 21437
21438 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21438 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21439 Instance::PrintJSONImpl(stream, ref); 21439 Instance::PrintJSONImpl(stream, ref);
21440 } 21440 }
21441 21441
21442 21442
21443 } // namespace dart 21443 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698