| 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 7191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7202 const Array& result = Array::Handle(Array::New(max_id + 1)); | 7202 const Array& result = Array::Handle(Array::New(max_id + 1)); |
| 7203 for (intptr_t i = 0; i < deopt_ids.length(); i++) { | 7203 for (intptr_t i = 0; i < deopt_ids.length(); i++) { |
| 7204 intptr_t result_index = deopt_ids[i]; | 7204 intptr_t result_index = deopt_ids[i]; |
| 7205 ASSERT(result.At(result_index) == Object::null()); | 7205 ASSERT(result.At(result_index) == Object::null()); |
| 7206 result.SetAt(result_index, Object::Handle(ic_data_objs.At(i))); | 7206 result.SetAt(result_index, Object::Handle(ic_data_objs.At(i))); |
| 7207 } | 7207 } |
| 7208 return result.raw(); | 7208 return result.raw(); |
| 7209 } | 7209 } |
| 7210 | 7210 |
| 7211 | 7211 |
| 7212 void Code::ExtractUncalledStaticCallDeoptIds( |
| 7213 GrowableArray<intptr_t>* deopt_ids) const { |
| 7214 ASSERT(deopt_ids != NULL); |
| 7215 deopt_ids->Clear(); |
| 7216 const PcDescriptors& descriptors = |
| 7217 PcDescriptors::Handle(this->pc_descriptors()); |
| 7218 Function& function = Function::Handle(); |
| 7219 for (intptr_t i = 0; i < descriptors.Length(); i++) { |
| 7220 if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) { |
| 7221 // Static call. |
| 7222 uword target_addr; |
| 7223 CodePatcher::GetStaticCallAt(descriptors.PC(i), &function, &target_addr); |
| 7224 if (target_addr == StubCode::CallStaticFunctionEntryPoint()) { |
| 7225 deopt_ids->Add(descriptors.DeoptId(i)); |
| 7226 } |
| 7227 } |
| 7228 } |
| 7229 } |
| 7230 |
| 7231 |
| 7212 RawStackmap* Code::GetStackmap(uword pc, Array* maps, Stackmap* map) const { | 7232 RawStackmap* Code::GetStackmap(uword pc, Array* maps, Stackmap* map) const { |
| 7213 // This code is used during iterating frames during a GC and hence it | 7233 // This code is used during iterating frames during a GC and hence it |
| 7214 // should not in turn start a GC. | 7234 // should not in turn start a GC. |
| 7215 NoGCScope no_gc; | 7235 NoGCScope no_gc; |
| 7216 if (stackmaps() == Array::null()) { | 7236 if (stackmaps() == Array::null()) { |
| 7217 // No stack maps are present in the code object which means this | 7237 // No stack maps are present in the code object which means this |
| 7218 // frame relies on tagged pointers. | 7238 // frame relies on tagged pointers. |
| 7219 return Stackmap::null(); | 7239 return Stackmap::null(); |
| 7220 } | 7240 } |
| 7221 // A stack map is present in the code object, use the stack map to visit | 7241 // A stack map is present in the code object, use the stack map to visit |
| (...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11913 } | 11933 } |
| 11914 return result.raw(); | 11934 return result.raw(); |
| 11915 } | 11935 } |
| 11916 | 11936 |
| 11917 | 11937 |
| 11918 const char* WeakProperty::ToCString() const { | 11938 const char* WeakProperty::ToCString() const { |
| 11919 return "_WeakProperty"; | 11939 return "_WeakProperty"; |
| 11920 } | 11940 } |
| 11921 | 11941 |
| 11922 } // namespace dart | 11942 } // namespace dart |
| OLD | NEW |