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

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

Issue 1426513006: Background compilation fixes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: cleanup Created 5 years, 1 month 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/compiler.cc ('k') | runtime/vm/parser.cc » ('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 13538 matching lines...) Expand 10 before | Expand all | Expand 10 after
13549 Zone* zone = Thread::Current()->zone(); 13549 Zone* zone = Thread::Current()->zone();
13550 if (IsStubCode()) { 13550 if (IsStubCode()) {
13551 const char* name = StubCode::NameOfStub(EntryPoint()); 13551 const char* name = StubCode::NameOfStub(EntryPoint());
13552 return zone->PrintToString("[stub: %s]", name); 13552 return zone->PrintToString("[stub: %s]", name);
13553 } else { 13553 } else {
13554 return zone->PrintToString("Code entry:%" Px, EntryPoint()); 13554 return zone->PrintToString("Code entry:%" Px, EntryPoint());
13555 } 13555 }
13556 } 13556 }
13557 13557
13558 13558
13559 // Called by disassembler.
13559 RawString* Code::Name() const { 13560 RawString* Code::Name() const {
13560 const Object& obj = Object::Handle(owner()); 13561 const Object& obj = Object::Handle(owner());
13561 if (obj.IsNull()) { 13562 if (obj.IsNull()) {
13562 // Regular stub. 13563 // Regular stub.
13563 const char* name = StubCode::NameOfStub(EntryPoint()); 13564 const char* name = StubCode::NameOfStub(EntryPoint());
13564 ASSERT(name != NULL); 13565 ASSERT(name != NULL);
13565 const String& stub_name = String::Handle(String::New(name)); 13566 const String& stub_name = String::Handle(Symbols::New(name));
13566 return String::Concat(Symbols::StubPrefix(), stub_name); 13567 return Symbols::FromConcat(Symbols::StubPrefix(), stub_name);
13567 } else if (obj.IsClass()) { 13568 } else if (obj.IsClass()) {
13568 // Allocation stub. 13569 // Allocation stub.
13569 const Class& cls = Class::Cast(obj); 13570 const Class& cls = Class::Cast(obj);
13570 String& cls_name = String::Handle(cls.Name()); 13571 String& cls_name = String::Handle(cls.Name());
13571 ASSERT(!cls_name.IsNull()); 13572 ASSERT(!cls_name.IsNull());
13572 return String::Concat(Symbols::AllocationStubFor(), cls_name); 13573 return String::Concat(Symbols::AllocationStubFor(), cls_name);
hausner 2015/11/05 03:14:43 Is this string concatenation not a problem?
srdjan 2015/11/05 16:53:47 Done.
13573 } else { 13574 } else {
13574 ASSERT(obj.IsFunction()); 13575 ASSERT(obj.IsFunction());
13575 // Dart function. 13576 // Dart function.
13576 return Function::Cast(obj).name(); 13577 return Function::Cast(obj).name();
13577 } 13578 }
13578 } 13579 }
13579 13580
13580 13581
13581 RawString* Code::PrettyName() const { 13582 RawString* Code::PrettyName() const {
13582 const Object& obj = Object::Handle(owner()); 13583 const Object& obj = Object::Handle(owner());
(...skipping 8363 matching lines...) Expand 10 before | Expand all | Expand 10 after
21946 return tag_label.ToCString(); 21947 return tag_label.ToCString();
21947 } 21948 }
21948 21949
21949 21950
21950 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21951 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21951 Instance::PrintJSONImpl(stream, ref); 21952 Instance::PrintJSONImpl(stream, ref);
21952 } 21953 }
21953 21954
21954 21955
21955 } // namespace dart 21956 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698