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

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

Issue 64173005: Deoptimize closure functions in DeoptimizeWorld. This was causing (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/debugger.cc ('k') | no next file » | 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 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 memmove(raw_obj->ptr(), src.raw()->ptr(), size); 1499 memmove(raw_obj->ptr(), src.raw()->ptr(), size);
1500 if ((space == Heap::kOld) && !raw_obj->IsRemembered()) { 1500 if ((space == Heap::kOld) && !raw_obj->IsRemembered()) {
1501 StoreBufferUpdateVisitor visitor(Isolate::Current(), raw_obj); 1501 StoreBufferUpdateVisitor visitor(Isolate::Current(), raw_obj);
1502 raw_obj->VisitPointers(&visitor); 1502 raw_obj->VisitPointers(&visitor);
1503 } 1503 }
1504 return raw_obj; 1504 return raw_obj;
1505 } 1505 }
1506 1506
1507 1507
1508 RawString* Class::Name() const { 1508 RawString* Class::Name() const {
1509 // TODO(turnidge): This assert fails for the fake kFreeListElement class.
1510 // Fix this.
1509 ASSERT(raw_ptr()->name_ != String::null()); 1511 ASSERT(raw_ptr()->name_ != String::null());
1510 return raw_ptr()->name_; 1512 return raw_ptr()->name_;
1511 } 1513 }
1512 1514
1513 1515
1514 RawString* Class::UserVisibleName() const { 1516 RawString* Class::UserVisibleName() const {
1515 if (FLAG_show_internal_names) { 1517 if (FLAG_show_internal_names) {
1516 return Name(); 1518 return Name();
1517 } 1519 }
1518 switch (id()) { 1520 switch (id()) {
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
4282 ClosureData::Cast(obj).set_parent_function(value); 4284 ClosureData::Cast(obj).set_parent_function(value);
4283 return; 4285 return;
4284 } 4286 }
4285 UNREACHABLE(); 4287 UNREACHABLE();
4286 } 4288 }
4287 4289
4288 4290
4289 RawFunction* Function::implicit_closure_function() const { 4291 RawFunction* Function::implicit_closure_function() const {
4290 if (IsClosureFunction() || 4292 if (IsClosureFunction() ||
4291 IsSignatureFunction() || 4293 IsSignatureFunction() ||
4292 IsStaticInitializerFunction()) { 4294 IsStaticInitializerFunction() ||
4295 IsFactory()) {
4293 return Function::null(); 4296 return Function::null();
4294 } 4297 }
4295 const Object& obj = Object::Handle(raw_ptr()->data_); 4298 const Object& obj = Object::Handle(raw_ptr()->data_);
4296 ASSERT(obj.IsNull() || obj.IsFunction()); 4299 ASSERT(obj.IsNull() || obj.IsFunction());
4297 return (obj.IsNull()) ? Function::null() : Function::Cast(obj).raw(); 4300 return (obj.IsNull()) ? Function::null() : Function::Cast(obj).raw();
4298 } 4301 }
4299 4302
4300 4303
4301 void Function::set_implicit_closure_function(const Function& value) const { 4304 void Function::set_implicit_closure_function(const Function& value) const {
4302 ASSERT(!IsClosureFunction() && !IsSignatureFunction()); 4305 ASSERT(!IsClosureFunction() && !IsSignatureFunction());
(...skipping 11441 matching lines...) Expand 10 before | Expand all | Expand 10 after
15744 return "_MirrorReference"; 15747 return "_MirrorReference";
15745 } 15748 }
15746 15749
15747 15750
15748 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 15751 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
15749 JSONObject jsobj(stream); 15752 JSONObject jsobj(stream);
15750 } 15753 }
15751 15754
15752 15755
15753 } // namespace dart 15756 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698