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

Side by Side Diff: vm/code_descriptors_test.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « vm/code_descriptors.cc ('k') | vm/code_generator_test.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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/globals.h" 6 #include "vm/globals.h"
7 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 7 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
8 8
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // We can't easily check that we put the stackmap at the correct pc, but 270 // We can't easily check that we put the stackmap at the correct pc, but
271 // we did if there was exactly one call seen. 271 // we did if there was exactly one call seen.
272 EXPECT(call_count == 1); 272 EXPECT(call_count == 1);
273 const Array& stack_maps = 273 const Array& stack_maps =
274 Array::Handle(stackmap_table_builder->FinalizeStackmaps(code)); 274 Array::Handle(stackmap_table_builder->FinalizeStackmaps(code));
275 code.set_stackmaps(stack_maps); 275 code.set_stackmaps(stack_maps);
276 276
277 // Now invoke 'A.moo' and it will trigger a GC when the native function 277 // Now invoke 'A.moo' and it will trigger a GC when the native function
278 // is called, this should then cause the stack map of function 'A.foo' 278 // is called, this should then cause the stack map of function 'A.foo'
279 // to be traversed and the appropriate objects visited. 279 // to be traversed and the appropriate objects visited.
280 const Array& args = Array::Handle(Object::empty_array()); 280 const Object& result = Object::Handle(
281 const Object& result = Object::Handle(DartEntry::InvokeStatic(function_foo, 281 DartEntry::InvokeStatic(function_foo, Object::empty_array()));
282 args));
283 EXPECT(!result.IsError()); 282 EXPECT(!result.IsError());
284 } 283 }
285 284
286 } // namespace dart 285 } // namespace dart
287 286
288 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) 287 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64)
OLDNEW
« no previous file with comments | « vm/code_descriptors.cc ('k') | vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698