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

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

Issue 1504313003: Fix mismatched parenthesis error message (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add fixes from previous CL review feedback Created 5 years 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 | « no previous file | runtime/vm/parser.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 9352 matching lines...) Expand 10 before | Expand all | Expand 10 after
9363 intptr_t i = 0; 9363 intptr_t i = 0;
9364 while (i < num_classes) { 9364 while (i < num_classes) {
9365 if (cls.raw() == patch_classes.At(i)) break; 9365 if (cls.raw() == patch_classes.At(i)) break;
9366 i++; 9366 i++;
9367 } 9367 }
9368 if (i == num_classes) return; 9368 if (i == num_classes) return;
9369 // Replace the entry with the script. We keep the script so that 9369 // Replace the entry with the script. We keep the script so that
9370 // Library::LoadedScripts() can find it without having to iterate 9370 // Library::LoadedScripts() can find it without having to iterate
9371 // over the members of each class. 9371 // over the members of each class.
9372 ASSERT(i < num_classes); // We must have found a class. 9372 ASSERT(i < num_classes); // We must have found a class.
9373 Class& pc = Class::Handle(); 9373 const Script& patch_script = Script::Handle(cls.script());
9374 pc ^= patch_classes.At(i);
9375 const Script& patch_script = Script::Handle(pc.script());
9376 patch_classes.SetAt(i, patch_script); 9374 patch_classes.SetAt(i, patch_script);
9377 } 9375 }
9378 9376
9379 9377
9380 static RawString* MakeClassMetaName(const Class& cls) { 9378 static RawString* MakeClassMetaName(const Class& cls) {
9381 return Symbols::FromConcat(Symbols::At(), String::Handle(cls.Name())); 9379 return Symbols::FromConcat(Symbols::At(), String::Handle(cls.Name()));
9382 } 9380 }
9383 9381
9384 9382
9385 static RawString* MakeFieldMetaName(const Field& field) { 9383 static RawString* MakeFieldMetaName(const Field& field) {
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
9809 } 9807 }
9810 9808
9811 // Add all scripts from patch classes. 9809 // Add all scripts from patch classes.
9812 GrowableObjectArray& patches = GrowableObjectArray::Handle(patch_classes()); 9810 GrowableObjectArray& patches = GrowableObjectArray::Handle(patch_classes());
9813 for (intptr_t i = 0; i < patches.Length(); i++) { 9811 for (intptr_t i = 0; i < patches.Length(); i++) {
9814 entry = patches.At(i); 9812 entry = patches.At(i);
9815 if (entry.IsClass()) { 9813 if (entry.IsClass()) {
9816 owner_script = Class::Cast(entry).script(); 9814 owner_script = Class::Cast(entry).script();
9817 } else { 9815 } else {
9818 ASSERT(entry.IsScript()); 9816 ASSERT(entry.IsScript());
9819 owner_script ^= Script::Cast(entry).raw(); 9817 owner_script = Script::Cast(entry).raw();
9820 } 9818 }
9821 AddScriptIfUnique(scripts, owner_script); 9819 AddScriptIfUnique(scripts, owner_script);
9822 } 9820 }
9823 9821
9824 cls ^= toplevel_class(); 9822 cls ^= toplevel_class();
9825 if (!cls.IsNull()) { 9823 if (!cls.IsNull()) {
9826 owner_script = cls.script(); 9824 owner_script = cls.script();
9827 AddScriptIfUnique(scripts, owner_script); 9825 AddScriptIfUnique(scripts, owner_script);
9828 // Special case: Scripts that only contain external top-level functions 9826 // Special case: Scripts that only contain external top-level functions
9829 // are not included above, but can be referenced through a library's 9827 // are not included above, but can be referenced through a library's
(...skipping 12126 matching lines...) Expand 10 before | Expand all | Expand 10 after
21956 return tag_label.ToCString(); 21954 return tag_label.ToCString();
21957 } 21955 }
21958 21956
21959 21957
21960 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21958 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21961 Instance::PrintJSONImpl(stream, ref); 21959 Instance::PrintJSONImpl(stream, ref);
21962 } 21960 }
21963 21961
21964 21962
21965 } // namespace dart 21963 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698