| 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 "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
| 10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
| (...skipping 5950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5961 VariableDescAddr(scope_index)->context_level = Smi::New(context_level); | 5961 VariableDescAddr(scope_index)->context_level = Smi::New(context_level); |
| 5962 } | 5962 } |
| 5963 | 5963 |
| 5964 | 5964 |
| 5965 const char* ContextScope::ToCString() const { | 5965 const char* ContextScope::ToCString() const { |
| 5966 return "ContextScope"; | 5966 return "ContextScope"; |
| 5967 } | 5967 } |
| 5968 | 5968 |
| 5969 | 5969 |
| 5970 const char* ICData::ToCString() const { | 5970 const char* ICData::ToCString() const { |
| 5971 return "ICData"; | 5971 const char* kFormat = "ICData target:%s"; |
| 5972 const String& name = String::Handle(target_name()); |
| 5973 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString()) + 1; |
| 5974 char* chars = reinterpret_cast<char*>( |
| 5975 Isolate::Current()->current_zone()->Allocate(len)); |
| 5976 OS::SNPrint(chars, len, kFormat, name.ToCString()); |
| 5977 return chars; |
| 5972 } | 5978 } |
| 5973 | 5979 |
| 5974 | 5980 |
| 5975 void ICData::set_function(const Function& value) const { | 5981 void ICData::set_function(const Function& value) const { |
| 5976 raw_ptr()->function_ = value.raw(); | 5982 raw_ptr()->function_ = value.raw(); |
| 5977 } | 5983 } |
| 5978 | 5984 |
| 5979 | 5985 |
| 5980 void ICData::set_target_name(const String& value) const { | 5986 void ICData::set_target_name(const String& value) const { |
| 5981 raw_ptr()->target_name_ = value.raw(); | 5987 raw_ptr()->target_name_ = value.raw(); |
| (...skipping 2981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8963 const String& str = String::Handle(pattern()); | 8969 const String& str = String::Handle(pattern()); |
| 8964 const char* format = "JSRegExp: pattern=%s flags=%s"; | 8970 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 8965 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 8971 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 8966 char* chars = reinterpret_cast<char*>( | 8972 char* chars = reinterpret_cast<char*>( |
| 8967 Isolate::Current()->current_zone()->Allocate(len + 1)); | 8973 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 8968 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 8974 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 8969 return chars; | 8975 return chars; |
| 8970 } | 8976 } |
| 8971 | 8977 |
| 8972 } // namespace dart | 8978 } // namespace dart |
| OLD | NEW |