| 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 // 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 #include <errno.h> | 5 #include <errno.h> |
| 6 #include <signal.h> | 6 #include <signal.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/libplatform/libplatform.h" | 9 #include "include/libplatform/libplatform.h" |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| 11 #include "src/base/platform/platform.h" | 11 #include "src/base/platform/platform.h" |
| 12 #include "src/flags.h" | 12 #include "src/flags.h" |
| 13 #include "src/list.h" | 13 #include "src/list.h" |
| 14 #include "src/snapshot/natives.h" | 14 #include "src/snapshot/natives.h" |
| 15 #include "src/snapshot/serialize.h" | 15 #include "src/snapshot/partial-serializer.h" |
| 16 | 16 #include "src/snapshot/startup-serializer.h" |
| 17 | 17 |
| 18 using namespace v8; | 18 using namespace v8; |
| 19 | 19 |
| 20 class SnapshotWriter { | 20 class SnapshotWriter { |
| 21 public: | 21 public: |
| 22 SnapshotWriter() : fp_(NULL), startup_blob_file_(NULL) {} | 22 SnapshotWriter() : fp_(NULL), startup_blob_file_(NULL) {} |
| 23 | 23 |
| 24 ~SnapshotWriter() { | 24 ~SnapshotWriter() { |
| 25 if (fp_) fclose(fp_); | 25 if (fp_) fclose(fp_); |
| 26 if (startup_blob_file_) fclose(startup_blob_file_); | 26 if (startup_blob_file_) fclose(startup_blob_file_); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 writer.WriteSnapshot(blob); | 167 writer.WriteSnapshot(blob); |
| 168 delete[] extra_code; | 168 delete[] extra_code; |
| 169 delete[] blob.data; | 169 delete[] blob.data; |
| 170 } | 170 } |
| 171 | 171 |
| 172 V8::Dispose(); | 172 V8::Dispose(); |
| 173 V8::ShutdownPlatform(); | 173 V8::ShutdownPlatform(); |
| 174 delete platform; | 174 delete platform; |
| 175 return 0; | 175 return 0; |
| 176 } | 176 } |
| OLD | NEW |