Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: src/snapshot/serialize.cc

Issue 1155673005: Fix issues with Arm's use of embedded constant pools (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move DataAlign implementation to common code Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/assembler-ppc-inl.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 CASE_STATEMENT(kNewObject, kPlain, kInnerPointer, CODE_SPACE) 999 CASE_STATEMENT(kNewObject, kPlain, kInnerPointer, CODE_SPACE)
1000 CASE_BODY(kNewObject, kPlain, kInnerPointer, CODE_SPACE) 1000 CASE_BODY(kNewObject, kPlain, kInnerPointer, CODE_SPACE)
1001 // Deserialize a new code object and write a pointer to its first 1001 // Deserialize a new code object and write a pointer to its first
1002 // instruction to the current code object. 1002 // instruction to the current code object.
1003 ALL_SPACES(kNewObject, kFromCode, kInnerPointer) 1003 ALL_SPACES(kNewObject, kFromCode, kInnerPointer)
1004 // Find a recently deserialized object using its offset from the current 1004 // Find a recently deserialized object using its offset from the current
1005 // allocation point and write a pointer to it to the current object. 1005 // allocation point and write a pointer to it to the current object.
1006 ALL_SPACES(kBackref, kPlain, kStartOfObject) 1006 ALL_SPACES(kBackref, kPlain, kStartOfObject)
1007 ALL_SPACES(kBackrefWithSkip, kPlain, kStartOfObject) 1007 ALL_SPACES(kBackrefWithSkip, kPlain, kStartOfObject)
1008 #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \ 1008 #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \
1009 defined(V8_TARGET_ARCH_PPC) 1009 defined(V8_TARGET_ARCH_PPC) || V8_EMBEDDED_CONSTANT_POOL
1010 // Deserialize a new object from pointer found in code and write 1010 // Deserialize a new object from pointer found in code and write
1011 // a pointer to it to the current object. Required only for MIPS, PPC or 1011 // a pointer to it to the current object. Required only for MIPS, PPC or
1012 // ARM with ool constant pool, and omitted on the other architectures 1012 // ARM with embedded constant pool, and omitted on the other architectures
1013 // because it is fully unrolled and would cause bloat. 1013 // because it is fully unrolled and would cause bloat.
1014 ALL_SPACES(kNewObject, kFromCode, kStartOfObject) 1014 ALL_SPACES(kNewObject, kFromCode, kStartOfObject)
1015 // Find a recently deserialized code object using its offset from the 1015 // Find a recently deserialized code object using its offset from the
1016 // current allocation point and write a pointer to it to the current 1016 // current allocation point and write a pointer to it to the current
1017 // object. Required only for MIPS, PPC or ARM with ool constant pool. 1017 // object. Required only for MIPS, PPC or ARM with embedded constant pool.
1018 ALL_SPACES(kBackref, kFromCode, kStartOfObject) 1018 ALL_SPACES(kBackref, kFromCode, kStartOfObject)
1019 ALL_SPACES(kBackrefWithSkip, kFromCode, kStartOfObject) 1019 ALL_SPACES(kBackrefWithSkip, kFromCode, kStartOfObject)
1020 #endif 1020 #endif
1021 // Find a recently deserialized code object using its offset from the 1021 // Find a recently deserialized code object using its offset from the
1022 // current allocation point and write a pointer to its first instruction 1022 // current allocation point and write a pointer to its first instruction
1023 // to the current code object or the instruction pointer in a function 1023 // to the current code object or the instruction pointer in a function
1024 // object. 1024 // object.
1025 ALL_SPACES(kBackref, kFromCode, kInnerPointer) 1025 ALL_SPACES(kBackref, kFromCode, kInnerPointer)
1026 ALL_SPACES(kBackrefWithSkip, kFromCode, kInnerPointer) 1026 ALL_SPACES(kBackrefWithSkip, kFromCode, kInnerPointer)
1027 ALL_SPACES(kBackref, kPlain, kInnerPointer) 1027 ALL_SPACES(kBackref, kPlain, kInnerPointer)
1028 ALL_SPACES(kBackrefWithSkip, kPlain, kInnerPointer) 1028 ALL_SPACES(kBackrefWithSkip, kPlain, kInnerPointer)
1029 // Find an object in the roots array and write a pointer to it to the 1029 // Find an object in the roots array and write a pointer to it to the
1030 // current object. 1030 // current object.
1031 CASE_STATEMENT(kRootArray, kPlain, kStartOfObject, 0) 1031 CASE_STATEMENT(kRootArray, kPlain, kStartOfObject, 0)
1032 CASE_BODY(kRootArray, kPlain, kStartOfObject, 0) 1032 CASE_BODY(kRootArray, kPlain, kStartOfObject, 0)
1033 #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \ 1033 #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \
1034 defined(V8_TARGET_ARCH_PPC) 1034 defined(V8_TARGET_ARCH_PPC) || V8_EMBEDDED_CONSTANT_POOL
1035 // Find an object in the roots array and write a pointer to it to in code. 1035 // Find an object in the roots array and write a pointer to it to in code.
1036 CASE_STATEMENT(kRootArray, kFromCode, kStartOfObject, 0) 1036 CASE_STATEMENT(kRootArray, kFromCode, kStartOfObject, 0)
1037 CASE_BODY(kRootArray, kFromCode, kStartOfObject, 0) 1037 CASE_BODY(kRootArray, kFromCode, kStartOfObject, 0)
1038 #endif 1038 #endif
1039 // Find an object in the partial snapshots cache and write a pointer to it 1039 // Find an object in the partial snapshots cache and write a pointer to it
1040 // to the current object. 1040 // to the current object.
1041 CASE_STATEMENT(kPartialSnapshotCache, kPlain, kStartOfObject, 0) 1041 CASE_STATEMENT(kPartialSnapshotCache, kPlain, kStartOfObject, 0)
1042 CASE_BODY(kPartialSnapshotCache, kPlain, kStartOfObject, 0) 1042 CASE_BODY(kPartialSnapshotCache, kPlain, kStartOfObject, 0)
1043 // Find an code entry in the partial snapshots cache and 1043 // Find an code entry in the partial snapshots cache and
1044 // write a pointer to it to the current object. 1044 // write a pointer to it to the current object.
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 SerializedCodeData* scd = new SerializedCodeData(cached_data); 2677 SerializedCodeData* scd = new SerializedCodeData(cached_data);
2678 SanityCheckResult r = scd->SanityCheck(isolate, source); 2678 SanityCheckResult r = scd->SanityCheck(isolate, source);
2679 if (r == CHECK_SUCCESS) return scd; 2679 if (r == CHECK_SUCCESS) return scd;
2680 cached_data->Reject(); 2680 cached_data->Reject();
2681 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); 2681 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r);
2682 delete scd; 2682 delete scd;
2683 return NULL; 2683 return NULL;
2684 } 2684 }
2685 } // namespace internal 2685 } // namespace internal
2686 } // namespace v8 2686 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc-inl.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698