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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 // 15.5.5.2. Note that this might be a string object with elements | 1032 // 15.5.5.2. Note that this might be a string object with elements |
1033 // other than the actual string value. This is covered by the | 1033 // other than the actual string value. This is covered by the |
1034 // subsequent cases. | 1034 // subsequent cases. |
1035 Handle<JSValue> js_value = Handle<JSValue>::cast(obj); | 1035 Handle<JSValue> js_value = Handle<JSValue>::cast(obj); |
1036 Handle<String> str(String::cast(js_value->value())); | 1036 Handle<String> str(String::cast(js_value->value())); |
1037 Handle<String> substr = SubString(str, index, index + 1, NOT_TENURED); | 1037 Handle<String> substr = SubString(str, index, index + 1, NOT_TENURED); |
1038 | 1038 |
1039 elms->set(IS_ACCESSOR_INDEX, heap->false_value()); | 1039 elms->set(IS_ACCESSOR_INDEX, heap->false_value()); |
1040 elms->set(VALUE_INDEX, *substr); | 1040 elms->set(VALUE_INDEX, *substr); |
1041 elms->set(WRITABLE_INDEX, heap->false_value()); | 1041 elms->set(WRITABLE_INDEX, heap->false_value()); |
1042 elms->set(ENUMERABLE_INDEX, heap->false_value()); | 1042 elms->set(ENUMERABLE_INDEX, heap->true_value()); |
1043 elms->set(CONFIGURABLE_INDEX, heap->false_value()); | 1043 elms->set(CONFIGURABLE_INDEX, heap->false_value()); |
1044 return *desc; | 1044 return *desc; |
1045 } | 1045 } |
1046 | 1046 |
1047 case JSObject::INTERCEPTED_ELEMENT: | 1047 case JSObject::INTERCEPTED_ELEMENT: |
1048 case JSObject::FAST_ELEMENT: { | 1048 case JSObject::FAST_ELEMENT: { |
1049 elms->set(IS_ACCESSOR_INDEX, heap->false_value()); | 1049 elms->set(IS_ACCESSOR_INDEX, heap->false_value()); |
1050 Handle<Object> value = Object::GetElement(obj, index); | 1050 Handle<Object> value = Object::GetElement(obj, index); |
1051 RETURN_IF_EMPTY_HANDLE(isolate, value); | 1051 RETURN_IF_EMPTY_HANDLE(isolate, value); |
1052 elms->set(VALUE_INDEX, *value); | 1052 elms->set(VALUE_INDEX, *value); |
(...skipping 12560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13613 // Handle last resort GC and make sure to allow future allocations | 13613 // Handle last resort GC and make sure to allow future allocations |
13614 // to grow the heap without causing GCs (if possible). | 13614 // to grow the heap without causing GCs (if possible). |
13615 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13615 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13616 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13616 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13617 "Runtime::PerformGC"); | 13617 "Runtime::PerformGC"); |
13618 } | 13618 } |
13619 } | 13619 } |
13620 | 13620 |
13621 | 13621 |
13622 } } // namespace v8::internal | 13622 } } // namespace v8::internal |
OLD | NEW |