| 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 4317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4328 bool Function::HasOptimizedCode() const { | 4328 bool Function::HasOptimizedCode() const { |
| 4329 return HasCode() && Code::Handle(raw_ptr()->code_).is_optimized(); | 4329 return HasCode() && Code::Handle(raw_ptr()->code_).is_optimized(); |
| 4330 } | 4330 } |
| 4331 | 4331 |
| 4332 | 4332 |
| 4333 const char* Function::ToCString() const { | 4333 const char* Function::ToCString() const { |
| 4334 const char* f0 = is_static() ? " static" : ""; | 4334 const char* f0 = is_static() ? " static" : ""; |
| 4335 const char* f1 = NULL; | 4335 const char* f1 = NULL; |
| 4336 const char* f2 = is_const() ? " const" : ""; | 4336 const char* f2 = is_const() ? " const" : ""; |
| 4337 switch (kind()) { | 4337 switch (kind()) { |
| 4338 case RawFunction::kFunction: | 4338 case RawFunction::kRegularFunction: |
| 4339 case RawFunction::kClosureFunction: | 4339 case RawFunction::kClosureFunction: |
| 4340 case RawFunction::kGetterFunction: | 4340 case RawFunction::kGetterFunction: |
| 4341 case RawFunction::kSetterFunction: | 4341 case RawFunction::kSetterFunction: |
| 4342 f1 = ""; | 4342 f1 = ""; |
| 4343 break; | 4343 break; |
| 4344 case RawFunction::kSignatureFunction: | 4344 case RawFunction::kSignatureFunction: |
| 4345 f1 = " signature"; | 4345 f1 = " signature"; |
| 4346 break; | 4346 break; |
| 4347 case RawFunction::kAbstract: | 4347 case RawFunction::kAbstract: |
| 4348 f1 = " abstract"; | 4348 f1 = " abstract"; |
| (...skipping 6526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10875 const String& str = String::Handle(pattern()); | 10875 const String& str = String::Handle(pattern()); |
| 10876 const char* format = "JSRegExp: pattern=%s flags=%s"; | 10876 const char* format = "JSRegExp: pattern=%s flags=%s"; |
| 10877 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 10877 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
| 10878 char* chars = reinterpret_cast<char*>( | 10878 char* chars = reinterpret_cast<char*>( |
| 10879 Isolate::Current()->current_zone()->Allocate(len + 1)); | 10879 Isolate::Current()->current_zone()->Allocate(len + 1)); |
| 10880 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 10880 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
| 10881 return chars; | 10881 return chars; |
| 10882 } | 10882 } |
| 10883 | 10883 |
| 10884 } // namespace dart | 10884 } // namespace dart |
| OLD | NEW |