OLD | NEW |
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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2210 } | 2210 } |
2211 | 2211 |
2212 | 2212 |
2213 void FixedDoubleArray::FillWithHoles(int from, int to) { | 2213 void FixedDoubleArray::FillWithHoles(int from, int to) { |
2214 for (int i = from; i < to; i++) { | 2214 for (int i = from; i < to; i++) { |
2215 set_the_hole(i); | 2215 set_the_hole(i); |
2216 } | 2216 } |
2217 } | 2217 } |
2218 | 2218 |
2219 | 2219 |
| 2220 bool ConstantPoolArray::is_extended_layout() { |
| 2221 uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset); |
| 2222 return IsExtendedField::decode(small_layout_1); |
| 2223 } |
| 2224 |
| 2225 |
| 2226 ConstantPoolArray::LayoutSection ConstantPoolArray::final_section() { |
| 2227 return is_extended_layout() ? EXTENDED_SECTION : SMALL_SECTION; |
| 2228 } |
| 2229 |
| 2230 |
| 2231 int ConstantPoolArray::first_extended_section_index() { |
| 2232 ASSERT(is_extended_layout()); |
| 2233 uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset); |
| 2234 return TotalCountField::decode(small_layout_2); |
| 2235 } |
| 2236 |
| 2237 |
| 2238 int ConstantPoolArray::get_extended_section_header_offset() { |
| 2239 return RoundUp(SizeFor(NumberOfEntries(this, SMALL_SECTION)), kInt64Size); |
| 2240 } |
| 2241 |
| 2242 |
| 2243 ConstantPoolArray::WeakObjectState ConstantPoolArray::get_weak_object_state() { |
| 2244 uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset); |
| 2245 return WeakObjectStateField::decode(small_layout_2); |
| 2246 } |
| 2247 |
| 2248 |
2220 void ConstantPoolArray::set_weak_object_state( | 2249 void ConstantPoolArray::set_weak_object_state( |
2221 ConstantPoolArray::WeakObjectState state) { | 2250 ConstantPoolArray::WeakObjectState state) { |
2222 int old_layout_field = READ_INT_FIELD(this, kArrayLayoutOffset); | 2251 uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset); |
2223 int new_layout_field = WeakObjectStateField::update(old_layout_field, state); | 2252 small_layout_2 = WeakObjectStateField::update(small_layout_2, state); |
2224 WRITE_INT_FIELD(this, kArrayLayoutOffset, new_layout_field); | 2253 WRITE_INT32_FIELD(this, kSmallLayout2Offset, small_layout_2); |
2225 } | 2254 } |
2226 | 2255 |
2227 | 2256 |
2228 ConstantPoolArray::WeakObjectState ConstantPoolArray::get_weak_object_state() { | 2257 int ConstantPoolArray::first_index(Type type, LayoutSection section) { |
2229 int layout_field = READ_INT_FIELD(this, kArrayLayoutOffset); | 2258 int index = 0; |
2230 return WeakObjectStateField::decode(layout_field); | 2259 if (section == EXTENDED_SECTION) { |
2231 } | 2260 ASSERT(is_extended_layout()); |
2232 | 2261 index += first_extended_section_index(); |
2233 | 2262 } |
2234 int ConstantPoolArray::first_int64_index() { | 2263 |
2235 return 0; | 2264 for (Type type_iter = FIRST_TYPE; type_iter < type; |
2236 } | 2265 type_iter = next_type(type_iter)) { |
2237 | 2266 index += number_of_entries(type_iter, section); |
2238 | 2267 } |
2239 int ConstantPoolArray::first_code_ptr_index() { | 2268 |
2240 int layout_field = READ_INT_FIELD(this, kArrayLayoutOffset); | 2269 return index; |
2241 return first_int64_index() + | 2270 } |
2242 NumberOfInt64EntriesField::decode(layout_field); | 2271 |
2243 } | 2272 |
2244 | 2273 int ConstantPoolArray::last_index(Type type, LayoutSection section) { |
2245 | 2274 return first_index(type, section) + number_of_entries(type, section) - 1; |
2246 int ConstantPoolArray::first_heap_ptr_index() { | 2275 } |
2247 int layout_field = READ_INT_FIELD(this, kArrayLayoutOffset); | 2276 |
2248 return first_code_ptr_index() + | 2277 |
2249 NumberOfCodePtrEntriesField::decode(layout_field); | 2278 int ConstantPoolArray::number_of_entries(Type type, LayoutSection section) { |
2250 } | 2279 if (section == SMALL_SECTION) { |
2251 | 2280 uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset); |
2252 | 2281 uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset); |
2253 int ConstantPoolArray::first_int32_index() { | 2282 switch (type) { |
2254 int layout_field = READ_INT_FIELD(this, kArrayLayoutOffset); | 2283 case INT64: |
2255 return first_heap_ptr_index() + | 2284 return Int64CountField::decode(small_layout_1); |
2256 NumberOfHeapPtrEntriesField::decode(layout_field); | 2285 case CODE_PTR: |
2257 } | 2286 return CodePtrCountField::decode(small_layout_1); |
2258 | 2287 case HEAP_PTR: |
2259 | 2288 return HeapPtrCountField::decode(small_layout_1); |
2260 int ConstantPoolArray::count_of_int64_entries() { | 2289 case INT32: |
2261 return first_code_ptr_index(); | 2290 return Int32CountField::decode(small_layout_2); |
2262 } | 2291 default: |
2263 | 2292 UNREACHABLE(); |
2264 | 2293 return 0; |
2265 int ConstantPoolArray::count_of_code_ptr_entries() { | 2294 } |
2266 return first_heap_ptr_index() - first_code_ptr_index(); | 2295 } else { |
2267 } | 2296 ASSERT(section == EXTENDED_SECTION && is_extended_layout()); |
2268 | 2297 int offset = get_extended_section_header_offset(); |
2269 | 2298 switch (type) { |
2270 int ConstantPoolArray::count_of_heap_ptr_entries() { | 2299 case INT64: |
2271 return first_int32_index() - first_heap_ptr_index(); | 2300 offset += kExtendedInt64CountOffset; |
2272 } | 2301 break; |
2273 | 2302 case CODE_PTR: |
2274 | 2303 offset += kExtendedCodePtrCountOffset; |
2275 int ConstantPoolArray::count_of_int32_entries() { | 2304 break; |
2276 return length() - first_int32_index(); | 2305 case HEAP_PTR: |
2277 } | 2306 offset += kExtendedHeapPtrCountOffset; |
2278 | 2307 break; |
2279 | 2308 case INT32: |
2280 void ConstantPoolArray::Init(int number_of_int64_entries, | 2309 offset += kExtendedInt32CountOffset; |
2281 int number_of_code_ptr_entries, | 2310 break; |
2282 int number_of_heap_ptr_entries, | 2311 default: |
2283 int number_of_int32_entries) { | 2312 UNREACHABLE(); |
2284 set_length(number_of_int64_entries + | 2313 } |
2285 number_of_code_ptr_entries + | 2314 return READ_INT_FIELD(this, offset); |
2286 number_of_heap_ptr_entries + | 2315 } |
2287 number_of_int32_entries); | 2316 } |
2288 int layout_field = | 2317 |
2289 NumberOfInt64EntriesField::encode(number_of_int64_entries) | | 2318 |
2290 NumberOfCodePtrEntriesField::encode(number_of_code_ptr_entries) | | 2319 ConstantPoolArray::Type ConstantPoolArray::get_type(int index) { |
2291 NumberOfHeapPtrEntriesField::encode(number_of_heap_ptr_entries) | | 2320 LayoutSection section; |
2292 WeakObjectStateField::encode(NO_WEAK_OBJECTS); | 2321 if (is_extended_layout() && index >= first_extended_section_index()) { |
2293 WRITE_INT_FIELD(this, kArrayLayoutOffset, layout_field); | 2322 section = EXTENDED_SECTION; |
| 2323 } else { |
| 2324 section = SMALL_SECTION; |
| 2325 } |
| 2326 |
| 2327 Type type = FIRST_TYPE; |
| 2328 while (index > last_index(type, section)) { |
| 2329 type = next_type(type); |
| 2330 } |
| 2331 ASSERT(type <= LAST_TYPE); |
| 2332 return type; |
2294 } | 2333 } |
2295 | 2334 |
2296 | 2335 |
2297 int64_t ConstantPoolArray::get_int64_entry(int index) { | 2336 int64_t ConstantPoolArray::get_int64_entry(int index) { |
2298 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2337 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2299 ASSERT(index >= 0 && index < first_code_ptr_index()); | 2338 ASSERT(get_type(index) == INT64); |
2300 return READ_INT64_FIELD(this, OffsetOfElementAt(index)); | 2339 return READ_INT64_FIELD(this, OffsetOfElementAt(index)); |
2301 } | 2340 } |
2302 | 2341 |
| 2342 |
2303 double ConstantPoolArray::get_int64_entry_as_double(int index) { | 2343 double ConstantPoolArray::get_int64_entry_as_double(int index) { |
2304 STATIC_ASSERT(kDoubleSize == kInt64Size); | 2344 STATIC_ASSERT(kDoubleSize == kInt64Size); |
2305 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2345 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2306 ASSERT(index >= 0 && index < first_code_ptr_index()); | 2346 ASSERT(get_type(index) == INT64); |
2307 return READ_DOUBLE_FIELD(this, OffsetOfElementAt(index)); | 2347 return READ_DOUBLE_FIELD(this, OffsetOfElementAt(index)); |
2308 } | 2348 } |
2309 | 2349 |
2310 | 2350 |
2311 Address ConstantPoolArray::get_code_ptr_entry(int index) { | 2351 Address ConstantPoolArray::get_code_ptr_entry(int index) { |
2312 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2352 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2313 ASSERT(index >= first_code_ptr_index() && index < first_heap_ptr_index()); | 2353 ASSERT(get_type(index) == CODE_PTR); |
2314 return reinterpret_cast<Address>(READ_FIELD(this, OffsetOfElementAt(index))); | 2354 return reinterpret_cast<Address>(READ_FIELD(this, OffsetOfElementAt(index))); |
2315 } | 2355 } |
2316 | 2356 |
2317 | 2357 |
2318 Object* ConstantPoolArray::get_heap_ptr_entry(int index) { | 2358 Object* ConstantPoolArray::get_heap_ptr_entry(int index) { |
2319 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2359 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2320 ASSERT(index >= first_heap_ptr_index() && index < first_int32_index()); | 2360 ASSERT(get_type(index) == HEAP_PTR); |
2321 return READ_FIELD(this, OffsetOfElementAt(index)); | 2361 return READ_FIELD(this, OffsetOfElementAt(index)); |
2322 } | 2362 } |
2323 | 2363 |
2324 | 2364 |
2325 int32_t ConstantPoolArray::get_int32_entry(int index) { | 2365 int32_t ConstantPoolArray::get_int32_entry(int index) { |
2326 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2366 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2327 ASSERT(index >= first_int32_index() && index < length()); | 2367 ASSERT(get_type(index) == INT32); |
2328 return READ_INT32_FIELD(this, OffsetOfElementAt(index)); | 2368 return READ_INT32_FIELD(this, OffsetOfElementAt(index)); |
2329 } | 2369 } |
2330 | 2370 |
2331 | 2371 |
| 2372 void ConstantPoolArray::set(int index, int64_t value) { |
| 2373 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
| 2374 ASSERT(get_type(index) == INT64); |
| 2375 WRITE_INT64_FIELD(this, OffsetOfElementAt(index), value); |
| 2376 } |
| 2377 |
| 2378 |
| 2379 void ConstantPoolArray::set(int index, double value) { |
| 2380 STATIC_ASSERT(kDoubleSize == kInt64Size); |
| 2381 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
| 2382 ASSERT(get_type(index) == INT64); |
| 2383 WRITE_DOUBLE_FIELD(this, OffsetOfElementAt(index), value); |
| 2384 } |
| 2385 |
| 2386 |
2332 void ConstantPoolArray::set(int index, Address value) { | 2387 void ConstantPoolArray::set(int index, Address value) { |
2333 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2388 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2334 ASSERT(index >= first_code_ptr_index() && index < first_heap_ptr_index()); | 2389 ASSERT(get_type(index) == CODE_PTR); |
2335 WRITE_FIELD(this, OffsetOfElementAt(index), reinterpret_cast<Object*>(value)); | 2390 WRITE_FIELD(this, OffsetOfElementAt(index), reinterpret_cast<Object*>(value)); |
2336 } | 2391 } |
2337 | 2392 |
2338 | 2393 |
2339 void ConstantPoolArray::set(int index, Object* value) { | 2394 void ConstantPoolArray::set(int index, Object* value) { |
2340 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2395 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2341 ASSERT(index >= first_code_ptr_index() && index < first_int32_index()); | 2396 ASSERT(get_type(index) == HEAP_PTR); |
2342 WRITE_FIELD(this, OffsetOfElementAt(index), value); | 2397 WRITE_FIELD(this, OffsetOfElementAt(index), value); |
2343 WRITE_BARRIER(GetHeap(), this, OffsetOfElementAt(index), value); | 2398 WRITE_BARRIER(GetHeap(), this, OffsetOfElementAt(index), value); |
2344 } | 2399 } |
2345 | 2400 |
2346 | 2401 |
2347 void ConstantPoolArray::set(int index, int64_t value) { | |
2348 ASSERT(map() == GetHeap()->constant_pool_array_map()); | |
2349 ASSERT(index >= first_int64_index() && index < first_code_ptr_index()); | |
2350 WRITE_INT64_FIELD(this, OffsetOfElementAt(index), value); | |
2351 } | |
2352 | |
2353 | |
2354 void ConstantPoolArray::set(int index, double value) { | |
2355 STATIC_ASSERT(kDoubleSize == kInt64Size); | |
2356 ASSERT(map() == GetHeap()->constant_pool_array_map()); | |
2357 ASSERT(index >= first_int64_index() && index < first_code_ptr_index()); | |
2358 WRITE_DOUBLE_FIELD(this, OffsetOfElementAt(index), value); | |
2359 } | |
2360 | |
2361 | |
2362 void ConstantPoolArray::set(int index, int32_t value) { | 2402 void ConstantPoolArray::set(int index, int32_t value) { |
2363 ASSERT(map() == GetHeap()->constant_pool_array_map()); | 2403 ASSERT(map() == GetHeap()->constant_pool_array_map()); |
2364 ASSERT(index >= this->first_int32_index() && index < length()); | 2404 ASSERT(get_type(index) == INT32); |
2365 WRITE_INT32_FIELD(this, OffsetOfElementAt(index), value); | 2405 WRITE_INT32_FIELD(this, OffsetOfElementAt(index), value); |
2366 } | 2406 } |
2367 | 2407 |
2368 | 2408 |
| 2409 void ConstantPoolArray::Init(const NumberOfEntries& small) { |
| 2410 uint32_t small_layout_1 = |
| 2411 Int64CountField::encode(small.count_of(INT64)) | |
| 2412 CodePtrCountField::encode(small.count_of(CODE_PTR)) | |
| 2413 HeapPtrCountField::encode(small.count_of(HEAP_PTR)) | |
| 2414 IsExtendedField::encode(false); |
| 2415 uint32_t small_layout_2 = |
| 2416 Int32CountField::encode(small.count_of(INT32)) | |
| 2417 TotalCountField::encode(small.total_count()) | |
| 2418 WeakObjectStateField::encode(NO_WEAK_OBJECTS); |
| 2419 WRITE_UINT32_FIELD(this, kSmallLayout1Offset, small_layout_1); |
| 2420 WRITE_UINT32_FIELD(this, kSmallLayout2Offset, small_layout_2); |
| 2421 if (kHeaderSize != kFirstEntryOffset) { |
| 2422 ASSERT(kFirstEntryOffset - kHeaderSize == kInt32Size); |
| 2423 WRITE_UINT32_FIELD(this, kHeaderSize, 0); // Zero out header padding. |
| 2424 } |
| 2425 } |
| 2426 |
| 2427 |
| 2428 void ConstantPoolArray::InitExtended(const NumberOfEntries& small, |
| 2429 const NumberOfEntries& extended) { |
| 2430 // Initialize small layout fields first. |
| 2431 Init(small); |
| 2432 |
| 2433 // Set is_extended_layout field. |
| 2434 uint32_t small_layout_1 = READ_UINT32_FIELD(this, kSmallLayout1Offset); |
| 2435 small_layout_1 = IsExtendedField::update(small_layout_1, true); |
| 2436 WRITE_INT32_FIELD(this, kSmallLayout1Offset, small_layout_1); |
| 2437 |
| 2438 // Initialize the extended layout fields. |
| 2439 int extended_header_offset = get_extended_section_header_offset(); |
| 2440 WRITE_INT_FIELD(this, extended_header_offset + kExtendedInt64CountOffset, |
| 2441 extended.count_of(INT64)); |
| 2442 WRITE_INT_FIELD(this, extended_header_offset + kExtendedCodePtrCountOffset, |
| 2443 extended.count_of(CODE_PTR)); |
| 2444 WRITE_INT_FIELD(this, extended_header_offset + kExtendedHeapPtrCountOffset, |
| 2445 extended.count_of(HEAP_PTR)); |
| 2446 WRITE_INT_FIELD(this, extended_header_offset + kExtendedInt32CountOffset, |
| 2447 extended.count_of(INT32)); |
| 2448 } |
| 2449 |
| 2450 |
| 2451 int ConstantPoolArray::size() { |
| 2452 NumberOfEntries small(this, SMALL_SECTION); |
| 2453 if (!is_extended_layout()) { |
| 2454 return SizeFor(small); |
| 2455 } else { |
| 2456 NumberOfEntries extended(this, EXTENDED_SECTION); |
| 2457 return SizeForExtended(small, extended); |
| 2458 } |
| 2459 } |
| 2460 |
| 2461 |
| 2462 int ConstantPoolArray::length() { |
| 2463 uint32_t small_layout_2 = READ_UINT32_FIELD(this, kSmallLayout2Offset); |
| 2464 int length = TotalCountField::decode(small_layout_2); |
| 2465 if (is_extended_layout()) { |
| 2466 length += number_of_entries(INT64, EXTENDED_SECTION) + |
| 2467 number_of_entries(CODE_PTR, EXTENDED_SECTION) + |
| 2468 number_of_entries(HEAP_PTR, EXTENDED_SECTION) + |
| 2469 number_of_entries(INT32, EXTENDED_SECTION); |
| 2470 } |
| 2471 return length; |
| 2472 } |
| 2473 |
| 2474 |
| 2475 int ConstantPoolArray::Iterator::next_index() { |
| 2476 ASSERT(!is_finished()); |
| 2477 int ret = next_index_++; |
| 2478 update_section(); |
| 2479 return ret; |
| 2480 } |
| 2481 |
| 2482 |
| 2483 bool ConstantPoolArray::Iterator::is_finished() { |
| 2484 return next_index_ > array_->last_index(type_, final_section_); |
| 2485 } |
| 2486 |
| 2487 |
| 2488 void ConstantPoolArray::Iterator::update_section() { |
| 2489 if (next_index_ > array_->last_index(type_, current_section_) && |
| 2490 current_section_ != final_section_) { |
| 2491 ASSERT(final_section_ == EXTENDED_SECTION); |
| 2492 current_section_ = EXTENDED_SECTION; |
| 2493 next_index_ = array_->first_index(type_, EXTENDED_SECTION); |
| 2494 } |
| 2495 } |
| 2496 |
| 2497 |
2369 WriteBarrierMode HeapObject::GetWriteBarrierMode( | 2498 WriteBarrierMode HeapObject::GetWriteBarrierMode( |
2370 const DisallowHeapAllocation& promise) { | 2499 const DisallowHeapAllocation& promise) { |
2371 Heap* heap = GetHeap(); | 2500 Heap* heap = GetHeap(); |
2372 if (heap->incremental_marking()->IsMarking()) return UPDATE_WRITE_BARRIER; | 2501 if (heap->incremental_marking()->IsMarking()) return UPDATE_WRITE_BARRIER; |
2373 if (heap->InNewSpace(this)) return SKIP_WRITE_BARRIER; | 2502 if (heap->InNewSpace(this)) return SKIP_WRITE_BARRIER; |
2374 return UPDATE_WRITE_BARRIER; | 2503 return UPDATE_WRITE_BARRIER; |
2375 } | 2504 } |
2376 | 2505 |
2377 | 2506 |
2378 void FixedArray::set(int index, | 2507 void FixedArray::set(int index, |
(...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3970 if (instance_type == STRING_TYPE || | 4099 if (instance_type == STRING_TYPE || |
3971 instance_type == INTERNALIZED_STRING_TYPE) { | 4100 instance_type == INTERNALIZED_STRING_TYPE) { |
3972 return SeqTwoByteString::SizeFor( | 4101 return SeqTwoByteString::SizeFor( |
3973 reinterpret_cast<SeqTwoByteString*>(this)->length()); | 4102 reinterpret_cast<SeqTwoByteString*>(this)->length()); |
3974 } | 4103 } |
3975 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) { | 4104 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) { |
3976 return FixedDoubleArray::SizeFor( | 4105 return FixedDoubleArray::SizeFor( |
3977 reinterpret_cast<FixedDoubleArray*>(this)->length()); | 4106 reinterpret_cast<FixedDoubleArray*>(this)->length()); |
3978 } | 4107 } |
3979 if (instance_type == CONSTANT_POOL_ARRAY_TYPE) { | 4108 if (instance_type == CONSTANT_POOL_ARRAY_TYPE) { |
3980 return ConstantPoolArray::SizeFor( | 4109 return reinterpret_cast<ConstantPoolArray*>(this)->size(); |
3981 reinterpret_cast<ConstantPoolArray*>(this)->count_of_int64_entries(), | |
3982 reinterpret_cast<ConstantPoolArray*>(this)->count_of_code_ptr_entries(), | |
3983 reinterpret_cast<ConstantPoolArray*>(this)->count_of_heap_ptr_entries(), | |
3984 reinterpret_cast<ConstantPoolArray*>(this)->count_of_int32_entries()); | |
3985 } | 4110 } |
3986 if (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE && | 4111 if (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE && |
3987 instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE) { | 4112 instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE) { |
3988 return reinterpret_cast<FixedTypedArrayBase*>( | 4113 return reinterpret_cast<FixedTypedArrayBase*>( |
3989 this)->TypedArraySize(instance_type); | 4114 this)->TypedArraySize(instance_type); |
3990 } | 4115 } |
3991 ASSERT(instance_type == CODE_TYPE); | 4116 ASSERT(instance_type == CODE_TYPE); |
3992 return reinterpret_cast<Code*>(this)->CodeSize(); | 4117 return reinterpret_cast<Code*>(this)->CodeSize(); |
3993 } | 4118 } |
3994 | 4119 |
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6862 #undef READ_SHORT_FIELD | 6987 #undef READ_SHORT_FIELD |
6863 #undef WRITE_SHORT_FIELD | 6988 #undef WRITE_SHORT_FIELD |
6864 #undef READ_BYTE_FIELD | 6989 #undef READ_BYTE_FIELD |
6865 #undef WRITE_BYTE_FIELD | 6990 #undef WRITE_BYTE_FIELD |
6866 #undef NOBARRIER_READ_BYTE_FIELD | 6991 #undef NOBARRIER_READ_BYTE_FIELD |
6867 #undef NOBARRIER_WRITE_BYTE_FIELD | 6992 #undef NOBARRIER_WRITE_BYTE_FIELD |
6868 | 6993 |
6869 } } // namespace v8::internal | 6994 } } // namespace v8::internal |
6870 | 6995 |
6871 #endif // V8_OBJECTS_INL_H_ | 6996 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |