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

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

Issue 583583007: 1. Add user tag to the pointers traversed in the object store (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object_store.cc ('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 "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 4337 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 elideSubstring("_InternalLinkedHashMap@", buffer, buffer); 4348 elideSubstring("_InternalLinkedHashMap@", buffer, buffer);
4349 EXPECT_STREQ( 4349 EXPECT_STREQ(
4350 "{\"type\":\"@Instance\",\"_vmType\":\"@LinkedHashMap\"," 4350 "{\"type\":\"@Instance\",\"_vmType\":\"@LinkedHashMap\","
4351 "\"class\":{\"type\":\"@Class\",\"id\":\"\"," 4351 "\"class\":{\"type\":\"@Class\",\"id\":\"\","
4352 "\"name\":\"_InternalLinkedHashMap\",\"_vmName\":\"\"},\"id\":\"\"}", 4352 "\"name\":\"_InternalLinkedHashMap\",\"_vmName\":\"\"},\"id\":\"\"}",
4353 buffer); 4353 buffer);
4354 } 4354 }
4355 // UserTag reference 4355 // UserTag reference
4356 { 4356 {
4357 JSONStream js; 4357 JSONStream js;
4358 Instance& tag = Instance::Handle(isolate->object_store()->default_tag()); 4358 Instance& tag = Instance::Handle(isolate->default_tag());
4359 tag.PrintJSON(&js, true); 4359 tag.PrintJSON(&js, true);
4360 elideSubstring("classes", js.ToCString(), buffer); 4360 elideSubstring("classes", js.ToCString(), buffer);
4361 elideSubstring("objects", buffer, buffer); 4361 elideSubstring("objects", buffer, buffer);
4362 elideSubstring("_UserTag@", buffer, buffer); 4362 elideSubstring("_UserTag@", buffer, buffer);
4363 EXPECT_STREQ( 4363 EXPECT_STREQ(
4364 "{\"type\":\"@Instance\",\"_vmType\":\"@UserTag\"," 4364 "{\"type\":\"@Instance\",\"_vmType\":\"@UserTag\","
4365 "\"class\":{\"type\":\"@Class\",\"id\":\"\",\"name\":\"_UserTag\"," 4365 "\"class\":{\"type\":\"@Class\",\"id\":\"\",\"name\":\"_UserTag\","
4366 "\"_vmName\":\"\"}," 4366 "\"_vmName\":\"\"},"
4367 "\"id\":\"\"}", 4367 "\"id\":\"\"}",
4368 buffer); 4368 buffer);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
4471 EXPECT_VALID(h_result); 4471 EXPECT_VALID(h_result);
4472 Integer& result = Integer::Handle(); 4472 Integer& result = Integer::Handle();
4473 result ^= Api::UnwrapHandle(h_result); 4473 result ^= Api::UnwrapHandle(h_result);
4474 String& foo = String::Handle(String::New("foo")); 4474 String& foo = String::Handle(String::New("foo"));
4475 Integer& expected = Integer::Handle(); 4475 Integer& expected = Integer::Handle();
4476 expected ^= foo.HashCode(); 4476 expected ^= foo.HashCode();
4477 EXPECT(result.IsIdenticalTo(expected)); 4477 EXPECT(result.IsIdenticalTo(expected));
4478 } 4478 }
4479 4479
4480 } // namespace dart 4480 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698