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_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 Handle<JSObject> promise_; | 1461 Handle<JSObject> promise_; |
1462 PromiseOnStack* prev_; | 1462 PromiseOnStack* prev_; |
1463 }; | 1463 }; |
1464 | 1464 |
1465 | 1465 |
1466 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the | 1466 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the |
1467 // class as a work around for a bug in the generated code found with these | 1467 // class as a work around for a bug in the generated code found with these |
1468 // versions of GCC. See V8 issue 122 for details. | 1468 // versions of GCC. See V8 issue 122 for details. |
1469 class SaveContext BASE_EMBEDDED { | 1469 class SaveContext BASE_EMBEDDED { |
1470 public: | 1470 public: |
1471 explicit SaveContext(Isolate* isolate); | 1471 explicit inline SaveContext(Isolate* isolate); |
1472 ~SaveContext(); | 1472 inline ~SaveContext(); |
1473 | 1473 |
1474 Handle<Context> context() { return context_; } | 1474 Handle<Context> context() { return context_; } |
1475 SaveContext* prev() { return prev_; } | 1475 SaveContext* prev() { return prev_; } |
1476 | 1476 |
1477 // Returns true if this save context is below a given JavaScript frame. | 1477 // Returns true if this save context is below a given JavaScript frame. |
1478 bool IsBelowFrame(StandardFrame* frame) { | 1478 bool IsBelowFrame(StandardFrame* frame) { |
1479 return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp()); | 1479 return (c_entry_fp_ == 0) || (c_entry_fp_ > frame->sp()); |
1480 } | 1480 } |
1481 | 1481 |
| 1482 Isolate* isolate() { return isolate_; } |
| 1483 |
1482 private: | 1484 private: |
1483 Isolate* isolate_; | 1485 Isolate* isolate_; |
1484 Handle<Context> context_; | 1486 Handle<Context> context_; |
1485 SaveContext* prev_; | 1487 SaveContext* prev_; |
1486 Address c_entry_fp_; | 1488 Address c_entry_fp_; |
1487 }; | 1489 }; |
1488 | 1490 |
1489 | 1491 |
1490 class AssertNoContextChange BASE_EMBEDDED { | 1492 class AssertNoContextChange BASE_EMBEDDED { |
1491 #ifdef DEBUG | 1493 #ifdef DEBUG |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 | 1657 |
1656 EmbeddedVector<char, 128> filename_; | 1658 EmbeddedVector<char, 128> filename_; |
1657 FILE* file_; | 1659 FILE* file_; |
1658 int scope_depth_; | 1660 int scope_depth_; |
1659 }; | 1661 }; |
1660 | 1662 |
1661 } // namespace internal | 1663 } // namespace internal |
1662 } // namespace v8 | 1664 } // namespace v8 |
1663 | 1665 |
1664 #endif // V8_ISOLATE_H_ | 1666 #endif // V8_ISOLATE_H_ |
OLD | NEW |