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

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

Issue 1397713007: Drop uncompiled implicit closure functions. Only seems to happen in a few co19 tests, so this is mo… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: external Created 5 years, 2 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/precompiler.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 6649 matching lines...) Expand 10 before | Expand all | Expand 10 after
6660 ClassFinalizer::FinalizeType( 6660 ClassFinalizer::FinalizeType(
6661 signature_class, signature_type, ClassFinalizer::kCanonicalize); 6661 signature_class, signature_type, ClassFinalizer::kCanonicalize);
6662 } 6662 }
6663 ASSERT(closure_function.signature_class() == signature_class.raw()); 6663 ASSERT(closure_function.signature_class() == signature_class.raw());
6664 set_implicit_closure_function(closure_function); 6664 set_implicit_closure_function(closure_function);
6665 ASSERT(closure_function.IsImplicitClosureFunction()); 6665 ASSERT(closure_function.IsImplicitClosureFunction());
6666 return closure_function.raw(); 6666 return closure_function.raw();
6667 } 6667 }
6668 6668
6669 6669
6670 void Function::DropUncompiledImplicitClosureFunction() const {
6671 if (implicit_closure_function() != Function::null()) {
6672 const Function& func = Function::Handle(implicit_closure_function());
6673 if (!func.HasCode()) {
6674 set_data(Object::null_object());
6675 }
6676 }
6677 }
6678
6679
6670 RawString* Function::UserVisibleFormalParameters() const { 6680 RawString* Function::UserVisibleFormalParameters() const {
6671 // Typically 3, 5,.. elements in 'pieces', e.g.: 6681 // Typically 3, 5,.. elements in 'pieces', e.g.:
6672 // '_LoadRequest', CommaSpace, '_LoadError'. 6682 // '_LoadRequest', CommaSpace, '_LoadError'.
6673 GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 5); 6683 GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 5);
6674 const TypeArguments& instantiator = TypeArguments::Handle(); 6684 const TypeArguments& instantiator = TypeArguments::Handle();
6675 BuildSignatureParameters(false, kUserVisibleName, instantiator, &pieces); 6685 BuildSignatureParameters(false, kUserVisibleName, instantiator, &pieces);
6676 return Symbols::FromConcatAll(pieces); 6686 return Symbols::FromConcatAll(pieces);
6677 } 6687 }
6678 6688
6679 6689
(...skipping 15040 matching lines...) Expand 10 before | Expand all | Expand 10 after
21720 return tag_label.ToCString(); 21730 return tag_label.ToCString();
21721 } 21731 }
21722 21732
21723 21733
21724 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21725 Instance::PrintJSONImpl(stream, ref); 21735 Instance::PrintJSONImpl(stream, ref);
21726 } 21736 }
21727 21737
21728 21738
21729 } // namespace dart 21739 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698