OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 995 |
996 | 996 |
997 void JSObject::JSObjectShortPrint(StringStream* accumulator) { | 997 void JSObject::JSObjectShortPrint(StringStream* accumulator) { |
998 switch (map()->instance_type()) { | 998 switch (map()->instance_type()) { |
999 case JS_ARRAY_TYPE: { | 999 case JS_ARRAY_TYPE: { |
1000 double length = JSArray::cast(this)->length()->Number(); | 1000 double length = JSArray::cast(this)->length()->Number(); |
1001 accumulator->Add("<JS array[%u]>", static_cast<uint32_t>(length)); | 1001 accumulator->Add("<JS array[%u]>", static_cast<uint32_t>(length)); |
1002 break; | 1002 break; |
1003 } | 1003 } |
1004 case JS_WEAK_MAP_TYPE: { | 1004 case JS_WEAK_MAP_TYPE: { |
1005 int elements = JSWeakMap::cast(this)->table()->NumberOfElements(); | 1005 accumulator->Add("<JS WeakMap>"); |
1006 accumulator->Add("<JS WeakMap[%d]>", elements); | |
1007 break; | 1006 break; |
1008 } | 1007 } |
1009 case JS_REGEXP_TYPE: { | 1008 case JS_REGEXP_TYPE: { |
1010 accumulator->Add("<JS RegExp>"); | 1009 accumulator->Add("<JS RegExp>"); |
1011 break; | 1010 break; |
1012 } | 1011 } |
1013 case JS_FUNCTION_TYPE: { | 1012 case JS_FUNCTION_TYPE: { |
1014 Object* fun_name = JSFunction::cast(this)->shared()->name(); | 1013 Object* fun_name = JSFunction::cast(this)->shared()->name(); |
1015 bool printed = false; | 1014 bool printed = false; |
1016 if (fun_name->IsString()) { | 1015 if (fun_name->IsString()) { |
(...skipping 11147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12164 if (break_point_objects()->IsUndefined()) return 0; | 12163 if (break_point_objects()->IsUndefined()) return 0; |
12165 // Single break point. | 12164 // Single break point. |
12166 if (!break_point_objects()->IsFixedArray()) return 1; | 12165 if (!break_point_objects()->IsFixedArray()) return 1; |
12167 // Multiple break points. | 12166 // Multiple break points. |
12168 return FixedArray::cast(break_point_objects())->length(); | 12167 return FixedArray::cast(break_point_objects())->length(); |
12169 } | 12168 } |
12170 #endif | 12169 #endif |
12171 | 12170 |
12172 | 12171 |
12173 } } // namespace v8::internal | 12172 } } // namespace v8::internal |
OLD | NEW |