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

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

Issue 186623005: When running compile-all, clear code after compiling so that we do not out too much pressure on GC … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « runtime/vm/object.h ('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 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after
4525 4525
4526 4526
4527 void Function::SetCode(const Code& value) const { 4527 void Function::SetCode(const Code& value) const {
4528 StorePointer(&raw_ptr()->code_, value.raw()); 4528 StorePointer(&raw_ptr()->code_, value.raw());
4529 ASSERT(Function::Handle(value.function()).IsNull() || 4529 ASSERT(Function::Handle(value.function()).IsNull() ||
4530 (value.function() == this->raw())); 4530 (value.function() == this->raw()));
4531 value.set_owner(*this); 4531 value.set_owner(*this);
4532 } 4532 }
4533 4533
4534 4534
4535 void Function::ClearCode() const {
4536 StorePointer(&raw_ptr()->code_, Code::null());
4537 StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
4538 }
4539
4540
4535 void Function::SwitchToUnoptimizedCode() const { 4541 void Function::SwitchToUnoptimizedCode() const {
4536 ASSERT(HasOptimizedCode()); 4542 ASSERT(HasOptimizedCode());
4537 4543
4538 const Code& current_code = Code::Handle(CurrentCode()); 4544 const Code& current_code = Code::Handle(CurrentCode());
4539 4545
4540 // Optimized code object might have been actually fully produced by the 4546 // Optimized code object might have been actually fully produced by the
4541 // intrinsifier in this case nothing has to be done. In fact an attempt to 4547 // intrinsifier in this case nothing has to be done. In fact an attempt to
4542 // patch such code will cause crash. 4548 // patch such code will cause crash.
4543 // TODO(vegorov): if intrisifier can fully intrinsify the function then we 4549 // TODO(vegorov): if intrisifier can fully intrinsify the function then we
4544 // should not later try to optimize it. 4550 // should not later try to optimize it.
(...skipping 12928 matching lines...) Expand 10 before | Expand all | Expand 10 after
17473 return "_MirrorReference"; 17479 return "_MirrorReference";
17474 } 17480 }
17475 17481
17476 17482
17477 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 17483 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
17478 Instance::PrintToJSONStream(stream, ref); 17484 Instance::PrintToJSONStream(stream, ref);
17479 } 17485 }
17480 17486
17481 17487
17482 } // namespace dart 17488 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698