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

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

Issue 2556193003: VM: Make precompiler process constants/fields only once, avoid using pool.InfoAt() (Closed)
Patch Set: Created 4 years 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/become.h" 10 #include "vm/become.h"
(...skipping 11584 matching lines...) Expand 10 before | Expand all | Expand 10 after
11595 return result.raw(); 11595 return result.raw();
11596 } 11596 }
11597 11597
11598 11598
11599 void ObjectPool::set_info_array(const TypedData& info_array) const { 11599 void ObjectPool::set_info_array(const TypedData& info_array) const {
11600 StorePointer(&raw_ptr()->info_array_, info_array.raw()); 11600 StorePointer(&raw_ptr()->info_array_, info_array.raw());
11601 } 11601 }
11602 11602
11603 11603
11604 ObjectPool::EntryType ObjectPool::InfoAt(intptr_t index) const { 11604 ObjectPool::EntryType ObjectPool::InfoAt(intptr_t index) const {
11605 const TypedData& array = TypedData::Handle(info_array()); 11605 ObjectPoolInfo pool_info(*this);
11606 return static_cast<EntryType>(array.GetInt8(index)); 11606 return pool_info.InfoAt(index);
11607 } 11607 }
11608 11608
11609 11609
11610 const char* ObjectPool::ToCString() const { 11610 const char* ObjectPool::ToCString() const {
11611 Zone* zone = Thread::Current()->zone(); 11611 Zone* zone = Thread::Current()->zone();
11612 return zone->PrintToString("ObjectPool len:%" Pd, Length()); 11612 return zone->PrintToString("ObjectPool len:%" Pd, Length());
11613 } 11613 }
11614 11614
11615 11615
11616 void ObjectPool::DebugPrint() const { 11616 void ObjectPool::DebugPrint() const {
(...skipping 11149 matching lines...) Expand 10 before | Expand all | Expand 10 after
22766 return UserTag::null(); 22766 return UserTag::null();
22767 } 22767 }
22768 22768
22769 22769
22770 const char* UserTag::ToCString() const { 22770 const char* UserTag::ToCString() const {
22771 const String& tag_label = String::Handle(label()); 22771 const String& tag_label = String::Handle(label());
22772 return tag_label.ToCString(); 22772 return tag_label.ToCString();
22773 } 22773 }
22774 22774
22775 } // namespace dart 22775 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698