| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \ | 524 if (__maybe_object__->ToObject(&__object__)) RETURN_VALUE; \ |
| 525 if (__maybe_object__->IsOutOfMemory() || \ | 525 if (__maybe_object__->IsOutOfMemory() || \ |
| 526 __maybe_object__->IsRetryAfterGC()) { \ | 526 __maybe_object__->IsRetryAfterGC()) { \ |
| 527 /* TODO(1181417): Fix this. */ \ | 527 /* TODO(1181417): Fix this. */ \ |
| 528 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2", true);\ | 528 v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2", true);\ |
| 529 } \ | 529 } \ |
| 530 RETURN_EMPTY; \ | 530 RETURN_EMPTY; \ |
| 531 } while (false) | 531 } while (false) |
| 532 | 532 |
| 533 | 533 |
| 534 // TODO(isolates): cache isolate: either accept as a parameter or | |
| 535 // set to some known symbol (__CUR_ISOLATE__?) | |
| 536 #define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE) \ | 534 #define CALL_HEAP_FUNCTION(ISOLATE, FUNCTION_CALL, TYPE) \ |
| 537 CALL_AND_RETRY(ISOLATE, \ | 535 CALL_AND_RETRY(ISOLATE, \ |
| 538 FUNCTION_CALL, \ | 536 FUNCTION_CALL, \ |
| 539 return Handle<TYPE>(TYPE::cast(__object__), ISOLATE), \ | 537 return Handle<TYPE>(TYPE::cast(__object__), ISOLATE), \ |
| 540 return Handle<TYPE>()) | 538 return Handle<TYPE>()) |
| 541 | 539 |
| 542 | 540 |
| 543 #define CALL_HEAP_FUNCTION_VOID(ISOLATE, FUNCTION_CALL) \ | 541 #define CALL_HEAP_FUNCTION_VOID(ISOLATE, FUNCTION_CALL) \ |
| 544 CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, return, return) | 542 CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, return, return) |
| 545 | 543 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 #ifdef DEBUG | 693 #ifdef DEBUG |
| 696 UpdateLiveObjectCount(obj); | 694 UpdateLiveObjectCount(obj); |
| 697 #endif | 695 #endif |
| 698 obj->SetMark(); | 696 obj->SetMark(); |
| 699 } | 697 } |
| 700 | 698 |
| 701 | 699 |
| 702 } } // namespace v8::internal | 700 } } // namespace v8::internal |
| 703 | 701 |
| 704 #endif // V8_HEAP_INL_H_ | 702 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |