| 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 13427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13438 ASSERT(args.length() == 1); | 13438 ASSERT(args.length() == 1); |
| 13439 Object* object = args[0]; | 13439 Object* object = args[0]; |
| 13440 if (object->IsJSGlobalProxy()) { | 13440 if (object->IsJSGlobalProxy()) { |
| 13441 object = object->GetPrototype(); | 13441 object = object->GetPrototype(); |
| 13442 if (object->IsNull()) return isolate->heap()->undefined_value(); | 13442 if (object->IsNull()) return isolate->heap()->undefined_value(); |
| 13443 } | 13443 } |
| 13444 return object; | 13444 return object; |
| 13445 } | 13445 } |
| 13446 | 13446 |
| 13447 | 13447 |
| 13448 RUNTIME_FUNCTION(MaybeObject*, Runtime_EnqueueChangeRecord) { |
| 13449 HandleScope scope(isolate); |
| 13450 ASSERT(args.length() == 4); |
| 13451 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 13452 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); |
| 13453 CONVERT_ARG_HANDLE_CHECKED(String, name, 2); |
| 13454 Handle<Object> old_value = args.at<Object>(3); |
| 13455 JSObject::EnqueueChangeRecord(object, type, name, old_value); |
| 13456 return isolate->heap()->undefined_value(); |
| 13457 } |
| 13458 |
| 13459 |
| 13448 // ---------------------------------------------------------------------------- | 13460 // ---------------------------------------------------------------------------- |
| 13449 // Implementation of Runtime | 13461 // Implementation of Runtime |
| 13450 | 13462 |
| 13451 #define F(name, number_of_args, result_size) \ | 13463 #define F(name, number_of_args, result_size) \ |
| 13452 { Runtime::k##name, Runtime::RUNTIME, #name, \ | 13464 { Runtime::k##name, Runtime::RUNTIME, #name, \ |
| 13453 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, | 13465 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, |
| 13454 | 13466 |
| 13455 | 13467 |
| 13456 #define I(name, number_of_args, result_size) \ | 13468 #define I(name, number_of_args, result_size) \ |
| 13457 { Runtime::kInline##name, Runtime::INLINE, \ | 13469 { Runtime::kInline##name, Runtime::INLINE, \ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13524 // Handle last resort GC and make sure to allow future allocations | 13536 // Handle last resort GC and make sure to allow future allocations |
| 13525 // to grow the heap without causing GCs (if possible). | 13537 // to grow the heap without causing GCs (if possible). |
| 13526 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13538 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13527 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13539 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13528 "Runtime::PerformGC"); | 13540 "Runtime::PerformGC"); |
| 13529 } | 13541 } |
| 13530 } | 13542 } |
| 13531 | 13543 |
| 13532 | 13544 |
| 13533 } } // namespace v8::internal | 13545 } } // namespace v8::internal |
| OLD | NEW |