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

Side by Side Diff: src/heap.cc

Issue 72333004: Match max property descriptor length to corresponding bit fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 reinterpret_cast<Map*>(result)->set_map(raw_unchecked_meta_map()); 2475 reinterpret_cast<Map*>(result)->set_map(raw_unchecked_meta_map());
2476 reinterpret_cast<Map*>(result)->set_instance_type(instance_type); 2476 reinterpret_cast<Map*>(result)->set_instance_type(instance_type);
2477 reinterpret_cast<Map*>(result)->set_instance_size(instance_size); 2477 reinterpret_cast<Map*>(result)->set_instance_size(instance_size);
2478 reinterpret_cast<Map*>(result)->set_visitor_id( 2478 reinterpret_cast<Map*>(result)->set_visitor_id(
2479 StaticVisitorBase::GetVisitorId(instance_type, instance_size)); 2479 StaticVisitorBase::GetVisitorId(instance_type, instance_size));
2480 reinterpret_cast<Map*>(result)->set_inobject_properties(0); 2480 reinterpret_cast<Map*>(result)->set_inobject_properties(0);
2481 reinterpret_cast<Map*>(result)->set_pre_allocated_property_fields(0); 2481 reinterpret_cast<Map*>(result)->set_pre_allocated_property_fields(0);
2482 reinterpret_cast<Map*>(result)->set_unused_property_fields(0); 2482 reinterpret_cast<Map*>(result)->set_unused_property_fields(0);
2483 reinterpret_cast<Map*>(result)->set_bit_field(0); 2483 reinterpret_cast<Map*>(result)->set_bit_field(0);
2484 reinterpret_cast<Map*>(result)->set_bit_field2(0); 2484 reinterpret_cast<Map*>(result)->set_bit_field2(0);
2485 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache) | 2485 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) |
2486 Map::OwnsDescriptors::encode(true); 2486 Map::OwnsDescriptors::encode(true);
2487 reinterpret_cast<Map*>(result)->set_bit_field3(bit_field3); 2487 reinterpret_cast<Map*>(result)->set_bit_field3(bit_field3);
2488 return result; 2488 return result;
2489 } 2489 }
2490 2490
2491 2491
2492 MaybeObject* Heap::AllocateMap(InstanceType instance_type, 2492 MaybeObject* Heap::AllocateMap(InstanceType instance_type,
2493 int instance_size, 2493 int instance_size,
2494 ElementsKind elements_kind) { 2494 ElementsKind elements_kind) {
2495 Object* result; 2495 Object* result;
(...skipping 11 matching lines...) Expand all
2507 map->set_inobject_properties(0); 2507 map->set_inobject_properties(0);
2508 map->set_pre_allocated_property_fields(0); 2508 map->set_pre_allocated_property_fields(0);
2509 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); 2509 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
2510 map->set_dependent_code(DependentCode::cast(empty_fixed_array()), 2510 map->set_dependent_code(DependentCode::cast(empty_fixed_array()),
2511 SKIP_WRITE_BARRIER); 2511 SKIP_WRITE_BARRIER);
2512 map->init_back_pointer(undefined_value()); 2512 map->init_back_pointer(undefined_value());
2513 map->set_unused_property_fields(0); 2513 map->set_unused_property_fields(0);
2514 map->set_instance_descriptors(empty_descriptor_array()); 2514 map->set_instance_descriptors(empty_descriptor_array());
2515 map->set_bit_field(0); 2515 map->set_bit_field(0);
2516 map->set_bit_field2(1 << Map::kIsExtensible); 2516 map->set_bit_field2(1 << Map::kIsExtensible);
2517 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache) | 2517 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) |
2518 Map::OwnsDescriptors::encode(true); 2518 Map::OwnsDescriptors::encode(true);
2519 map->set_bit_field3(bit_field3); 2519 map->set_bit_field3(bit_field3);
2520 map->set_elements_kind(elements_kind); 2520 map->set_elements_kind(elements_kind);
2521 2521
2522 return map; 2522 return map;
2523 } 2523 }
2524 2524
2525 2525
2526 MaybeObject* Heap::AllocateCodeCache() { 2526 MaybeObject* Heap::AllocateCodeCache() {
2527 CodeCache* code_cache; 2527 CodeCache* code_cache;
(...skipping 5430 matching lines...) Expand 10 before | Expand all | Expand 10 after
7958 if (FLAG_concurrent_recompilation) { 7958 if (FLAG_concurrent_recompilation) {
7959 heap_->relocation_mutex_->Lock(); 7959 heap_->relocation_mutex_->Lock();
7960 #ifdef DEBUG 7960 #ifdef DEBUG
7961 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7961 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7962 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7962 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7963 #endif // DEBUG 7963 #endif // DEBUG
7964 } 7964 }
7965 } 7965 }
7966 7966
7967 } } // namespace v8::internal 7967 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698