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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 6723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6734 break; | 6734 break; |
6735 case RawFunction::kMethodExtractor: | 6735 case RawFunction::kMethodExtractor: |
6736 kind_str = " method-extractor"; | 6736 kind_str = " method-extractor"; |
6737 break; | 6737 break; |
6738 case RawFunction::kNoSuchMethodDispatcher: | 6738 case RawFunction::kNoSuchMethodDispatcher: |
6739 kind_str = " no-such-method-dispatcher"; | 6739 kind_str = " no-such-method-dispatcher"; |
6740 break; | 6740 break; |
6741 case RawFunction::kInvokeFieldDispatcher: | 6741 case RawFunction::kInvokeFieldDispatcher: |
6742 kind_str = "invoke-field-dispatcher"; | 6742 kind_str = "invoke-field-dispatcher"; |
6743 break; | 6743 break; |
6744 case RawFunction::kIrregexpFunction: | |
Florian Schneider
2014/09/16 11:11:48
Check for other places where you need to add a cas
jgruber1
2014/09/22 18:58:04
Done.
| |
6745 kind_str = "irregexp-function"; | |
6746 break; | |
6744 default: | 6747 default: |
6745 UNREACHABLE(); | 6748 UNREACHABLE(); |
6746 } | 6749 } |
6747 const char* kFormat = "Function '%s':%s%s%s%s."; | 6750 const char* kFormat = "Function '%s':%s%s%s%s."; |
6748 const char* function_name = String::Handle(name()).ToCString(); | 6751 const char* function_name = String::Handle(name()).ToCString(); |
6749 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, | 6752 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, |
6750 static_str, abstract_str, kind_str, const_str) + 1; | 6753 static_str, abstract_str, kind_str, const_str) + 1; |
6751 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 6754 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
6752 OS::SNPrint(chars, len, kFormat, function_name, | 6755 OS::SNPrint(chars, len, kFormat, function_name, |
6753 static_str, abstract_str, kind_str, const_str); | 6756 static_str, abstract_str, kind_str, const_str); |
(...skipping 12510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
19264 index += OS::SNPrint((chars + index), | 19267 index += OS::SNPrint((chars + index), |
19265 (total_len + 1 - index), | 19268 (total_len + 1 - index), |
19266 "%s", | 19269 "%s", |
19267 frame_strings[i]); | 19270 frame_strings[i]); |
19268 } | 19271 } |
19269 chars[total_len] = '\0'; | 19272 chars[total_len] = '\0'; |
19270 return chars; | 19273 return chars; |
19271 } | 19274 } |
19272 | 19275 |
19273 | 19276 |
19277 void JSRegExp::set_one_byte_function(const Function& function) { | |
19278 StorePointer(&raw_ptr()->one_byte_function_, function.raw()); | |
19279 } | |
19280 | |
19281 | |
19282 void JSRegExp::set_two_byte_function(const Function& function) { | |
19283 StorePointer(&raw_ptr()->two_byte_function_, function.raw()); | |
19284 } | |
19285 | |
19286 | |
19274 void JSRegExp::set_pattern(const String& pattern) const { | 19287 void JSRegExp::set_pattern(const String& pattern) const { |
19275 StorePointer(&raw_ptr()->pattern_, pattern.raw()); | 19288 StorePointer(&raw_ptr()->pattern_, pattern.raw()); |
19276 } | 19289 } |
19277 | 19290 |
19278 | 19291 |
19279 void JSRegExp::set_num_bracket_expressions(intptr_t value) const { | 19292 void JSRegExp::set_num_bracket_expressions(intptr_t value) const { |
19280 raw_ptr()->num_bracket_expressions_ = Smi::New(value); | 19293 raw_ptr()->num_bracket_expressions_ = Smi::New(value); |
19281 } | 19294 } |
19282 | 19295 |
19283 | 19296 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
19580 return tag_label.ToCString(); | 19593 return tag_label.ToCString(); |
19581 } | 19594 } |
19582 | 19595 |
19583 | 19596 |
19584 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19597 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
19585 Instance::PrintJSONImpl(stream, ref); | 19598 Instance::PrintJSONImpl(stream, ref); |
19586 } | 19599 } |
19587 | 19600 |
19588 | 19601 |
19589 } // namespace dart | 19602 } // namespace dart |
OLD | NEW |