| 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 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2947 const Array& param_values) const { | 2947 const Array& param_values) const { |
| 2948 const Function& eval_func = | 2948 const Function& eval_func = |
| 2949 Function::Handle(EvaluateHelper(*this, expr, param_names, true)); | 2949 Function::Handle(EvaluateHelper(*this, expr, param_names, true)); |
| 2950 const Object& result = | 2950 const Object& result = |
| 2951 Object::Handle(DartEntry::InvokeFunction(eval_func, param_values)); | 2951 Object::Handle(DartEntry::InvokeFunction(eval_func, param_values)); |
| 2952 return result.raw(); | 2952 return result.raw(); |
| 2953 } | 2953 } |
| 2954 | 2954 |
| 2955 | 2955 |
| 2956 // Ensure that top level parsing of the class has been done. | 2956 // Ensure that top level parsing of the class has been done. |
| 2957 // TODO(24109): Migrate interface to Thread*. |
| 2957 RawError* Class::EnsureIsFinalized(Isolate* isolate) const { | 2958 RawError* Class::EnsureIsFinalized(Isolate* isolate) const { |
| 2958 // Finalized classes have already been parsed. | 2959 // Finalized classes have already been parsed. |
| 2959 if (is_finalized()) { | 2960 if (is_finalized()) { |
| 2960 return Error::null(); | 2961 return Error::null(); |
| 2961 } | 2962 } |
| 2962 ASSERT(isolate != NULL); | 2963 ASSERT(isolate != NULL); |
| 2963 const Error& error = Error::Handle(isolate, Compiler::CompileClass(*this)); | 2964 const Error& error = Error::Handle(isolate, Compiler::CompileClass(*this)); |
| 2964 if (!error.IsNull() && (isolate->long_jump_base() != NULL)) { | 2965 if (!error.IsNull()) { |
| 2965 Report::LongJump(error); | 2966 ASSERT(isolate == Thread::Current()->isolate()); |
| 2966 UNREACHABLE(); | 2967 if (Thread::Current()->long_jump_base() != NULL) { |
| 2968 Report::LongJump(error); |
| 2969 UNREACHABLE(); |
| 2970 } |
| 2967 } | 2971 } |
| 2968 return error.raw(); | 2972 return error.raw(); |
| 2969 } | 2973 } |
| 2970 | 2974 |
| 2971 | 2975 |
| 2972 void Class::SetFields(const Array& value) const { | 2976 void Class::SetFields(const Array& value) const { |
| 2973 ASSERT(!value.IsNull()); | 2977 ASSERT(!value.IsNull()); |
| 2974 #if defined(DEBUG) | 2978 #if defined(DEBUG) |
| 2975 // Verify that all the fields in the array have this class as owner. | 2979 // Verify that all the fields in the array have this class as owner. |
| 2976 Field& field = Field::Handle(); | 2980 Field& field = Field::Handle(); |
| (...skipping 18404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21381 return tag_label.ToCString(); | 21385 return tag_label.ToCString(); |
| 21382 } | 21386 } |
| 21383 | 21387 |
| 21384 | 21388 |
| 21385 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21389 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21386 Instance::PrintJSONImpl(stream, ref); | 21390 Instance::PrintJSONImpl(stream, ref); |
| 21387 } | 21391 } |
| 21388 | 21392 |
| 21389 | 21393 |
| 21390 } // namespace dart | 21394 } // namespace dart |
| OLD | NEW |