| 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 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 private: | 1387 private: |
| 1388 StackGuard* stack_guard_; | 1388 StackGuard* stack_guard_; |
| 1389 }; | 1389 }; |
| 1390 | 1390 |
| 1391 | 1391 |
| 1392 // Temporary macros for accessing current isolate and its subobjects. | 1392 // Temporary macros for accessing current isolate and its subobjects. |
| 1393 // They provide better readability, especially when used a lot in the code. | 1393 // They provide better readability, especially when used a lot in the code. |
| 1394 #define HEAP (v8::internal::Isolate::Current()->heap()) | 1394 #define HEAP (v8::internal::Isolate::Current()->heap()) |
| 1395 #define FACTORY (v8::internal::Isolate::Current()->factory()) | 1395 #define FACTORY (v8::internal::Isolate::Current()->factory()) |
| 1396 #define ISOLATE (v8::internal::Isolate::Current()) | 1396 #define ISOLATE (v8::internal::Isolate::Current()) |
| 1397 #define ZONE (v8::internal::Isolate::Current()->zone()) | |
| 1398 #define LOGGER (v8::internal::Isolate::Current()->logger()) | 1397 #define LOGGER (v8::internal::Isolate::Current()->logger()) |
| 1399 | 1398 |
| 1400 | 1399 |
| 1401 // Tells whether the global context is marked with out of memory. | 1400 // Tells whether the global context is marked with out of memory. |
| 1402 inline bool Context::has_out_of_memory() { | 1401 inline bool Context::has_out_of_memory() { |
| 1403 return global_context()->out_of_memory()->IsTrue(); | 1402 return global_context()->out_of_memory()->IsTrue(); |
| 1404 } | 1403 } |
| 1405 | 1404 |
| 1406 | 1405 |
| 1407 // Mark the global context with out of memory. | 1406 // Mark the global context with out of memory. |
| 1408 inline void Context::mark_out_of_memory() { | 1407 inline void Context::mark_out_of_memory() { |
| 1409 global_context()->set_out_of_memory(HEAP->true_value()); | 1408 global_context()->set_out_of_memory(HEAP->true_value()); |
| 1410 } | 1409 } |
| 1411 | 1410 |
| 1412 | 1411 |
| 1413 } } // namespace v8::internal | 1412 } } // namespace v8::internal |
| 1414 | 1413 |
| 1415 #endif // V8_ISOLATE_H_ | 1414 #endif // V8_ISOLATE_H_ |
| OLD | NEW |