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

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

Issue 15979010: Fix two bugs in the Dart VM's super-noSuchMethod invocation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « no previous file | runtime/vm/compiler.h » ('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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 7
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool expectation3[kStackSlotCount] = 125 bool expectation3[kStackSlotCount] =
126 { true, false, true, true, true, true, false, false, 126 { true, false, true, true, true, true, false, false,
127 false, false, true }; 127 false, false, true };
128 for (intptr_t i = 0; i < kStackSlotCount; ++i) { 128 for (intptr_t i = 0; i < kStackSlotCount; ++i) {
129 EXPECT_EQ(expectation3[i], stack_bitmap->Get(i)); 129 EXPECT_EQ(expectation3[i], stack_bitmap->Get(i));
130 } 130 }
131 // Add a stack map entry at pc offset 3. 131 // Add a stack map entry at pc offset 3.
132 stackmap_table_builder->AddEntry(3, stack_bitmap, 0); 132 stackmap_table_builder->AddEntry(3, stack_bitmap, 0);
133 133
134 const Error& error = 134 const Error& error =
135 Error::Handle(Compiler::CompileParsedFunction(*parsed_function)); 135 Error::Handle(Compiler::CompileParsedFunction(parsed_function));
136 EXPECT(error.IsNull()); 136 EXPECT(error.IsNull());
137 const Code& code = Code::Handle(function.CurrentCode()); 137 const Code& code = Code::Handle(function.CurrentCode());
138 138
139 const Array& stack_maps = 139 const Array& stack_maps =
140 Array::Handle(stackmap_table_builder->FinalizeStackmaps(code)); 140 Array::Handle(stackmap_table_builder->FinalizeStackmaps(code));
141 code.set_stackmaps(stack_maps); 141 code.set_stackmaps(stack_maps);
142 const Array& stack_map_list = Array::Handle(code.stackmaps()); 142 const Array& stack_map_list = Array::Handle(code.stackmaps());
143 EXPECT(!stack_map_list.IsNull()); 143 EXPECT(!stack_map_list.IsNull());
144 Stackmap& stack_map = Stackmap::Handle(); 144 Stackmap& stack_map = Stackmap::Handle();
145 EXPECT_EQ(4, stack_map_list.Length()); 145 EXPECT_EQ(4, stack_map_list.Length());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // Now invoke 'A.moo' and it will trigger a GC when the native function 276 // Now invoke 'A.moo' and it will trigger a GC when the native function
277 // is called, this should then cause the stack map of function 'A.foo' 277 // is called, this should then cause the stack map of function 'A.foo'
278 // to be traversed and the appropriate objects visited. 278 // to be traversed and the appropriate objects visited.
279 const Object& result = Object::Handle( 279 const Object& result = Object::Handle(
280 DartEntry::InvokeFunction(function_foo, Object::empty_array())); 280 DartEntry::InvokeFunction(function_foo, Object::empty_array()));
281 EXPECT(!result.IsError()); 281 EXPECT(!result.IsError());
282 } 282 }
283 283
284 } // namespace dart 284 } // namespace dart
285 285
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698