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

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

Issue 1320673012: Lookup getter/setter symbols before alllocating them, thus eliminating extra String allocations in … (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Formatting Created 5 years, 3 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.cc ('k') | 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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4761 matching lines...) Expand 10 before | Expand all | Expand 10 after
4772 4772
4773 uint16_t characters2[] = 4773 uint16_t characters2[] =
4774 { 'a', '\n', '\f', '\b', '\t', '\v', '\r', '\\', '$', 'z' }; 4774 { 'a', '\n', '\f', '\b', '\t', '\v', '\r', '\\', '$', 'z' };
4775 intptr_t len2 = ARRAY_SIZE(characters2); 4775 intptr_t len2 = ARRAY_SIZE(characters2);
4776 4776
4777 const String& str2 = String::Handle( 4777 const String& str2 = String::Handle(
4778 ExternalTwoByteString::New(characters2, len2, NULL, NULL, Heap::kNew)); 4778 ExternalTwoByteString::New(characters2, len2, NULL, NULL, Heap::kNew));
4779 const String* data[3] = { &str1, &Symbols::Dot(), &str2 }; 4779 const String* data[3] = { &str1, &Symbols::Dot(), &str2 };
4780 CheckConcatAll(data, 3); 4780 CheckConcatAll(data, 3);
4781 } 4781 }
4782
4783 {
4784 const String& empty = String::Handle(String::New(""));
4785 const String* data[3] = { &Symbols::FallThroughError(),
4786 &empty,
4787 &Symbols::isPaused() };
4788 CheckConcatAll(data, 3);
4789 }
4782 } 4790 }
4783 4791
4784 } // namespace dart 4792 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698