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

Side by Side Diff: vm/dart_entry.cc

Issue 11519006: Add read only handles for the following predefined symbols (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/dart_api_impl.cc ('k') | vm/flow_graph_builder.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) 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/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/resolver.h" 10 #include "vm/resolver.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 function, 258 function,
259 arguments, 259 arguments,
260 kNoArgumentNames)); 260 kNoArgumentNames));
261 ASSERT(result.IsInstance() || result.IsError()); 261 ASSERT(result.IsInstance() || result.IsError());
262 return result.raw(); 262 return result.raw();
263 } 263 }
264 264
265 265
266 RawObject* DartLibraryCalls::Equals(const Instance& left, 266 RawObject* DartLibraryCalls::Equals(const Instance& left,
267 const Instance& right) { 267 const Instance& right) {
268 const String& function_name = String::Handle(Symbols::EqualOperator());
269 GrowableArray<const Object*> arguments; 268 GrowableArray<const Object*> arguments;
270 arguments.Add(&right); 269 arguments.Add(&right);
271 const int kNumArguments = 2; 270 const int kNumArguments = 2;
272 const int kNumNamedArguments = 0; 271 const int kNumNamedArguments = 0;
273 const Array& kNoArgumentNames = Array::Handle(); 272 const Array& kNoArgumentNames = Array::Handle();
274 const Function& function = Function::Handle( 273 const Function& function = Function::Handle(
275 Resolver::ResolveDynamic(left, 274 Resolver::ResolveDynamic(left,
276 function_name, 275 Symbols::EqualOperatorHandle(),
277 kNumArguments, 276 kNumArguments,
278 kNumNamedArguments)); 277 kNumNamedArguments));
279 ASSERT(!function.IsNull()); 278 ASSERT(!function.IsNull());
280 const Object& result = Object::Handle( 279 const Object& result = Object::Handle(
281 DartEntry::InvokeDynamic(left, function, arguments, kNoArgumentNames)); 280 DartEntry::InvokeDynamic(left, function, arguments, kNoArgumentNames));
282 ASSERT(result.IsInstance() || result.IsError()); 281 ASSERT(result.IsInstance() || result.IsError());
283 return result.raw(); 282 return result.raw();
284 } 283 }
285 284
286 285
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const String& func_name = String::Handle(Field::GetterName(field_name)); 360 const String& func_name = String::Handle(Field::GetterName(field_name));
362 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); 361 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name));
363 ASSERT(!func.IsNull()); 362 ASSERT(!func.IsNull());
364 GrowableArray<const Object*> arguments; 363 GrowableArray<const Object*> arguments;
365 const Array& kNoArgumentNames = Array::Handle(); 364 const Array& kNoArgumentNames = Array::Handle();
366 return DartEntry::InvokeDynamic(port, func, arguments, kNoArgumentNames); 365 return DartEntry::InvokeDynamic(port, func, arguments, kNoArgumentNames);
367 } 366 }
368 367
369 368
370 } // namespace dart 369 } // namespace dart
OLDNEW
« no previous file with comments | « vm/dart_api_impl.cc ('k') | vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698