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

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

Issue 1566553003: More 0 => Scanner::kNoSourcePos. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')
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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 RawFunction::Kind kind) const { 2630 RawFunction::Kind kind) const {
2631 Function& invocation = Function::Handle( 2631 Function& invocation = Function::Handle(
2632 Function::New(String::Handle(Symbols::New(target_name)), 2632 Function::New(String::Handle(Symbols::New(target_name)),
2633 kind, 2633 kind,
2634 false, // Not static. 2634 false, // Not static.
2635 false, // Not const. 2635 false, // Not const.
2636 false, // Not abstract. 2636 false, // Not abstract.
2637 false, // Not external. 2637 false, // Not external.
2638 false, // Not native. 2638 false, // Not native.
2639 *this, 2639 *this,
2640 0)); // No token position. 2640 0)); // token_pos
2641 ArgumentsDescriptor desc(args_desc); 2641 ArgumentsDescriptor desc(args_desc);
2642 invocation.set_num_fixed_parameters(desc.PositionalCount()); 2642 invocation.set_num_fixed_parameters(desc.PositionalCount());
2643 invocation.SetNumOptionalParameters(desc.NamedCount(), 2643 invocation.SetNumOptionalParameters(desc.NamedCount(),
2644 false); // Not positional. 2644 false); // Not positional.
2645 invocation.set_parameter_types(Array::Handle(Array::New(desc.Count(), 2645 invocation.set_parameter_types(Array::Handle(Array::New(desc.Count(),
2646 Heap::kOld))); 2646 Heap::kOld)));
2647 invocation.set_parameter_names(Array::Handle(Array::New(desc.Count(), 2647 invocation.set_parameter_names(Array::Handle(Array::New(desc.Count(),
2648 Heap::kOld))); 2648 Heap::kOld)));
2649 // Receiver. 2649 // Receiver.
2650 invocation.SetParameterTypeAt(0, Object::dynamic_type()); 2650 invocation.SetParameterTypeAt(0, Object::dynamic_type());
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2687 const Class& owner = Class::Handle(closure_function.Owner()); 2687 const Class& owner = Class::Handle(closure_function.Owner());
2688 Function& extractor = Function::Handle( 2688 Function& extractor = Function::Handle(
2689 Function::New(String::Handle(Symbols::New(getter_name)), 2689 Function::New(String::Handle(Symbols::New(getter_name)),
2690 RawFunction::kMethodExtractor, 2690 RawFunction::kMethodExtractor,
2691 false, // Not static. 2691 false, // Not static.
2692 false, // Not const. 2692 false, // Not const.
2693 false, // Not abstract. 2693 false, // Not abstract.
2694 false, // Not external. 2694 false, // Not external.
2695 false, // Not native. 2695 false, // Not native.
2696 owner, 2696 owner,
2697 0)); // No token position. 2697 0)); // token_pos
2698 2698
2699 // Initialize signature: receiver is a single fixed parameter. 2699 // Initialize signature: receiver is a single fixed parameter.
2700 const intptr_t kNumParameters = 1; 2700 const intptr_t kNumParameters = 1;
2701 extractor.set_num_fixed_parameters(kNumParameters); 2701 extractor.set_num_fixed_parameters(kNumParameters);
2702 extractor.SetNumOptionalParameters(0, 0); 2702 extractor.SetNumOptionalParameters(0, 0);
2703 extractor.set_parameter_types(Object::extractor_parameter_types()); 2703 extractor.set_parameter_types(Object::extractor_parameter_types());
2704 extractor.set_parameter_names(Object::extractor_parameter_names()); 2704 extractor.set_parameter_names(Object::extractor_parameter_names());
2705 extractor.set_result_type(Object::dynamic_type()); 2705 extractor.set_result_type(Object::dynamic_type());
2706 2706
2707 extractor.set_extracted_method_closure(closure_function); 2707 extractor.set_extracted_method_closure(closure_function);
(...skipping 3804 matching lines...) Expand 10 before | Expand all | Expand 10 after
6512 bool is_static) { 6512 bool is_static) {
6513 const Function& result = Function::Handle( 6513 const Function& result = Function::Handle(
6514 Function::New(String::Handle(Symbols::New(":Eval")), 6514 Function::New(String::Handle(Symbols::New(":Eval")),
6515 RawFunction::kRegularFunction, 6515 RawFunction::kRegularFunction,
6516 is_static, 6516 is_static,
6517 /* is_const = */ false, 6517 /* is_const = */ false,
6518 /* is_abstract = */ false, 6518 /* is_abstract = */ false,
6519 /* is_external = */ false, 6519 /* is_external = */ false,
6520 /* is_native = */ false, 6520 /* is_native = */ false,
6521 owner, 6521 owner,
6522 0)); 6522 /* token_pos = */ 0));
6523 ASSERT(!script.IsNull()); 6523 ASSERT(!script.IsNull());
6524 result.set_is_debuggable(false); 6524 result.set_is_debuggable(false);
6525 result.set_is_visible(true); 6525 result.set_is_visible(true);
6526 result.set_eval_script(script); 6526 result.set_eval_script(script);
6527 return result.raw(); 6527 return result.raw();
6528 } 6528 }
6529 6529
6530 RawFunction* Function::ImplicitClosureFunction() const { 6530 RawFunction* Function::ImplicitClosureFunction() const {
6531 // Return the existing implicit closure function if any. 6531 // Return the existing implicit closure function if any.
6532 if (implicit_closure_function() != Function::null()) { 6532 if (implicit_closure_function() != Function::null()) {
(...skipping 15508 matching lines...) Expand 10 before | Expand all | Expand 10 after
22041 return tag_label.ToCString(); 22041 return tag_label.ToCString();
22042 } 22042 }
22043 22043
22044 22044
22045 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 22045 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
22046 Instance::PrintJSONImpl(stream, ref); 22046 Instance::PrintJSONImpl(stream, ref);
22047 } 22047 }
22048 22048
22049 22049
22050 } // namespace dart 22050 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698