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

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

Issue 12578009: - Canonicalize types, type_arguments only when the object is marked as being from the core librarie… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/snapshot.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 "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.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_api_message.h" 10 #include "vm/dart_api_message.h"
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 Dart_CObject* root = api_reader.ReadMessage(); 737 Dart_CObject* root = api_reader.ReadMessage();
738 EXPECT_EQ(Dart_CObject::kUint8Array, root->type); 738 EXPECT_EQ(Dart_CObject::kUint8Array, root->type);
739 EXPECT_EQ(kByteArrayLength, root->value.as_byte_array.length); 739 EXPECT_EQ(kByteArrayLength, root->value.as_byte_array.length);
740 EXPECT(root->value.as_byte_array.values == NULL); 740 EXPECT(root->value.as_byte_array.values == NULL);
741 CheckEncodeDecodeMessage(root); 741 CheckEncodeDecodeMessage(root);
742 } 742 }
743 743
744 744
745 class TestSnapshotWriter : public SnapshotWriter { 745 class TestSnapshotWriter : public SnapshotWriter {
746 public: 746 public:
747 static const intptr_t kIncrementSize = 64 * KB; 747 static const intptr_t kInitialSize = 64 * KB;
748 TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc) 748 TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
749 : SnapshotWriter(Snapshot::kScript, buffer, alloc, kIncrementSize) { 749 : SnapshotWriter(Snapshot::kScript, buffer, alloc, kInitialSize) {
750 ASSERT(buffer != NULL); 750 ASSERT(buffer != NULL);
751 ASSERT(alloc != NULL); 751 ASSERT(alloc != NULL);
752 } 752 }
753 ~TestSnapshotWriter() { } 753 ~TestSnapshotWriter() { }
754 754
755 // Writes just a script object 755 // Writes just a script object
756 void WriteScript(const Script& script) { 756 void WriteScript(const Script& script) {
757 WriteObject(script.raw()); 757 WriteObject(script.raw());
758 UnmarkAll(); 758 UnmarkAll();
759 } 759 }
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 EXPECT(Dart_ErrorHasException(result)); 2199 EXPECT(Dart_ErrorHasException(result));
2200 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", 2200 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n",
2201 Dart_GetError(result)); 2201 Dart_GetError(result));
2202 2202
2203 Dart_ExitScope(); 2203 Dart_ExitScope();
2204 } 2204 }
2205 2205
2206 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 2206 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
2207 2207
2208 } // namespace dart 2208 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698