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

Side by Side Diff: src/objects.cc

Issue 429583004: ahum. Small fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2440 result = parent; 2440 result = parent;
2441 } 2441 }
2442 return result; 2442 return result;
2443 } 2443 }
2444 2444
2445 2445
2446 void Map::UpdateFieldType(int descriptor, Handle<Name> name, 2446 void Map::UpdateFieldType(int descriptor, Handle<Name> name,
2447 Handle<HeapType> new_type) { 2447 Handle<HeapType> new_type) {
2448 DisallowHeapAllocation no_allocation; 2448 DisallowHeapAllocation no_allocation;
2449 PropertyDetails details = instance_descriptors()->GetDetails(descriptor); 2449 PropertyDetails details = instance_descriptors()->GetDetails(descriptor);
2450 if (!details.type() == FIELD) return; 2450 if (details.type() != FIELD) return;
2451 if (HasTransitionArray()) { 2451 if (HasTransitionArray()) {
2452 TransitionArray* transitions = this->transitions(); 2452 TransitionArray* transitions = this->transitions();
2453 for (int i = 0; i < transitions->number_of_transitions(); ++i) { 2453 for (int i = 0; i < transitions->number_of_transitions(); ++i) {
2454 transitions->GetTarget(i)->UpdateFieldType(descriptor, name, new_type); 2454 transitions->GetTarget(i)->UpdateFieldType(descriptor, name, new_type);
2455 } 2455 }
2456 } 2456 }
2457 // Skip if already updated the shared descriptor. 2457 // Skip if already updated the shared descriptor.
2458 if (instance_descriptors()->GetFieldType(descriptor) == *new_type) return; 2458 if (instance_descriptors()->GetFieldType(descriptor) == *new_type) return;
2459 FieldDescriptor d(name, instance_descriptors()->GetFieldIndex(descriptor), 2459 FieldDescriptor d(name, instance_descriptors()->GetFieldIndex(descriptor),
2460 new_type, details.attributes(), details.representation()); 2460 new_type, details.attributes(), details.representation());
(...skipping 14524 matching lines...) Expand 10 before | Expand all | Expand 10 after
16985 #define ERROR_MESSAGES_TEXTS(C, T) T, 16985 #define ERROR_MESSAGES_TEXTS(C, T) T,
16986 static const char* error_messages_[] = { 16986 static const char* error_messages_[] = {
16987 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16987 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16988 }; 16988 };
16989 #undef ERROR_MESSAGES_TEXTS 16989 #undef ERROR_MESSAGES_TEXTS
16990 return error_messages_[reason]; 16990 return error_messages_[reason];
16991 } 16991 }
16992 16992
16993 16993
16994 } } // namespace v8::internal 16994 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698