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

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: a 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 13515 matching lines...) Expand 10 before | Expand all | Expand 10 after
13526 Zone* zone = Thread::Current()->zone(); 13526 Zone* zone = Thread::Current()->zone();
13527 if (IsStubCode()) { 13527 if (IsStubCode()) {
13528 const char* name = StubCode::NameOfStub(EntryPoint()); 13528 const char* name = StubCode::NameOfStub(EntryPoint());
13529 return zone->PrintToString("[stub: %s]", name); 13529 return zone->PrintToString("[stub: %s]", name);
13530 } else { 13530 } else {
13531 return zone->PrintToString("Code entry:%" Px, EntryPoint()); 13531 return zone->PrintToString("Code entry:%" Px, EntryPoint());
13532 } 13532 }
13533 } 13533 }
13534 13534
13535 13535
13536 // Called by disassembler.
13536 RawString* Code::Name() const { 13537 RawString* Code::Name() const {
13537 const Object& obj = Object::Handle(owner()); 13538 const Object& obj = Object::Handle(owner());
13538 if (obj.IsNull()) { 13539 if (obj.IsNull()) {
13539 // Regular stub. 13540 // Regular stub.
13540 const char* name = StubCode::NameOfStub(EntryPoint()); 13541 const char* name = StubCode::NameOfStub(EntryPoint());
13541 ASSERT(name != NULL); 13542 ASSERT(name != NULL);
13542 const String& stub_name = String::Handle(String::New(name)); 13543 const String& stub_name = String::Handle(Symbols::New(name));
13543 return String::Concat(Symbols::StubPrefix(), stub_name); 13544 return Symbols::FromConcat(Symbols::StubPrefix(), stub_name);
13544 } else if (obj.IsClass()) { 13545 } else if (obj.IsClass()) {
13545 // Allocation stub. 13546 // Allocation stub.
13546 const Class& cls = Class::Cast(obj); 13547 const Class& cls = Class::Cast(obj);
13547 String& cls_name = String::Handle(cls.Name()); 13548 String& cls_name = String::Handle(cls.Name());
13548 ASSERT(!cls_name.IsNull()); 13549 ASSERT(!cls_name.IsNull());
13549 return String::Concat(Symbols::AllocationStubFor(), cls_name); 13550 return Symbols::FromConcat(Symbols::AllocationStubFor(), cls_name);
13550 } else { 13551 } else {
13551 ASSERT(obj.IsFunction()); 13552 ASSERT(obj.IsFunction());
13552 // Dart function. 13553 // Dart function.
13553 return Function::Cast(obj).name(); 13554 return Function::Cast(obj).name();
13554 } 13555 }
13555 } 13556 }
13556 13557
13557 13558
13558 RawString* Code::PrettyName() const { 13559 RawString* Code::PrettyName() const {
13559 const Object& obj = Object::Handle(owner()); 13560 const Object& obj = Object::Handle(owner());
(...skipping 8363 matching lines...) Expand 10 before | Expand all | Expand 10 after
21923 return tag_label.ToCString(); 21924 return tag_label.ToCString();
21924 } 21925 }
21925 21926
21926 21927
21927 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21928 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21928 Instance::PrintJSONImpl(stream, ref); 21929 Instance::PrintJSONImpl(stream, ref);
21929 } 21930 }
21930 21931
21931 21932
21932 } // namespace dart 21933 } // 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