OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 10387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10398 MaybeObject* JSObject::SetElementWithoutInterceptor(uint32_t index, | 10398 MaybeObject* JSObject::SetElementWithoutInterceptor(uint32_t index, |
10399 Object* value, | 10399 Object* value, |
10400 PropertyAttributes attr, | 10400 PropertyAttributes attr, |
10401 StrictModeFlag strict_mode, | 10401 StrictModeFlag strict_mode, |
10402 bool check_prototype, | 10402 bool check_prototype, |
10403 SetPropertyMode set_mode) { | 10403 SetPropertyMode set_mode) { |
10404 ASSERT(HasDictionaryElements() || | 10404 ASSERT(HasDictionaryElements() || |
10405 HasDictionaryArgumentsElements() || | 10405 HasDictionaryArgumentsElements() || |
10406 (attr & (DONT_DELETE | DONT_ENUM | READ_ONLY)) == 0); | 10406 (attr & (DONT_DELETE | DONT_ENUM | READ_ONLY)) == 0); |
10407 Isolate* isolate = GetIsolate(); | 10407 Isolate* isolate = GetIsolate(); |
10408 if (FLAG_trace_array_abuse) { | 10408 if (FLAG_trace_external_array_abuse && |
10409 if (IsExternalArrayElementsKind(GetElementsKind())) { | 10409 IsExternalArrayElementsKind(GetElementsKind())) { |
10410 CheckArrayAbuse(this, "external elements write", index); | 10410 CheckArrayAbuse(this, "external elements write", index); |
| 10411 } |
| 10412 if (FLAG_trace_js_array_abuse && |
| 10413 !IsExternalArrayElementsKind(GetElementsKind())) { |
| 10414 if (IsJSArray()) { |
| 10415 CheckArrayAbuse(this, "elements write", index, true); |
10411 } | 10416 } |
10412 } | 10417 } |
10413 switch (GetElementsKind()) { | 10418 switch (GetElementsKind()) { |
10414 case FAST_SMI_ELEMENTS: | 10419 case FAST_SMI_ELEMENTS: |
10415 case FAST_ELEMENTS: | 10420 case FAST_ELEMENTS: |
10416 case FAST_HOLEY_SMI_ELEMENTS: | 10421 case FAST_HOLEY_SMI_ELEMENTS: |
10417 case FAST_HOLEY_ELEMENTS: | 10422 case FAST_HOLEY_ELEMENTS: |
10418 return SetFastElement(index, value, strict_mode, check_prototype); | 10423 return SetFastElement(index, value, strict_mode, check_prototype); |
10419 case FAST_DOUBLE_ELEMENTS: | 10424 case FAST_DOUBLE_ELEMENTS: |
10420 case FAST_HOLEY_DOUBLE_ELEMENTS: | 10425 case FAST_HOLEY_DOUBLE_ELEMENTS: |
(...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13897 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13902 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13898 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13903 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13899 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13904 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13900 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13905 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13901 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13906 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13902 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13907 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13903 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13908 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13904 } | 13909 } |
13905 | 13910 |
13906 } } // namespace v8::internal | 13911 } } // namespace v8::internal |
OLD | NEW |