| 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/profiler/cpu-profiler.h" | 10 #include "src/profiler/cpu-profiler.h" | 
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 77 #define IC_KIND_CASE(KIND) case Code::KIND: | 77 #define IC_KIND_CASE(KIND) case Code::KIND: | 
| 78         IC_KIND_LIST(IC_KIND_CASE) | 78         IC_KIND_LIST(IC_KIND_CASE) | 
| 79 #undef IC_KIND_CASE | 79 #undef IC_KIND_CASE | 
| 80         SerializeIC(code_object, how_to_code, where_to_point); | 80         SerializeIC(code_object, how_to_code, where_to_point); | 
| 81         return; | 81         return; | 
| 82       case Code::FUNCTION: | 82       case Code::FUNCTION: | 
| 83         DCHECK(code_object->has_reloc_info_for_serialization()); | 83         DCHECK(code_object->has_reloc_info_for_serialization()); | 
| 84         SerializeGeneric(code_object, how_to_code, where_to_point); | 84         SerializeGeneric(code_object, how_to_code, where_to_point); | 
| 85         return; | 85         return; | 
| 86       case Code::WASM_FUNCTION: | 86       case Code::WASM_FUNCTION: | 
|  | 87       case Code::WASM_TO_JS_FUNCTION: | 
|  | 88       case Code::JS_TO_WASM_FUNCTION: | 
| 87         UNREACHABLE(); | 89         UNREACHABLE(); | 
| 88     } | 90     } | 
| 89     UNREACHABLE(); | 91     UNREACHABLE(); | 
| 90   } | 92   } | 
| 91 | 93 | 
| 92   // 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. | 
| 93   CHECK(!obj->IsMap()); | 95   CHECK(!obj->IsMap()); | 
| 94   // There should be no references to the global object embedded. | 96   // There should be no references to the global object embedded. | 
| 95   CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); | 97   CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); | 
| 96   // There should be no hash table embedded. They would require rehashing. | 98   // There should be no hash table embedded. They would require rehashing. | 
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 409   SanityCheckResult r = scd->SanityCheck(isolate, source); | 411   SanityCheckResult r = scd->SanityCheck(isolate, source); | 
| 410   if (r == CHECK_SUCCESS) return scd; | 412   if (r == CHECK_SUCCESS) return scd; | 
| 411   cached_data->Reject(); | 413   cached_data->Reject(); | 
| 412   source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 414   source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 
| 413   delete scd; | 415   delete scd; | 
| 414   return NULL; | 416   return NULL; | 
| 415 } | 417 } | 
| 416 | 418 | 
| 417 }  // namespace internal | 419 }  // namespace internal | 
| 418 }  // namespace v8 | 420 }  // namespace v8 | 
| OLD | NEW | 
|---|