| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 #undef IC_KIND_CASE | 76 #undef IC_KIND_CASE |
| 77 SerializeCodeStub(code_object, how_to_code, where_to_point); | 77 SerializeCodeStub(code_object, how_to_code, where_to_point); |
| 78 return; | 78 return; |
| 79 case Code::FUNCTION: | 79 case Code::FUNCTION: |
| 80 DCHECK(code_object->has_reloc_info_for_serialization()); | 80 DCHECK(code_object->has_reloc_info_for_serialization()); |
| 81 SerializeGeneric(code_object, how_to_code, where_to_point); | 81 SerializeGeneric(code_object, how_to_code, where_to_point); |
| 82 return; | 82 return; |
| 83 case Code::WASM_FUNCTION: | 83 case Code::WASM_FUNCTION: |
| 84 case Code::WASM_TO_JS_FUNCTION: | 84 case Code::WASM_TO_JS_FUNCTION: |
| 85 case Code::JS_TO_WASM_FUNCTION: | 85 case Code::JS_TO_WASM_FUNCTION: |
| 86 case Code::JS_TO_NATIVE_FUNCTION: |
| 86 UNREACHABLE(); | 87 UNREACHABLE(); |
| 87 } | 88 } |
| 88 UNREACHABLE(); | 89 UNREACHABLE(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 // Past this point we should not see any (context-specific) maps anymore. | 92 // Past this point we should not see any (context-specific) maps anymore. |
| 92 CHECK(!obj->IsMap()); | 93 CHECK(!obj->IsMap()); |
| 93 // There should be no references to the global object embedded. | 94 // There should be no references to the global object embedded. |
| 94 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); | 95 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); |
| 95 // There should be no hash table embedded. They would require rehashing. | 96 // There should be no hash table embedded. They would require rehashing. |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 SanityCheckResult r = scd->SanityCheck(isolate, source); | 355 SanityCheckResult r = scd->SanityCheck(isolate, source); |
| 355 if (r == CHECK_SUCCESS) return scd; | 356 if (r == CHECK_SUCCESS) return scd; |
| 356 cached_data->Reject(); | 357 cached_data->Reject(); |
| 357 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 358 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
| 358 delete scd; | 359 delete scd; |
| 359 return NULL; | 360 return NULL; |
| 360 } | 361 } |
| 361 | 362 |
| 362 } // namespace internal | 363 } // namespace internal |
| 363 } // namespace v8 | 364 } // namespace v8 |
| OLD | NEW |