| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_CONTEXTS_H_ | 5 #ifndef V8_CONTEXTS_H_ |
| 6 #define V8_CONTEXTS_H_ | 6 #define V8_CONTEXTS_H_ |
| 7 | 7 |
| 8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 482 |
| 483 MIN_CONTEXT_SLOTS = GLOBAL_PROXY_INDEX, | 483 MIN_CONTEXT_SLOTS = GLOBAL_PROXY_INDEX, |
| 484 // This slot holds the thrown value in catch contexts. | 484 // This slot holds the thrown value in catch contexts. |
| 485 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS, | 485 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS, |
| 486 | 486 |
| 487 // These slots hold values in debug evaluate contexts. | 487 // These slots hold values in debug evaluate contexts. |
| 488 WRAPPED_CONTEXT_INDEX = MIN_CONTEXT_SLOTS, | 488 WRAPPED_CONTEXT_INDEX = MIN_CONTEXT_SLOTS, |
| 489 WHITE_LIST_INDEX = MIN_CONTEXT_SLOTS + 1 | 489 WHITE_LIST_INDEX = MIN_CONTEXT_SLOTS + 1 |
| 490 }; | 490 }; |
| 491 | 491 |
| 492 void ResetErrorsThrown(); |
| 492 void IncrementErrorsThrown(); | 493 void IncrementErrorsThrown(); |
| 493 int GetErrorsThrown(); | 494 int GetErrorsThrown(); |
| 494 | 495 |
| 495 // Direct slot access. | 496 // Direct slot access. |
| 496 inline JSFunction* closure(); | 497 inline JSFunction* closure(); |
| 497 inline void set_closure(JSFunction* closure); | 498 inline void set_closure(JSFunction* closure); |
| 498 | 499 |
| 499 inline Context* previous(); | 500 inline Context* previous(); |
| 500 inline void set_previous(Context* context); | 501 inline void set_previous(Context* context); |
| 501 | 502 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 658 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 658 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 659 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 659 }; | 660 }; |
| 660 | 661 |
| 661 typedef Context::Field ContextField; | 662 typedef Context::Field ContextField; |
| 662 | 663 |
| 663 } // namespace internal | 664 } // namespace internal |
| 664 } // namespace v8 | 665 } // namespace v8 |
| 665 | 666 |
| 666 #endif // V8_CONTEXTS_H_ | 667 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |