Chromium Code Reviews

Side by Side Diff: src/handles.cc

Issue 213213002: Fix LoadFieldByIndex to take mutable heap-numbers into account. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use TestAndBranchIfAnySet on arm64 Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 671 matching lines...)
682 if (i < real_size) ++enum_size; 682 if (i < real_size) ++enum_size;
683 storage->set(index, key); 683 storage->set(index, key);
684 if (!indices.is_null()) { 684 if (!indices.is_null()) {
685 if (details.type() != FIELD) { 685 if (details.type() != FIELD) {
686 indices = Handle<FixedArray>(); 686 indices = Handle<FixedArray>();
687 } else { 687 } else {
688 int field_index = descs->GetFieldIndex(i); 688 int field_index = descs->GetFieldIndex(i);
689 if (field_index >= map->inobject_properties()) { 689 if (field_index >= map->inobject_properties()) {
690 field_index = -(field_index - map->inobject_properties() + 1); 690 field_index = -(field_index - map->inobject_properties() + 1);
691 } 691 }
692 field_index = (field_index << 1)
693 | details.representation().IsDouble();
692 indices->set(index, Smi::FromInt(field_index)); 694 indices->set(index, Smi::FromInt(field_index));
693 } 695 }
694 } 696 }
695 index++; 697 index++;
696 } 698 }
697 } 699 }
698 ASSERT(index == storage->length()); 700 ASSERT(index == storage->length());
699 701
700 Handle<FixedArray> bridge_storage = 702 Handle<FixedArray> bridge_storage =
701 isolate->factory()->NewFixedArray( 703 isolate->factory()->NewFixedArray(
(...skipping 65 matching lines...)
767 Handle<Code> code) { 769 Handle<Code> code) {
768 heap->EnsureWeakObjectToCodeTable(); 770 heap->EnsureWeakObjectToCodeTable();
769 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object)); 771 Handle<DependentCode> dep(heap->LookupWeakObjectToCodeDependency(*object));
770 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code); 772 dep = DependentCode::Insert(dep, DependentCode::kWeaklyEmbeddedGroup, code);
771 CALL_HEAP_FUNCTION_VOID(heap->isolate(), 773 CALL_HEAP_FUNCTION_VOID(heap->isolate(),
772 heap->AddWeakObjectToCodeDependency(*object, *dep)); 774 heap->AddWeakObjectToCodeDependency(*object, *dep));
773 } 775 }
774 776
775 777
776 } } // namespace v8::internal 778 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine