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

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

Issue 99373002: Mark native functions when they are created. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/parser.cc ('k') | runtime/vm/runtime_entry_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) 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/resolver.h" 5 #include "vm/resolver.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 Function::Handle(method.ImplicitClosureFunction()); 70 Function::Handle(method.ImplicitClosureFunction());
71 71
72 const Class& owner = Class::Handle(closure_function.Owner()); 72 const Class& owner = Class::Handle(closure_function.Owner());
73 Function& extractor = Function::Handle( 73 Function& extractor = Function::Handle(
74 Function::New(String::Handle(Symbols::New(getter_name)), 74 Function::New(String::Handle(Symbols::New(getter_name)),
75 RawFunction::kMethodExtractor, 75 RawFunction::kMethodExtractor,
76 false, // Not static. 76 false, // Not static.
77 false, // Not const. 77 false, // Not const.
78 false, // Not abstract. 78 false, // Not abstract.
79 false, // Not external. 79 false, // Not external.
80 false, // Not native.
80 owner, 81 owner,
81 0)); // No token position. 82 0)); // No token position.
82 83
83 // Initialize signature: receiver is a single fixed parameter. 84 // Initialize signature: receiver is a single fixed parameter.
84 const intptr_t kNumParameters = 1; 85 const intptr_t kNumParameters = 1;
85 extractor.set_num_fixed_parameters(kNumParameters); 86 extractor.set_num_fixed_parameters(kNumParameters);
86 extractor.SetNumOptionalParameters(0, 0); 87 extractor.SetNumOptionalParameters(0, 0);
87 extractor.set_parameter_types(Array::Handle(Array::New(kNumParameters, 88 extractor.set_parameter_types(Array::Handle(Array::New(kNumParameters,
88 Heap::kOld))); 89 Heap::kOld)));
89 extractor.set_parameter_names(Array::Handle(Array::New(kNumParameters, 90 extractor.set_parameter_names(Array::Handle(Array::New(kNumParameters,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 OS::Print("ResolveStatic error '%s': %s.\n", 218 OS::Print("ResolveStatic error '%s': %s.\n",
218 function_name.ToCString(), 219 function_name.ToCString(),
219 error_message.ToCString()); 220 error_message.ToCString());
220 } 221 }
221 return Function::null(); 222 return Function::null();
222 } 223 }
223 return function.raw(); 224 return function.raw();
224 } 225 }
225 226
226 } // namespace dart 227 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/runtime_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698