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

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

Issue 557913002: Allow invalidation and recompilation of instance allocation stubs. Requested in order to implement… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
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 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 } 3610 }
3611 3611
3612 3612
3613 void Class::set_allocation_stub(const Code& value) const { 3613 void Class::set_allocation_stub(const Code& value) const {
3614 ASSERT(!value.IsNull()); 3614 ASSERT(!value.IsNull());
3615 ASSERT(raw_ptr()->allocation_stub_ == Code::null()); 3615 ASSERT(raw_ptr()->allocation_stub_ == Code::null());
3616 StorePointer(&raw_ptr()->allocation_stub_, value.raw()); 3616 StorePointer(&raw_ptr()->allocation_stub_, value.raw());
3617 } 3617 }
3618 3618
3619 3619
3620 void Class::DisableAllocationStub() const {
3621 const Code& alloc_stub = Code::Handle(allocation_stub());
3622 if (!alloc_stub.IsNull()) {
3623 CodePatcher::PatchEntry(alloc_stub);
3624 StorePointer(&raw_ptr()->allocation_stub_, Code::null());
3625 }
3626 }
3627
3628
3620 bool Class::IsFunctionClass() const { 3629 bool Class::IsFunctionClass() const {
3621 return raw() == Type::Handle(Type::Function()).type_class(); 3630 return raw() == Type::Handle(Type::Function()).type_class();
3622 } 3631 }
3623 3632
3624 3633
3625 bool Class::IsCanonicalSignatureClass() const { 3634 bool Class::IsCanonicalSignatureClass() const {
3626 const Function& function = Function::Handle(signature_function()); 3635 const Function& function = Function::Handle(signature_function());
3627 return (!function.IsNull() && (function.signature_class() == raw())); 3636 return (!function.IsNull() && (function.signature_class() == raw()));
3628 } 3637 }
3629 3638
(...skipping 16723 matching lines...) Expand 10 before | Expand all | Expand 10 after
20353 return tag_label.ToCString(); 20362 return tag_label.ToCString();
20354 } 20363 }
20355 20364
20356 20365
20357 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20366 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20358 Instance::PrintJSONImpl(stream, ref); 20367 Instance::PrintJSONImpl(stream, ref);
20359 } 20368 }
20360 20369
20361 20370
20362 } // namespace dart 20371 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698