| 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 8380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8391 } | 8391 } |
| 8392 } | 8392 } |
| 8393 | 8393 |
| 8394 | 8394 |
| 8395 RUNTIME_FUNCTION(MaybeObject*, Runtime_CheckIsBootstrapping) { | 8395 RUNTIME_FUNCTION(MaybeObject*, Runtime_CheckIsBootstrapping) { |
| 8396 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); | 8396 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); |
| 8397 return isolate->heap()->undefined_value(); | 8397 return isolate->heap()->undefined_value(); |
| 8398 } | 8398 } |
| 8399 | 8399 |
| 8400 | 8400 |
| 8401 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetRootNaN) { |
| 8402 RUNTIME_ASSERT(isolate->bootstrapper()->IsActive()); |
| 8403 return isolate->heap()->nan_value(); |
| 8404 } |
| 8405 |
| 8406 |
| 8401 RUNTIME_FUNCTION(MaybeObject*, Runtime_Call) { | 8407 RUNTIME_FUNCTION(MaybeObject*, Runtime_Call) { |
| 8402 HandleScope scope(isolate); | 8408 HandleScope scope(isolate); |
| 8403 ASSERT(args.length() >= 2); | 8409 ASSERT(args.length() >= 2); |
| 8404 int argc = args.length() - 2; | 8410 int argc = args.length() - 2; |
| 8405 CONVERT_ARG_CHECKED(JSReceiver, fun, argc + 1); | 8411 CONVERT_ARG_CHECKED(JSReceiver, fun, argc + 1); |
| 8406 Object* receiver = args[0]; | 8412 Object* receiver = args[0]; |
| 8407 | 8413 |
| 8408 // If there are too many arguments, allocate argv via malloc. | 8414 // If there are too many arguments, allocate argv via malloc. |
| 8409 const int argv_small_size = 10; | 8415 const int argv_small_size = 10; |
| 8410 Handle<Object> argv_small_buffer[argv_small_size]; | 8416 Handle<Object> argv_small_buffer[argv_small_size]; |
| (...skipping 4935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13346 // Handle last resort GC and make sure to allow future allocations | 13352 // Handle last resort GC and make sure to allow future allocations |
| 13347 // to grow the heap without causing GCs (if possible). | 13353 // to grow the heap without causing GCs (if possible). |
| 13348 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13354 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 13349 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13355 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
| 13350 "Runtime::PerformGC"); | 13356 "Runtime::PerformGC"); |
| 13351 } | 13357 } |
| 13352 } | 13358 } |
| 13353 | 13359 |
| 13354 | 13360 |
| 13355 } } // namespace v8::internal | 13361 } } // namespace v8::internal |
| OLD | NEW |