| 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 7211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7222 intptr_t result_index = deopt_ids[i]; | 7222 intptr_t result_index = deopt_ids[i]; |
| 7223 ASSERT(result.At(result_index) == Object::null()); | 7223 ASSERT(result.At(result_index) == Object::null()); |
| 7224 result.SetAt(result_index, Object::Handle(ic_data_objs.At(i))); | 7224 result.SetAt(result_index, Object::Handle(ic_data_objs.At(i))); |
| 7225 } | 7225 } |
| 7226 return result.raw(); | 7226 return result.raw(); |
| 7227 } | 7227 } |
| 7228 | 7228 |
| 7229 | 7229 |
| 7230 void Code::ExtractUncalledStaticCallDeoptIds( | 7230 void Code::ExtractUncalledStaticCallDeoptIds( |
| 7231 GrowableArray<intptr_t>* deopt_ids) const { | 7231 GrowableArray<intptr_t>* deopt_ids) const { |
| 7232 ASSERT(!IsNull() && !is_optimized()); |
| 7232 ASSERT(deopt_ids != NULL); | 7233 ASSERT(deopt_ids != NULL); |
| 7233 deopt_ids->Clear(); | 7234 deopt_ids->Clear(); |
| 7234 const PcDescriptors& descriptors = | 7235 const PcDescriptors& descriptors = |
| 7235 PcDescriptors::Handle(this->pc_descriptors()); | 7236 PcDescriptors::Handle(this->pc_descriptors()); |
| 7236 Function& function = Function::Handle(); | 7237 Function& function = Function::Handle(); |
| 7237 for (intptr_t i = 0; i < descriptors.Length(); i++) { | 7238 for (intptr_t i = 0; i < descriptors.Length(); i++) { |
| 7238 if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) { | 7239 if (descriptors.DescriptorKind(i) == PcDescriptors::kFuncCall) { |
| 7239 // Static call. | 7240 // Static call. |
| 7240 uword target_addr; | 7241 uword target_addr; |
| 7241 CodePatcher::GetStaticCallAt(descriptors.PC(i), &function, &target_addr); | 7242 CodePatcher::GetStaticCallAt(descriptors.PC(i), &function, &target_addr); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7409 VariableDescAddr(scope_index)->context_level = Smi::New(context_level); | 7410 VariableDescAddr(scope_index)->context_level = Smi::New(context_level); |
| 7410 } | 7411 } |
| 7411 | 7412 |
| 7412 | 7413 |
| 7413 const char* ContextScope::ToCString() const { | 7414 const char* ContextScope::ToCString() const { |
| 7414 return "ContextScope"; | 7415 return "ContextScope"; |
| 7415 } | 7416 } |
| 7416 | 7417 |
| 7417 | 7418 |
| 7418 const char* ICData::ToCString() const { | 7419 const char* ICData::ToCString() const { |
| 7419 const char* kFormat = "ICData target:%s"; | 7420 const char* kFormat = "ICData target:'%s' num-checks: %"Pd""; |
| 7420 const String& name = String::Handle(target_name()); | 7421 const String& name = String::Handle(target_name()); |
| 7421 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString()) + 1; | 7422 const intptr_t num = NumberOfChecks(); |
| 7423 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString(), num) + 1; |
| 7422 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 7424 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 7423 OS::SNPrint(chars, len, kFormat, name.ToCString()); | 7425 OS::SNPrint(chars, len, kFormat, name.ToCString(), num); |
| 7424 return chars; | 7426 return chars; |
| 7425 } | 7427 } |
| 7426 | 7428 |
| 7427 | 7429 |
| 7428 void ICData::set_function(const Function& value) const { | 7430 void ICData::set_function(const Function& value) const { |
| 7429 StorePointer(&raw_ptr()->function_, value.raw()); | 7431 StorePointer(&raw_ptr()->function_, value.raw()); |
| 7430 } | 7432 } |
| 7431 | 7433 |
| 7432 | 7434 |
| 7433 void ICData::set_target_name(const String& value) const { | 7435 void ICData::set_target_name(const String& value) const { |
| (...skipping 4541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11975 } | 11977 } |
| 11976 return result.raw(); | 11978 return result.raw(); |
| 11977 } | 11979 } |
| 11978 | 11980 |
| 11979 | 11981 |
| 11980 const char* WeakProperty::ToCString() const { | 11982 const char* WeakProperty::ToCString() const { |
| 11981 return "_WeakProperty"; | 11983 return "_WeakProperty"; |
| 11982 } | 11984 } |
| 11983 | 11985 |
| 11984 } // namespace dart | 11986 } // namespace dart |
| OLD | NEW |