| OLD | NEW |
| 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 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2810 } | 2810 } |
| 2811 | 2811 |
| 2812 | 2812 |
| 2813 static RawFunction* EvaluateHelper(const Class& cls, | 2813 static RawFunction* EvaluateHelper(const Class& cls, |
| 2814 const String& expr, | 2814 const String& expr, |
| 2815 const Array& param_names, | 2815 const Array& param_names, |
| 2816 bool is_static) { | 2816 bool is_static) { |
| 2817 const String& func_src = | 2817 const String& func_src = |
| 2818 String::Handle(BuildClosureSource(param_names, expr)); | 2818 String::Handle(BuildClosureSource(param_names, expr)); |
| 2819 Script& script = Script::Handle(); | 2819 Script& script = Script::Handle(); |
| 2820 script = Script::New(Symbols::Empty(), func_src, RawScript::kSourceTag); | 2820 script = Script::New(Symbols::EvalSourceUri(), |
| 2821 func_src, |
| 2822 RawScript::kSourceTag); |
| 2821 // In order to tokenize the source, we need to get the key to mangle | 2823 // In order to tokenize the source, we need to get the key to mangle |
| 2822 // private names from the library from which the class originates. | 2824 // private names from the library from which the class originates. |
| 2823 const Library& lib = Library::Handle(cls.library()); | 2825 const Library& lib = Library::Handle(cls.library()); |
| 2824 ASSERT(!lib.IsNull()); | 2826 ASSERT(!lib.IsNull()); |
| 2825 const String& lib_key = String::Handle(lib.private_key()); | 2827 const String& lib_key = String::Handle(lib.private_key()); |
| 2826 script.Tokenize(lib_key); | 2828 script.Tokenize(lib_key); |
| 2827 | 2829 |
| 2828 const Function& func = Function::Handle( | 2830 const Function& func = Function::Handle( |
| 2829 Function::NewEvalFunction(cls, script, is_static)); | 2831 Function::NewEvalFunction(cls, script, is_static)); |
| 2830 func.set_result_type(Type::Handle(Type::DynamicType())); | 2832 func.set_result_type(Type::Handle(Type::DynamicType())); |
| (...skipping 17884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20715 return tag_label.ToCString(); | 20717 return tag_label.ToCString(); |
| 20716 } | 20718 } |
| 20717 | 20719 |
| 20718 | 20720 |
| 20719 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20721 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20720 Instance::PrintJSONImpl(stream, ref); | 20722 Instance::PrintJSONImpl(stream, ref); |
| 20721 } | 20723 } |
| 20722 | 20724 |
| 20723 | 20725 |
| 20724 } // namespace dart | 20726 } // namespace dart |
| OLD | NEW |