| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "src/snapshot/code-serializer.h" | 5 #include "src/snapshot/code-serializer.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/log.h" | 8 #include "src/log.h" |
| 9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 #include "src/snapshot/deserializer.h" | 10 #include "src/snapshot/deserializer.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #undef IC_KIND_CASE | 78 #undef IC_KIND_CASE |
| 79 SerializeCodeStub(code_object, how_to_code, where_to_point); | 79 SerializeCodeStub(code_object, how_to_code, where_to_point); |
| 80 return; | 80 return; |
| 81 case Code::FUNCTION: | 81 case Code::FUNCTION: |
| 82 DCHECK(code_object->has_reloc_info_for_serialization()); | 82 DCHECK(code_object->has_reloc_info_for_serialization()); |
| 83 SerializeGeneric(code_object, how_to_code, where_to_point); | 83 SerializeGeneric(code_object, how_to_code, where_to_point); |
| 84 return; | 84 return; |
| 85 case Code::WASM_FUNCTION: | 85 case Code::WASM_FUNCTION: |
| 86 case Code::WASM_TO_JS_FUNCTION: | 86 case Code::WASM_TO_JS_FUNCTION: |
| 87 case Code::JS_TO_WASM_FUNCTION: | 87 case Code::JS_TO_WASM_FUNCTION: |
| 88 case Code::WASM_TO_INTERPRETER: |
| 88 UNREACHABLE(); | 89 UNREACHABLE(); |
| 89 } | 90 } |
| 90 UNREACHABLE(); | 91 UNREACHABLE(); |
| 91 } | 92 } |
| 92 | 93 |
| 93 // Past this point we should not see any (context-specific) maps anymore. | 94 // Past this point we should not see any (context-specific) maps anymore. |
| 94 CHECK(!obj->IsMap()); | 95 CHECK(!obj->IsMap()); |
| 95 // There should be no references to the global object embedded. | 96 // There should be no references to the global object embedded. |
| 96 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); | 97 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); |
| 97 // There should be no hash table embedded. They would require rehashing. | 98 // There should be no hash table embedded. They would require rehashing. |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 SanityCheckResult r = scd->SanityCheck(isolate, source); | 357 SanityCheckResult r = scd->SanityCheck(isolate, source); |
| 357 if (r == CHECK_SUCCESS) return scd; | 358 if (r == CHECK_SUCCESS) return scd; |
| 358 cached_data->Reject(); | 359 cached_data->Reject(); |
| 359 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 360 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
| 360 delete scd; | 361 delete scd; |
| 361 return NULL; | 362 return NULL; |
| 362 } | 363 } |
| 363 | 364 |
| 364 } // namespace internal | 365 } // namespace internal |
| 365 } // namespace v8 | 366 } // namespace v8 |
| OLD | NEW |