OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 15 matching lines...) Expand all Loading... |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "isolate.h" | 28 #include "isolate.h" |
29 | 29 |
30 #ifndef V8_SNAPSHOT_H_ | 30 #ifndef V8_SNAPSHOT_H_ |
31 #define V8_SNAPSHOT_H_ | 31 #define V8_SNAPSHOT_H_ |
32 | 32 |
33 namespace v8 { | 33 namespace v8 { |
34 namespace internal { | 34 namespace internal { |
35 | 35 |
36 STATIC_CLASS Snapshot { | 36 class Snapshot { |
37 public: | 37 public: |
38 // Initialize the VM from the given snapshot file. If snapshot_file is | 38 // Initialize the VM from the given snapshot file. If snapshot_file is |
39 // NULL, use the internal snapshot instead. Returns false if no snapshot | 39 // NULL, use the internal snapshot instead. Returns false if no snapshot |
40 // could be found. | 40 // could be found. |
41 static bool Initialize(const char* snapshot_file = NULL); | 41 static bool Initialize(const char* snapshot_file = NULL); |
42 | 42 |
43 // Create a new context using the internal partial snapshot. | 43 // Create a new context using the internal partial snapshot. |
44 static Handle<Context> NewContextFromSnapshot(); | 44 static Handle<Context> NewContextFromSnapshot(); |
45 | 45 |
46 // Returns whether or not the snapshot is enabled. | 46 // Returns whether or not the snapshot is enabled. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 static const int context_raw_size_; | 82 static const int context_raw_size_; |
83 | 83 |
84 static bool Deserialize(const byte* content, int len); | 84 static bool Deserialize(const byte* content, int len); |
85 | 85 |
86 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); | 86 DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot); |
87 }; | 87 }; |
88 | 88 |
89 } } // namespace v8::internal | 89 } } // namespace v8::internal |
90 | 90 |
91 #endif // V8_SNAPSHOT_H_ | 91 #endif // V8_SNAPSHOT_H_ |
OLD | NEW |