Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: src/objects.cc

Issue 8357004: Add flag to tracing element kind transitions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: disable flags Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 accumulator->Add(" value = "); 1080 accumulator->Add(" value = ");
1081 JSValue::cast(this)->value()->ShortPrint(accumulator); 1081 JSValue::cast(this)->value()->ShortPrint(accumulator);
1082 } 1082 }
1083 accumulator->Put('>'); 1083 accumulator->Put('>');
1084 break; 1084 break;
1085 } 1085 }
1086 } 1086 }
1087 } 1087 }
1088 1088
1089 1089
1090 void JSObject::PrintElementsTransition(
1091 FILE* file, ElementsKind from_kind, FixedArrayBase* from_elements,
1092 ElementsKind to_kind, FixedArrayBase* to_elements) {
1093 if (from_kind != to_kind) {
1094 PrintF(file, "elements transition [");
1095 PrintElementsKind(file, from_kind);
1096 PrintF(file, " -> ");
1097 PrintElementsKind(file, to_kind);
1098 PrintF(file, "] in ");
1099 JavaScriptFrame::PrintTop(file, false, true);
1100 PrintF(file, " for ");
1101 ShortPrint(file);
1102 PrintF(file, " from ");
1103 from_elements->ShortPrint(file);
1104 PrintF(file, " to ");
1105 to_elements->ShortPrint(file);
1106 PrintF(file, "\n");
1107 }
1108 }
1109
1110
1090 void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { 1111 void HeapObject::HeapObjectShortPrint(StringStream* accumulator) {
1091 Heap* heap = GetHeap(); 1112 Heap* heap = GetHeap();
1092 if (!heap->Contains(this)) { 1113 if (!heap->Contains(this)) {
1093 accumulator->Add("!!!INVALID POINTER!!!"); 1114 accumulator->Add("!!!INVALID POINTER!!!");
1094 return; 1115 return;
1095 } 1116 }
1096 if (!heap->Contains(map())) { 1117 if (!heap->Contains(map())) {
1097 accumulator->Add("!!!INVALID MAP!!!"); 1118 accumulator->Add("!!!INVALID MAP!!!");
1098 return; 1119 return;
1099 } 1120 }
1100 1121
1101 accumulator->Add("%p ", this); 1122 accumulator->Add("%p ", this);
1102 1123
1103 if (IsString()) { 1124 if (IsString()) {
1104 String::cast(this)->StringShortPrint(accumulator); 1125 String::cast(this)->StringShortPrint(accumulator);
1105 return; 1126 return;
1106 } 1127 }
1107 if (IsJSObject()) { 1128 if (IsJSObject()) {
1108 JSObject::cast(this)->JSObjectShortPrint(accumulator); 1129 JSObject::cast(this)->JSObjectShortPrint(accumulator);
1109 return; 1130 return;
1110 } 1131 }
1111 switch (map()->instance_type()) { 1132 switch (map()->instance_type()) {
1112 case MAP_TYPE: 1133 case MAP_TYPE:
1113 accumulator->Add("<Map(elements=%u)>", Map::cast(this)->elements_kind()); 1134 accumulator->Add("<Map(elements=%u)>", Map::cast(this)->elements_kind());
1114 break; 1135 break;
1115 case FIXED_ARRAY_TYPE: 1136 case FIXED_ARRAY_TYPE:
1116 accumulator->Add("<FixedArray[%u]>", FixedArray::cast(this)->length()); 1137 accumulator->Add("<FixedArray[%u]>", FixedArray::cast(this)->length());
1117 break; 1138 break;
1139 case FIXED_DOUBLE_ARRAY_TYPE:
1140 accumulator->Add("<FixedDoubleArray[%u]>",
1141 FixedDoubleArray::cast(this)->length());
1142 break;
1118 case BYTE_ARRAY_TYPE: 1143 case BYTE_ARRAY_TYPE:
1119 accumulator->Add("<ByteArray[%u]>", ByteArray::cast(this)->length()); 1144 accumulator->Add("<ByteArray[%u]>", ByteArray::cast(this)->length());
1120 break; 1145 break;
1121 case FREE_SPACE_TYPE: 1146 case FREE_SPACE_TYPE:
1122 accumulator->Add("<FreeSpace[%u]>", FreeSpace::cast(this)->Size()); 1147 accumulator->Add("<FreeSpace[%u]>", FreeSpace::cast(this)->Size());
1123 break; 1148 break;
1124 case EXTERNAL_PIXEL_ARRAY_TYPE: 1149 case EXTERNAL_PIXEL_ARRAY_TYPE:
1125 accumulator->Add("<ExternalPixelArray[%u]>", 1150 accumulator->Add("<ExternalPixelArray[%u]>",
1126 ExternalPixelArray::cast(this)->length()); 1151 ExternalPixelArray::cast(this)->length());
1127 break; 1152 break;
(...skipping 6802 matching lines...) Expand 10 before | Expand all | Expand 10 after
7930 (elements()->map()->has_fast_smi_only_elements() || 7955 (elements()->map()->has_fast_smi_only_elements() ||
7931 elements() == heap->empty_fixed_array()); 7956 elements() == heap->empty_fixed_array());
7932 ElementsKind elements_kind = has_fast_smi_only_elements 7957 ElementsKind elements_kind = has_fast_smi_only_elements
7933 ? FAST_SMI_ONLY_ELEMENTS 7958 ? FAST_SMI_ONLY_ELEMENTS
7934 : FAST_ELEMENTS; 7959 : FAST_ELEMENTS;
7935 MaybeObject* maybe = GetElementsTransitionMap(elements_kind); 7960 MaybeObject* maybe = GetElementsTransitionMap(elements_kind);
7936 if (!maybe->ToObject(&object)) return maybe; 7961 if (!maybe->ToObject(&object)) return maybe;
7937 new_map = Map::cast(object); 7962 new_map = Map::cast(object);
7938 } 7963 }
7939 7964
7965 FixedArrayBase* old_elements_raw = elements();
7940 ElementsKind elements_kind = GetElementsKind(); 7966 ElementsKind elements_kind = GetElementsKind();
7941 switch (elements_kind) { 7967 switch (elements_kind) {
7942 case FAST_SMI_ONLY_ELEMENTS: 7968 case FAST_SMI_ONLY_ELEMENTS:
7943 case FAST_ELEMENTS: { 7969 case FAST_ELEMENTS: {
7944 AssertNoAllocation no_gc; 7970 AssertNoAllocation no_gc;
7945 WriteBarrierMode mode(new_elements->GetWriteBarrierMode(no_gc)); 7971 WriteBarrierMode mode(new_elements->GetWriteBarrierMode(no_gc));
7946 CopyFastElementsToFast(FixedArray::cast(elements()), new_elements, mode); 7972 CopyFastElementsToFast(FixedArray::cast(old_elements_raw),
7973 new_elements, mode);
7947 set_map(new_map); 7974 set_map(new_map);
7948 set_elements(new_elements); 7975 set_elements(new_elements);
7949 break; 7976 break;
7950 } 7977 }
7951 case DICTIONARY_ELEMENTS: { 7978 case DICTIONARY_ELEMENTS: {
7952 AssertNoAllocation no_gc; 7979 AssertNoAllocation no_gc;
7953 WriteBarrierMode mode = new_elements->GetWriteBarrierMode(no_gc); 7980 WriteBarrierMode mode = new_elements->GetWriteBarrierMode(no_gc);
7954 CopySlowElementsToFast(NumberDictionary::cast(elements()), 7981 CopySlowElementsToFast(NumberDictionary::cast(old_elements_raw),
7955 new_elements, 7982 new_elements,
7956 mode); 7983 mode);
7957 set_map(new_map); 7984 set_map(new_map);
7958 set_elements(new_elements); 7985 set_elements(new_elements);
7959 break; 7986 break;
7960 } 7987 }
7961 case NON_STRICT_ARGUMENTS_ELEMENTS: { 7988 case NON_STRICT_ARGUMENTS_ELEMENTS: {
7962 AssertNoAllocation no_gc; 7989 AssertNoAllocation no_gc;
7963 WriteBarrierMode mode = new_elements->GetWriteBarrierMode(no_gc); 7990 WriteBarrierMode mode = new_elements->GetWriteBarrierMode(no_gc);
7964 // The object's map and the parameter map are unchanged, the unaliased 7991 // The object's map and the parameter map are unchanged, the unaliased
7965 // arguments are copied to the new backing store. 7992 // arguments are copied to the new backing store.
7966 FixedArray* parameter_map = FixedArray::cast(elements()); 7993 FixedArray* parameter_map = FixedArray::cast(old_elements_raw);
7967 FixedArray* arguments = FixedArray::cast(parameter_map->get(1)); 7994 FixedArray* arguments = FixedArray::cast(parameter_map->get(1));
7968 if (arguments->IsDictionary()) { 7995 if (arguments->IsDictionary()) {
7969 CopySlowElementsToFast(NumberDictionary::cast(arguments), 7996 CopySlowElementsToFast(NumberDictionary::cast(arguments),
7970 new_elements, 7997 new_elements,
7971 mode); 7998 mode);
7972 } else { 7999 } else {
7973 CopyFastElementsToFast(arguments, new_elements, mode); 8000 CopyFastElementsToFast(arguments, new_elements, mode);
7974 } 8001 }
7975 parameter_map->set(1, new_elements); 8002 parameter_map->set(1, new_elements);
7976 break; 8003 break;
7977 } 8004 }
7978 case FAST_DOUBLE_ELEMENTS: { 8005 case FAST_DOUBLE_ELEMENTS: {
7979 FixedDoubleArray* old_elements = FixedDoubleArray::cast(elements()); 8006 FixedDoubleArray* old_elements = FixedDoubleArray::cast(old_elements_raw);
7980 uint32_t old_length = static_cast<uint32_t>(old_elements->length()); 8007 uint32_t old_length = static_cast<uint32_t>(old_elements->length());
7981 // Fill out the new array with this content and array holes. 8008 // Fill out the new array with this content and array holes.
7982 for (uint32_t i = 0; i < old_length; i++) { 8009 for (uint32_t i = 0; i < old_length; i++) {
7983 if (!old_elements->is_the_hole(i)) { 8010 if (!old_elements->is_the_hole(i)) {
7984 Object* obj; 8011 Object* obj;
7985 // Objects must be allocated in the old object space, since the 8012 // Objects must be allocated in the old object space, since the
7986 // overall number of HeapNumbers needed for the conversion might 8013 // overall number of HeapNumbers needed for the conversion might
7987 // exceed the capacity of new space, and we would fail repeatedly 8014 // exceed the capacity of new space, and we would fail repeatedly
7988 // trying to convert the FixedDoubleArray. 8015 // trying to convert the FixedDoubleArray.
7989 MaybeObject* maybe_value_object = 8016 MaybeObject* maybe_value_object =
(...skipping 17 matching lines...) Expand all
8007 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 8034 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
8008 case EXTERNAL_INT_ELEMENTS: 8035 case EXTERNAL_INT_ELEMENTS:
8009 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 8036 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
8010 case EXTERNAL_FLOAT_ELEMENTS: 8037 case EXTERNAL_FLOAT_ELEMENTS:
8011 case EXTERNAL_DOUBLE_ELEMENTS: 8038 case EXTERNAL_DOUBLE_ELEMENTS:
8012 case EXTERNAL_PIXEL_ELEMENTS: 8039 case EXTERNAL_PIXEL_ELEMENTS:
8013 UNREACHABLE(); 8040 UNREACHABLE();
8014 break; 8041 break;
8015 } 8042 }
8016 8043
8044 if (FLAG_trace_elements_transitions) {
8045 PrintElementsTransition(stdout, elements_kind, old_elements_raw,
8046 FAST_ELEMENTS, new_elements);
8047 }
8048
8017 // Update the length if necessary. 8049 // Update the length if necessary.
8018 if (IsJSArray()) { 8050 if (IsJSArray()) {
8019 JSArray::cast(this)->set_length(Smi::FromInt(length)); 8051 JSArray::cast(this)->set_length(Smi::FromInt(length));
8020 } 8052 }
8021 8053
8022 return new_elements; 8054 return new_elements;
8023 } 8055 }
8024 8056
8025 8057
8026 MaybeObject* JSObject::SetFastDoubleElementsCapacityAndLength( 8058 MaybeObject* JSObject::SetFastDoubleElementsCapacityAndLength(
8027 int capacity, 8059 int capacity,
8028 int length) { 8060 int length) {
8029 Heap* heap = GetHeap(); 8061 Heap* heap = GetHeap();
8030 // We should never end in here with a pixel or external array. 8062 // We should never end in here with a pixel or external array.
8031 ASSERT(!HasExternalArrayElements()); 8063 ASSERT(!HasExternalArrayElements());
8032 8064
8033 Object* obj; 8065 Object* obj;
8034 { MaybeObject* maybe_obj = 8066 { MaybeObject* maybe_obj =
8035 heap->AllocateUninitializedFixedDoubleArray(capacity); 8067 heap->AllocateUninitializedFixedDoubleArray(capacity);
8036 if (!maybe_obj->ToObject(&obj)) return maybe_obj; 8068 if (!maybe_obj->ToObject(&obj)) return maybe_obj;
8037 } 8069 }
8038 FixedDoubleArray* elems = FixedDoubleArray::cast(obj); 8070 FixedDoubleArray* elems = FixedDoubleArray::cast(obj);
8039 8071
8040 { MaybeObject* maybe_obj = 8072 { MaybeObject* maybe_obj =
8041 GetElementsTransitionMap(FAST_DOUBLE_ELEMENTS); 8073 GetElementsTransitionMap(FAST_DOUBLE_ELEMENTS);
8042 if (!maybe_obj->ToObject(&obj)) return maybe_obj; 8074 if (!maybe_obj->ToObject(&obj)) return maybe_obj;
8043 } 8075 }
8044 Map* new_map = Map::cast(obj); 8076 Map* new_map = Map::cast(obj);
8045 8077
8078 FixedArrayBase* old_elements = elements();
8079 ElementsKind elements_kind(GetElementsKind());
8046 AssertNoAllocation no_gc; 8080 AssertNoAllocation no_gc;
8047 switch (GetElementsKind()) { 8081 switch (elements_kind) {
8048 case FAST_SMI_ONLY_ELEMENTS: 8082 case FAST_SMI_ONLY_ELEMENTS:
8049 case FAST_ELEMENTS: { 8083 case FAST_ELEMENTS: {
8050 elems->Initialize(FixedArray::cast(elements())); 8084 elems->Initialize(FixedArray::cast(old_elements));
8051 break; 8085 break;
8052 } 8086 }
8053 case FAST_DOUBLE_ELEMENTS: { 8087 case FAST_DOUBLE_ELEMENTS: {
8054 elems->Initialize(FixedDoubleArray::cast(elements())); 8088 elems->Initialize(FixedDoubleArray::cast(old_elements));
8055 break; 8089 break;
8056 } 8090 }
8057 case DICTIONARY_ELEMENTS: { 8091 case DICTIONARY_ELEMENTS: {
8058 elems->Initialize(NumberDictionary::cast(elements())); 8092 elems->Initialize(NumberDictionary::cast(old_elements));
8059 break; 8093 break;
8060 } 8094 }
8061 default: 8095 default:
8062 UNREACHABLE(); 8096 UNREACHABLE();
8063 break; 8097 break;
8064 } 8098 }
8065 8099
8100 if (FLAG_trace_elements_transitions) {
8101 PrintElementsTransition(stdout, elements_kind, old_elements,
8102 FAST_DOUBLE_ELEMENTS, elems);
8103 }
8104
8066 ASSERT(new_map->has_fast_double_elements()); 8105 ASSERT(new_map->has_fast_double_elements());
8067 set_map(new_map); 8106 set_map(new_map);
8068 ASSERT(elems->IsFixedDoubleArray()); 8107 ASSERT(elems->IsFixedDoubleArray());
8069 set_elements(elems); 8108 set_elements(elems);
8070 8109
8071 if (IsJSArray()) { 8110 if (IsJSArray()) {
8072 JSArray::cast(this)->set_length(Smi::FromInt(length)); 8111 JSArray::cast(this)->set_length(Smi::FromInt(length));
8073 } 8112 }
8074 8113
8075 return this; 8114 return this;
8076 } 8115 }
8077 8116
8078 8117
8079 MaybeObject* JSObject::SetSlowElements(Object* len) { 8118 MaybeObject* JSObject::SetSlowElements(Object* len) {
8080 // We should never end in here with a pixel or external array. 8119 // We should never end in here with a pixel or external array.
8081 ASSERT(!HasExternalArrayElements()); 8120 ASSERT(!HasExternalArrayElements());
8082 8121
8083 uint32_t new_length = static_cast<uint32_t>(len->Number()); 8122 uint32_t new_length = static_cast<uint32_t>(len->Number());
8084 8123
8085 switch (GetElementsKind()) { 8124 FixedArrayBase* old_elements = elements();
8125 ElementsKind elements_kind = GetElementsKind();
8126 switch (elements_kind) {
8086 case FAST_SMI_ONLY_ELEMENTS: 8127 case FAST_SMI_ONLY_ELEMENTS:
8087 case FAST_ELEMENTS: 8128 case FAST_ELEMENTS:
8088 case FAST_DOUBLE_ELEMENTS: { 8129 case FAST_DOUBLE_ELEMENTS: {
8089 // Make sure we never try to shrink dense arrays into sparse arrays. 8130 // Make sure we never try to shrink dense arrays into sparse arrays.
8090 ASSERT(static_cast<uint32_t>( 8131 ASSERT(static_cast<uint32_t>(old_elements->length()) <= new_length);
8091 FixedArrayBase::cast(elements())->length()) <= new_length);
8092 MaybeObject* result = NormalizeElements(); 8132 MaybeObject* result = NormalizeElements();
8093 if (result->IsFailure()) return result; 8133 if (result->IsFailure()) return result;
8094 8134
8095 // Update length for JSArrays. 8135 // Update length for JSArrays.
8096 if (IsJSArray()) JSArray::cast(this)->set_length(len); 8136 if (IsJSArray()) JSArray::cast(this)->set_length(len);
8097 break; 8137 break;
8098 } 8138 }
8099 case DICTIONARY_ELEMENTS: { 8139 case DICTIONARY_ELEMENTS: {
8100 if (IsJSArray()) { 8140 if (IsJSArray()) {
8101 uint32_t old_length = 8141 uint32_t old_length =
(...skipping 11 matching lines...) Expand all
8113 case EXTERNAL_SHORT_ELEMENTS: 8153 case EXTERNAL_SHORT_ELEMENTS:
8114 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 8154 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
8115 case EXTERNAL_INT_ELEMENTS: 8155 case EXTERNAL_INT_ELEMENTS:
8116 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 8156 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
8117 case EXTERNAL_FLOAT_ELEMENTS: 8157 case EXTERNAL_FLOAT_ELEMENTS:
8118 case EXTERNAL_DOUBLE_ELEMENTS: 8158 case EXTERNAL_DOUBLE_ELEMENTS:
8119 case EXTERNAL_PIXEL_ELEMENTS: 8159 case EXTERNAL_PIXEL_ELEMENTS:
8120 UNREACHABLE(); 8160 UNREACHABLE();
8121 break; 8161 break;
8122 } 8162 }
8163
8164 if (FLAG_trace_elements_transitions) {
8165 PrintElementsTransition(stdout, elements_kind, old_elements,
8166 DICTIONARY_ELEMENTS, elements());
8167 }
8168
8123 return this; 8169 return this;
8124 } 8170 }
8125 8171
8126 8172
8127 MaybeObject* JSArray::Initialize(int capacity) { 8173 MaybeObject* JSArray::Initialize(int capacity) {
8128 Heap* heap = GetHeap(); 8174 Heap* heap = GetHeap();
8129 ASSERT(capacity >= 0); 8175 ASSERT(capacity >= 0);
8130 set_length(Smi::FromInt(0)); 8176 set_length(Smi::FromInt(0));
8131 FixedArray* new_elements; 8177 FixedArray* new_elements;
8132 if (capacity == 0) { 8178 if (capacity == 0) {
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
9040 if (maybe->IsFailure()) return maybe; 9086 if (maybe->IsFailure()) return maybe;
9041 FixedDoubleArray::cast(elements())->set(index, value->Number()); 9087 FixedDoubleArray::cast(elements())->set(index, value->Number());
9042 return value; 9088 return value;
9043 } 9089 }
9044 // Change elements kind from SMI_ONLY to generic FAST if necessary. 9090 // Change elements kind from SMI_ONLY to generic FAST if necessary.
9045 if (HasFastSmiOnlyElements() && !value->IsSmi()) { 9091 if (HasFastSmiOnlyElements() && !value->IsSmi()) {
9046 MaybeObject* maybe_new_map = GetElementsTransitionMap(FAST_ELEMENTS); 9092 MaybeObject* maybe_new_map = GetElementsTransitionMap(FAST_ELEMENTS);
9047 Map* new_map; 9093 Map* new_map;
9048 if (!maybe_new_map->To<Map>(&new_map)) return maybe_new_map; 9094 if (!maybe_new_map->To<Map>(&new_map)) return maybe_new_map;
9049 set_map(new_map); 9095 set_map(new_map);
9096 if (FLAG_trace_elements_transitions) {
9097 PrintElementsTransition(stdout, FAST_SMI_ONLY_ELEMENTS, elements(),
9098 FAST_ELEMENTS, elements());
9099 }
9050 } 9100 }
9051 // Increase backing store capacity if that's been decided previously. 9101 // Increase backing store capacity if that's been decided previously.
9052 if (new_capacity != capacity) { 9102 if (new_capacity != capacity) {
9053 Object* new_elements; 9103 Object* new_elements;
9054 SetFastElementsCapacityMode set_capacity_mode = 9104 SetFastElementsCapacityMode set_capacity_mode =
9055 value->IsSmi() && HasFastSmiOnlyElements() 9105 value->IsSmi() && HasFastSmiOnlyElements()
9056 ? kAllowSmiOnlyElements 9106 ? kAllowSmiOnlyElements
9057 : kDontAllowSmiOnlyElements; 9107 : kDontAllowSmiOnlyElements;
9058 MaybeObject* maybe = 9108 MaybeObject* maybe =
9059 SetFastElementsCapacityAndLength(new_capacity, 9109 SetFastElementsCapacityAndLength(new_capacity,
(...skipping 3278 matching lines...) Expand 10 before | Expand all | Expand 10 after
12338 if (break_point_objects()->IsUndefined()) return 0; 12388 if (break_point_objects()->IsUndefined()) return 0;
12339 // Single break point. 12389 // Single break point.
12340 if (!break_point_objects()->IsFixedArray()) return 1; 12390 if (!break_point_objects()->IsFixedArray()) return 1;
12341 // Multiple break points. 12391 // Multiple break points.
12342 return FixedArray::cast(break_point_objects())->length(); 12392 return FixedArray::cast(break_point_objects())->length();
12343 } 12393 }
12344 #endif // ENABLE_DEBUGGER_SUPPORT 12394 #endif // ENABLE_DEBUGGER_SUPPORT
12345 12395
12346 12396
12347 } } // namespace v8::internal 12397 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698