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

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

Issue 8363027: Igonre closure classes when looking for duplication. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after
3699 Object& obj = Object::Handle(); 3699 Object& obj = Object::Handle();
3700 Class& cls = Class::Handle(); 3700 Class& cls = Class::Handle();
3701 Function& func = Function::Handle(); 3701 Function& func = Function::Handle();
3702 Field& field = Field::Handle(); 3702 Field& field = Field::Handle();
3703 String& entry_name = String::Handle(); 3703 String& entry_name = String::Handle();
3704 while (it.HasNext()) { 3704 while (it.HasNext()) {
3705 obj = it.GetNext(); 3705 obj = it.GetNext();
3706 ASSERT(!obj.IsNull()); 3706 ASSERT(!obj.IsNull());
3707 if (obj.IsClass()) { 3707 if (obj.IsClass()) {
3708 cls ^= obj.raw(); 3708 cls ^= obj.raw();
3709 if (cls.IsSignatureClass()) {
3710 continue;
3711 }
siva 2011/10/21 17:20:47 I think this is not the right fix, imagine the cas
Anton Muhin 2011/10/21 17:34:26 Thanks a lot, Siva. Sounds like you're right. I'
siva 2011/10/21 18:13:37 Anton, see the updates done in issue 187. Regis an
3709 entry_name = cls.Name(); 3712 entry_name = cls.Name();
3710 } else if (obj.IsFunction()) { 3713 } else if (obj.IsFunction()) {
3711 func ^= obj.raw(); 3714 func ^= obj.raw();
3712 entry_name = func.name(); 3715 entry_name = func.name();
3713 } else if (obj.IsField()) { 3716 } else if (obj.IsField()) {
3714 field ^= obj.raw(); 3717 field ^= obj.raw();
3715 entry_name = field.name(); 3718 entry_name = field.name();
3716 } else { 3719 } else {
3717 // We don't check for library prefixes defined in this library because 3720 // We don't check for library prefixes defined in this library because
3718 // they are not visible in the importing scope and hence cannot 3721 // they are not visible in the importing scope and hence cannot
(...skipping 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
6685 const String& str = String::Handle(pattern()); 6688 const String& str = String::Handle(pattern());
6686 const char* format = "JSRegExp: pattern=%s flags=%s"; 6689 const char* format = "JSRegExp: pattern=%s flags=%s";
6687 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 6690 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
6688 char* chars = reinterpret_cast<char*>( 6691 char* chars = reinterpret_cast<char*>(
6689 Isolate::Current()->current_zone()->Allocate(len + 1)); 6692 Isolate::Current()->current_zone()->Allocate(len + 1));
6690 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 6693 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
6691 return chars; 6694 return chars;
6692 } 6695 }
6693 6696
6694 } // namespace dart 6697 } // namespace dart
OLDNEW
« runtime/vm/dart_api_impl_test.cc ('K') | « runtime/vm/dart_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698