| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 6984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6995 void Code::set_deopt_info_array(const Array& array) const { | 6995 void Code::set_deopt_info_array(const Array& array) const { |
| 6996 StorePointer(&raw_ptr()->deopt_info_array_, array.raw()); | 6996 StorePointer(&raw_ptr()->deopt_info_array_, array.raw()); |
| 6997 } | 6997 } |
| 6998 | 6998 |
| 6999 | 6999 |
| 7000 void Code::set_object_table(const Array& array) const { | 7000 void Code::set_object_table(const Array& array) const { |
| 7001 StorePointer(&raw_ptr()->object_table_, array.raw()); | 7001 StorePointer(&raw_ptr()->object_table_, array.raw()); |
| 7002 } | 7002 } |
| 7003 | 7003 |
| 7004 | 7004 |
| 7005 void Code::set_static_calls_target_table(const Array& value) const { |
| 7006 StorePointer(&raw_ptr()->static_calls_target_table_, value.raw()); |
| 7007 } |
| 7008 |
| 7009 |
| 7010 RawFunction* Code::GetStaticCallTargetAt(uword pc) { |
| 7011 const Code& code = Code::Handle(Code::LookupCode(pc)); |
| 7012 if (!code.IsNull()) { |
| 7013 RawObject* raw_code_offset = |
| 7014 reinterpret_cast<RawObject*>(Smi::New(pc - code.EntryPoint())); |
| 7015 const Array& array = |
| 7016 Array::Handle(code.raw_ptr()->static_calls_target_table_); |
| 7017 for (intptr_t i = 0; i < array.Length(); i += 2) { |
| 7018 if (array.At(i) == raw_code_offset) { |
| 7019 Function& function = Function::Handle(); |
| 7020 function ^= array.At(i + 1); |
| 7021 return function.raw(); |
| 7022 } |
| 7023 } |
| 7024 } |
| 7025 return Function::null(); |
| 7026 } |
| 7027 |
| 7028 |
| 7005 void Code::set_resolved_static_calls(const GrowableObjectArray& val) const { | 7029 void Code::set_resolved_static_calls(const GrowableObjectArray& val) const { |
| 7006 StorePointer(&raw_ptr()->resolved_static_calls_, val.raw()); | 7030 StorePointer(&raw_ptr()->resolved_static_calls_, val.raw()); |
| 7007 } | 7031 } |
| 7008 | 7032 |
| 7009 | 7033 |
| 7010 const Code::Comments& Code::comments() const { | 7034 const Code::Comments& Code::comments() const { |
| 7011 Comments* comments = new Code::Comments(raw_ptr()->comments_); | 7035 Comments* comments = new Code::Comments(raw_ptr()->comments_); |
| 7012 return *comments; | 7036 return *comments; |
| 7013 } | 7037 } |
| 7014 | 7038 |
| (...skipping 5071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12086 } | 12110 } |
| 12087 return result.raw(); | 12111 return result.raw(); |
| 12088 } | 12112 } |
| 12089 | 12113 |
| 12090 | 12114 |
| 12091 const char* WeakProperty::ToCString() const { | 12115 const char* WeakProperty::ToCString() const { |
| 12092 return "_WeakProperty"; | 12116 return "_WeakProperty"; |
| 12093 } | 12117 } |
| 12094 | 12118 |
| 12095 } // namespace dart | 12119 } // namespace dart |
| OLD | NEW |