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

Side by Side Diff: src/objects.cc

Issue 379893002: Clean up and update const / var (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 6 years, 5 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 | « src/ia32/full-codegen-ia32.cc ('k') | src/parser.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 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 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2343 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), 2343 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate),
2344 new_map->NumberOfFields(), 2344 new_map->NumberOfFields(),
2345 attributes, 2345 attributes,
2346 Representation::Tagged()); 2346 Representation::Tagged());
2347 descriptors->Replace(modify_index, &d); 2347 descriptors->Replace(modify_index, &d);
2348 int unused_property_fields = new_map->unused_property_fields() - 1; 2348 int unused_property_fields = new_map->unused_property_fields() - 1;
2349 if (unused_property_fields < 0) { 2349 if (unused_property_fields < 0) {
2350 unused_property_fields += JSObject::kFieldsAdded; 2350 unused_property_fields += JSObject::kFieldsAdded;
2351 } 2351 }
2352 new_map->set_unused_property_fields(unused_property_fields); 2352 new_map->set_unused_property_fields(unused_property_fields);
2353 } else if (details.attributes() != attributes) {
2354 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate),
2355 details.field_index(), attributes,
2356 Representation::Tagged());
2357 descriptors->Replace(modify_index, &d);
2353 } 2358 }
2354 2359
2355 if (FLAG_trace_generalization) { 2360 if (FLAG_trace_generalization) {
2356 HeapType* field_type = (details.type() == FIELD) 2361 HeapType* field_type = (details.type() == FIELD)
2357 ? map->instance_descriptors()->GetFieldType(modify_index) 2362 ? map->instance_descriptors()->GetFieldType(modify_index)
2358 : NULL; 2363 : NULL;
2359 map->PrintGeneralization(stdout, reason, modify_index, 2364 map->PrintGeneralization(stdout, reason, modify_index,
2360 new_map->NumberOfOwnDescriptors(), 2365 new_map->NumberOfOwnDescriptors(),
2361 new_map->NumberOfOwnDescriptors(), 2366 new_map->NumberOfOwnDescriptors(),
2362 details.type() == CONSTANT && store_mode == FORCE_FIELD, 2367 details.type() == CONSTANT && store_mode == FORCE_FIELD,
(...skipping 14632 matching lines...) Expand 10 before | Expand all | Expand 10 after
16995 #define ERROR_MESSAGES_TEXTS(C, T) T, 17000 #define ERROR_MESSAGES_TEXTS(C, T) T,
16996 static const char* error_messages_[] = { 17001 static const char* error_messages_[] = {
16997 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17002 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16998 }; 17003 };
16999 #undef ERROR_MESSAGES_TEXTS 17004 #undef ERROR_MESSAGES_TEXTS
17000 return error_messages_[reason]; 17005 return error_messages_[reason];
17001 } 17006 }
17002 17007
17003 17008
17004 } } // namespace v8::internal 17009 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698