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

Side by Side Diff: src/serialize.cc

Issue 817143002: Contribution of PowerPC port (continuation of 422063005) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port - rebase and address initial set of comments Created 5 years, 11 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/sampler.cc ('k') | src/simulator.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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 // code object. 1156 // code object.
1157 CASE_STATEMENT(kNewObject, kPlain, kInnerPointer, CODE_SPACE) 1157 CASE_STATEMENT(kNewObject, kPlain, kInnerPointer, CODE_SPACE)
1158 CASE_BODY(kNewObject, kPlain, kInnerPointer, CODE_SPACE) 1158 CASE_BODY(kNewObject, kPlain, kInnerPointer, CODE_SPACE)
1159 // Deserialize a new code object and write a pointer to its first 1159 // Deserialize a new code object and write a pointer to its first
1160 // instruction to the current code object. 1160 // instruction to the current code object.
1161 ALL_SPACES(kNewObject, kFromCode, kInnerPointer) 1161 ALL_SPACES(kNewObject, kFromCode, kInnerPointer)
1162 // Find a recently deserialized object using its offset from the current 1162 // Find a recently deserialized object using its offset from the current
1163 // allocation point and write a pointer to it to the current object. 1163 // allocation point and write a pointer to it to the current object.
1164 ALL_SPACES(kBackref, kPlain, kStartOfObject) 1164 ALL_SPACES(kBackref, kPlain, kStartOfObject)
1165 ALL_SPACES(kBackrefWithSkip, kPlain, kStartOfObject) 1165 ALL_SPACES(kBackrefWithSkip, kPlain, kStartOfObject)
1166 #if defined(V8_TARGET_ARCH_MIPS) || V8_OOL_CONSTANT_POOL || \ 1166 #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \
1167 defined(V8_TARGET_ARCH_MIPS64) 1167 defined(V8_TARGET_ARCH_PPC) || V8_OOL_CONSTANT_POOL
1168 // Deserialize a new object from pointer found in code and write 1168 // Deserialize a new object from pointer found in code and write
1169 // a pointer to it to the current object. Required only for MIPS or ARM 1169 // a pointer to it to the current object. Required only for MIPS, PPC or
1170 // with ool constant pool, and omitted on the other architectures because 1170 // ARM with ool constant pool, and omitted on the other architectures
1171 // it is fully unrolled and would cause bloat. 1171 // because it is fully unrolled and would cause bloat.
1172 ALL_SPACES(kNewObject, kFromCode, kStartOfObject) 1172 ALL_SPACES(kNewObject, kFromCode, kStartOfObject)
1173 // Find a recently deserialized code object using its offset from the 1173 // Find a recently deserialized code object using its offset from the
1174 // current allocation point and write a pointer to it to the current 1174 // current allocation point and write a pointer to it to the current
1175 // object. Required only for MIPS or ARM with ool constant pool. 1175 // object. Required only for MIPS, PPC or ARM with ool constant pool.
1176 ALL_SPACES(kBackref, kFromCode, kStartOfObject) 1176 ALL_SPACES(kBackref, kFromCode, kStartOfObject)
1177 ALL_SPACES(kBackrefWithSkip, kFromCode, kStartOfObject) 1177 ALL_SPACES(kBackrefWithSkip, kFromCode, kStartOfObject)
1178 #endif 1178 #endif
1179 // Find a recently deserialized code object using its offset from the 1179 // Find a recently deserialized code object using its offset from the
1180 // current allocation point and write a pointer to its first instruction 1180 // current allocation point and write a pointer to its first instruction
1181 // to the current code object or the instruction pointer in a function 1181 // to the current code object or the instruction pointer in a function
1182 // object. 1182 // object.
1183 ALL_SPACES(kBackref, kFromCode, kInnerPointer) 1183 ALL_SPACES(kBackref, kFromCode, kInnerPointer)
1184 ALL_SPACES(kBackrefWithSkip, kFromCode, kInnerPointer) 1184 ALL_SPACES(kBackrefWithSkip, kFromCode, kInnerPointer)
1185 ALL_SPACES(kBackref, kPlain, kInnerPointer) 1185 ALL_SPACES(kBackref, kPlain, kInnerPointer)
1186 ALL_SPACES(kBackrefWithSkip, kPlain, kInnerPointer) 1186 ALL_SPACES(kBackrefWithSkip, kPlain, kInnerPointer)
1187 // Find an object in the roots array and write a pointer to it to the 1187 // Find an object in the roots array and write a pointer to it to the
1188 // current object. 1188 // current object.
1189 CASE_STATEMENT(kRootArray, kPlain, kStartOfObject, 0) 1189 CASE_STATEMENT(kRootArray, kPlain, kStartOfObject, 0)
1190 CASE_BODY(kRootArray, kPlain, kStartOfObject, 0) 1190 CASE_BODY(kRootArray, kPlain, kStartOfObject, 0)
1191 #if defined(V8_TARGET_ARCH_MIPS) || V8_OOL_CONSTANT_POOL || \ 1191 #if defined(V8_TARGET_ARCH_MIPS) || V8_OOL_CONSTANT_POOL || \
1192 defined(V8_TARGET_ARCH_MIPS64) 1192 defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_PPC)
1193 // Find an object in the roots array and write a pointer to it to in code. 1193 // Find an object in the roots array and write a pointer to it to in code.
1194 CASE_STATEMENT(kRootArray, kFromCode, kStartOfObject, 0) 1194 CASE_STATEMENT(kRootArray, kFromCode, kStartOfObject, 0)
1195 CASE_BODY(kRootArray, kFromCode, kStartOfObject, 0) 1195 CASE_BODY(kRootArray, kFromCode, kStartOfObject, 0)
1196 #endif 1196 #endif
1197 // Find an object in the partial snapshots cache and write a pointer to it 1197 // Find an object in the partial snapshots cache and write a pointer to it
1198 // to the current object. 1198 // to the current object.
1199 CASE_STATEMENT(kPartialSnapshotCache, kPlain, kStartOfObject, 0) 1199 CASE_STATEMENT(kPartialSnapshotCache, kPlain, kStartOfObject, 0)
1200 CASE_BODY(kPartialSnapshotCache, 1200 CASE_BODY(kPartialSnapshotCache,
1201 kPlain, 1201 kPlain,
1202 kStartOfObject, 1202 kStartOfObject,
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 return GetHeaderValue(kNumInternalizedStringsOffset); 2481 return GetHeaderValue(kNumInternalizedStringsOffset);
2482 } 2482 }
2483 2483
2484 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const { 2484 Vector<const uint32_t> SerializedCodeData::CodeStubKeys() const {
2485 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size; 2485 int reservations_size = GetHeaderValue(kReservationsOffset) * kInt32Size;
2486 const byte* start = data_ + kHeaderSize + reservations_size; 2486 const byte* start = data_ + kHeaderSize + reservations_size;
2487 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start), 2487 return Vector<const uint32_t>(reinterpret_cast<const uint32_t*>(start),
2488 GetHeaderValue(kNumCodeStubKeysOffset)); 2488 GetHeaderValue(kNumCodeStubKeysOffset));
2489 } 2489 }
2490 } } // namespace v8::internal 2490 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/sampler.cc ('k') | src/simulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698