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

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

Issue 2517683002: Don't include usage counters, etc in snapshots with code. If we already have code, eagerly recompil… (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
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/symbols.h » ('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/become.h" 10 #include "vm/become.h"
(...skipping 14287 matching lines...) Expand 10 before | Expand all | Expand 10 after
14298 14298
14299 14299
14300 const char* Code::Name() const { 14300 const char* Code::Name() const {
14301 const Object& obj = Object::Handle(owner()); 14301 const Object& obj = Object::Handle(owner());
14302 if (obj.IsNull()) { 14302 if (obj.IsNull()) {
14303 // Regular stub. 14303 // Regular stub.
14304 Thread* thread = Thread::Current(); 14304 Thread* thread = Thread::Current();
14305 Zone* zone = thread->zone(); 14305 Zone* zone = thread->zone();
14306 const char* name = StubCode::NameOfStub(UncheckedEntryPoint()); 14306 const char* name = StubCode::NameOfStub(UncheckedEntryPoint());
14307 ASSERT(name != NULL); 14307 ASSERT(name != NULL);
14308 char* stub_name = 14308 return OS::SCreate(zone, "[Stub] %s", name);
14309 OS::SCreate(zone, "%s%s", Symbols::StubPrefix().ToCString(), name);
14310 return stub_name;
14311 } else if (obj.IsClass()) { 14309 } else if (obj.IsClass()) {
14312 // Allocation stub. 14310 // Allocation stub.
14313 Thread* thread = Thread::Current(); 14311 Thread* thread = Thread::Current();
14314 Zone* zone = thread->zone(); 14312 Zone* zone = thread->zone();
14315 const Class& cls = Class::Cast(obj); 14313 const Class& cls = Class::Cast(obj);
14316 String& cls_name = String::Handle(zone, cls.ScrubbedName()); 14314 String& cls_name = String::Handle(zone, cls.ScrubbedName());
14317 ASSERT(!cls_name.IsNull()); 14315 ASSERT(!cls_name.IsNull());
14318 char* stub_name = 14316 return OS::SCreate(zone, "[Stub] Allocate %s", cls_name.ToCString());
14319 OS::SCreate(zone, "%s%s", Symbols::AllocationStubFor().ToCString(),
14320 cls_name.ToCString());
14321 return stub_name;
14322 } else { 14317 } else {
14323 ASSERT(obj.IsFunction()); 14318 ASSERT(obj.IsFunction());
14324 // Dart function. 14319 // Dart function.
14325 // Same as scrubbed name. 14320 // Same as scrubbed name.
14326 return String::Handle(Function::Cast(obj).UserVisibleName()).ToCString(); 14321 return String::Handle(Function::Cast(obj).UserVisibleName()).ToCString();
14327 } 14322 }
14328 } 14323 }
14329 14324
14330 14325
14331 const char* Code::QualifiedName() const { 14326 const char* Code::QualifiedName() const {
(...skipping 8439 matching lines...) Expand 10 before | Expand all | Expand 10 after
22771 return UserTag::null(); 22766 return UserTag::null();
22772 } 22767 }
22773 22768
22774 22769
22775 const char* UserTag::ToCString() const { 22770 const char* UserTag::ToCString() const {
22776 const String& tag_label = String::Handle(label()); 22771 const String& tag_label = String::Handle(label());
22777 return tag_label.ToCString(); 22772 return tag_label.ToCString();
22778 } 22773 }
22779 22774
22780 } // namespace dart 22775 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698