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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 return map == map->GetHeap()->function_context_map(); | 288 return map == map->GetHeap()->function_context_map(); |
289 } | 289 } |
290 bool IsCatchContext() { | 290 bool IsCatchContext() { |
291 Map* map = this->map(); | 291 Map* map = this->map(); |
292 return map == map->GetHeap()->catch_context_map(); | 292 return map == map->GetHeap()->catch_context_map(); |
293 } | 293 } |
294 bool IsWithContext() { | 294 bool IsWithContext() { |
295 Map* map = this->map(); | 295 Map* map = this->map(); |
296 return map == map->GetHeap()->with_context_map(); | 296 return map == map->GetHeap()->with_context_map(); |
297 } | 297 } |
| 298 bool IsBlockContext() { |
| 299 Map* map = this->map(); |
| 300 return map == map->GetHeap()->block_context_map(); |
| 301 } |
298 | 302 |
299 // Tells whether the global context is marked with out of memory. | 303 // Tells whether the global context is marked with out of memory. |
300 inline bool has_out_of_memory(); | 304 inline bool has_out_of_memory(); |
301 | 305 |
302 // Mark the global context with out of memory. | 306 // Mark the global context with out of memory. |
303 inline void mark_out_of_memory(); | 307 inline void mark_out_of_memory(); |
304 | 308 |
305 // The exception holder is the object used as a with object in | 309 // The exception holder is the object used as a with object in |
306 // the implementation of a catch block. | 310 // the implementation of a catch block. |
307 bool is_exception_holder(Object* object) { | 311 bool is_exception_holder(Object* object) { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 #ifdef DEBUG | 391 #ifdef DEBUG |
388 // Bootstrapping-aware type checks. | 392 // Bootstrapping-aware type checks. |
389 static bool IsBootstrappingOrContext(Object* object); | 393 static bool IsBootstrappingOrContext(Object* object); |
390 static bool IsBootstrappingOrGlobalObject(Object* object); | 394 static bool IsBootstrappingOrGlobalObject(Object* object); |
391 #endif | 395 #endif |
392 }; | 396 }; |
393 | 397 |
394 } } // namespace v8::internal | 398 } } // namespace v8::internal |
395 | 399 |
396 #endif // V8_CONTEXTS_H_ | 400 #endif // V8_CONTEXTS_H_ |
OLD | NEW |