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 5338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5349 name = Handle<String>::cast(converted); | 5349 name = Handle<String>::cast(converted); |
5350 } | 5350 } |
5351 | 5351 |
5352 if (name->IsString()) Handle<String>::cast(name)->TryFlatten(); | 5352 if (name->IsString()) Handle<String>::cast(name)->TryFlatten(); |
5353 Handle<Object> result = JSReceiver::DeleteProperty(receiver, name, mode); | 5353 Handle<Object> result = JSReceiver::DeleteProperty(receiver, name, mode); |
5354 RETURN_IF_EMPTY_HANDLE(isolate, result); | 5354 RETURN_IF_EMPTY_HANDLE(isolate, result); |
5355 return *result; | 5355 return *result; |
5356 } | 5356 } |
5357 | 5357 |
5358 | 5358 |
| 5359 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetHiddenProperty) { |
| 5360 HandleScope scope(isolate); |
| 5361 RUNTIME_ASSERT(args.length() == 3); |
| 5362 |
| 5363 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 5364 CONVERT_ARG_HANDLE_CHECKED(String, key, 1); |
| 5365 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
| 5366 return *JSObject::SetHiddenProperty(object, key, value); |
| 5367 } |
| 5368 |
| 5369 |
5359 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetProperty) { | 5370 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetProperty) { |
5360 HandleScope scope(isolate); | 5371 HandleScope scope(isolate); |
5361 RUNTIME_ASSERT(args.length() == 4 || args.length() == 5); | 5372 RUNTIME_ASSERT(args.length() == 4 || args.length() == 5); |
5362 | 5373 |
5363 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 5374 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
5364 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); | 5375 CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
5365 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); | 5376 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
5366 CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3); | 5377 CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3); |
5367 RUNTIME_ASSERT( | 5378 RUNTIME_ASSERT( |
5368 (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); | 5379 (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
(...skipping 9596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14965 // Handle last resort GC and make sure to allow future allocations | 14976 // Handle last resort GC and make sure to allow future allocations |
14966 // to grow the heap without causing GCs (if possible). | 14977 // to grow the heap without causing GCs (if possible). |
14967 isolate->counters()->gc_last_resort_from_js()->Increment(); | 14978 isolate->counters()->gc_last_resort_from_js()->Increment(); |
14968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 14979 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
14969 "Runtime::PerformGC"); | 14980 "Runtime::PerformGC"); |
14970 } | 14981 } |
14971 } | 14982 } |
14972 | 14983 |
14973 | 14984 |
14974 } } // namespace v8::internal | 14985 } } // namespace v8::internal |
OLD | NEW |