| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 12466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12477 return isolate->heap()->undefined_value(); | 12477 return isolate->heap()->undefined_value(); |
| 12478 } | 12478 } |
| 12479 | 12479 |
| 12480 | 12480 |
| 12481 RUNTIME_FUNCTION(MaybeObject*, Runtime_IS_VAR) { | 12481 RUNTIME_FUNCTION(MaybeObject*, Runtime_IS_VAR) { |
| 12482 UNREACHABLE(); // implemented as macro in the parser | 12482 UNREACHABLE(); // implemented as macro in the parser |
| 12483 return NULL; | 12483 return NULL; |
| 12484 } | 12484 } |
| 12485 | 12485 |
| 12486 | 12486 |
| 12487 #define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \ |
| 12488 RUNTIME_FUNCTION(MaybeObject*, Runtime_Has##Name) { \ |
| 12489 CONVERT_CHECKED(JSObject, obj, args[0]); \ |
| 12490 return isolate->heap()->ToBoolean(obj->Has##Name()); \ |
| 12491 } |
| 12492 |
| 12493 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastElements) |
| 12494 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastDoubleElements) |
| 12495 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(DictionaryElements) |
| 12496 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalPixelElements) |
| 12497 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalArrayElements) |
| 12498 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalByteElements) |
| 12499 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedByteElements) |
| 12500 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalShortElements) |
| 12501 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedShortElements) |
| 12502 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalIntElements) |
| 12503 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedIntElements) |
| 12504 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalFloatElements) |
| 12505 ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalDoubleElements) |
| 12506 |
| 12507 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION |
| 12508 |
| 12487 // ---------------------------------------------------------------------------- | 12509 // ---------------------------------------------------------------------------- |
| 12488 // Implementation of Runtime | 12510 // Implementation of Runtime |
| 12489 | 12511 |
| 12490 #define F(name, number_of_args, result_size) \ | 12512 #define F(name, number_of_args, result_size) \ |
| 12491 { Runtime::k##name, Runtime::RUNTIME, #name, \ | 12513 { Runtime::k##name, Runtime::RUNTIME, #name, \ |
| 12492 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, | 12514 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, |
| 12493 | 12515 |
| 12494 | 12516 |
| 12495 #define I(name, number_of_args, result_size) \ | 12517 #define I(name, number_of_args, result_size) \ |
| 12496 { Runtime::kInline##name, Runtime::INLINE, \ | 12518 { Runtime::kInline##name, Runtime::INLINE, \ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12557 } else { | 12579 } else { |
| 12558 // Handle last resort GC and make sure to allow future allocations | 12580 // Handle last resort GC and make sure to allow future allocations |
| 12559 // to grow the heap without causing GCs (if possible). | 12581 // to grow the heap without causing GCs (if possible). |
| 12560 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12582 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 12561 isolate->heap()->CollectAllGarbage(false); | 12583 isolate->heap()->CollectAllGarbage(false); |
| 12562 } | 12584 } |
| 12563 } | 12585 } |
| 12564 | 12586 |
| 12565 | 12587 |
| 12566 } } // namespace v8::internal | 12588 } } // namespace v8::internal |
| OLD | NEW |