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

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

Issue 21562002: Improve performance of Dart_ListGetAsBytes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 7 years, 4 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/dart_entry.h" 5 #include "vm/dart_entry.h"
6 6
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 14 matching lines...) Expand all
25 const Array& arguments_descriptor = 25 const Array& arguments_descriptor =
26 Array::Handle(ArgumentsDescriptor::New(arguments.Length())); 26 Array::Handle(ArgumentsDescriptor::New(arguments.Length()));
27 return InvokeFunction(function, arguments, arguments_descriptor); 27 return InvokeFunction(function, arguments, arguments_descriptor);
28 } 28 }
29 29
30 30
31 RawObject* DartEntry::InvokeFunction(const Function& function, 31 RawObject* DartEntry::InvokeFunction(const Function& function,
32 const Array& arguments, 32 const Array& arguments,
33 const Array& arguments_descriptor) { 33 const Array& arguments_descriptor) {
34 const Context& context = 34 const Context& context =
35 Context::ZoneHandle(Isolate::Current()->object_store()->empty_context()); 35 Context::Handle(Isolate::Current()->object_store()->empty_context());
36 ASSERT(context.isolate() == Isolate::Current()); 36 ASSERT(context.isolate() == Isolate::Current());
37 return InvokeFunction(function, arguments, arguments_descriptor, context); 37 return InvokeFunction(function, arguments, arguments_descriptor, context);
38 } 38 }
39 39
40 40
41 RawObject* DartEntry::InvokeFunction(const Function& function, 41 RawObject* DartEntry::InvokeFunction(const Function& function,
42 const Array& arguments, 42 const Array& arguments,
43 const Array& arguments_descriptor, 43 const Array& arguments_descriptor,
44 const Context& context) { 44 const Context& context) {
45 // Get the entrypoint corresponding to the function specified, this 45 // Get the entrypoint corresponding to the function specified, this
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 String::Handle(Field::GetterName(Symbols::_id())))); 556 String::Handle(Field::GetterName(Symbols::_id()))));
557 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); 557 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name));
558 ASSERT(!func.IsNull()); 558 ASSERT(!func.IsNull());
559 const Array& args = Array::Handle(Array::New(1)); 559 const Array& args = Array::Handle(Array::New(1));
560 args.SetAt(0, port); 560 args.SetAt(0, port);
561 return DartEntry::InvokeFunction(func, args); 561 return DartEntry::InvokeFunction(func, args);
562 } 562 }
563 563
564 564
565 } // namespace dart 565 } // namespace dart
OLDNEW
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/dart_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698