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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 181223002: Merged r19440 into 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
Patch Set: Created 6 years, 9 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/hydrogen.cc ('k') | src/ic.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 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after
4289 4289
4290 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, 4290 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset,
4291 Representation representation) { 4291 Representation representation) {
4292 ASSERT(offset >= 0); 4292 ASSERT(offset >= 0);
4293 return HObjectAccess(kBackingStore, offset, representation); 4293 return HObjectAccess(kBackingStore, offset, representation);
4294 } 4294 }
4295 4295
4296 4296
4297 HObjectAccess HObjectAccess::ForField(Handle<Map> map, 4297 HObjectAccess HObjectAccess::ForField(Handle<Map> map,
4298 LookupResult *lookup, Handle<String> name) { 4298 LookupResult *lookup, Handle<String> name) {
4299 ASSERT(lookup->IsField() || lookup->IsTransitionToField(*map)); 4299 ASSERT(lookup->IsField() || lookup->IsTransitionToField());
4300 int index; 4300 int index;
4301 Representation representation; 4301 Representation representation;
4302 if (lookup->IsField()) { 4302 if (lookup->IsField()) {
4303 index = lookup->GetLocalFieldIndexFromMap(*map); 4303 index = lookup->GetLocalFieldIndexFromMap(*map);
4304 representation = lookup->representation(); 4304 representation = lookup->representation();
4305 } else { 4305 } else {
4306 Map* transition = lookup->GetTransitionMapFromMap(*map); 4306 Map* transition = lookup->GetTransitionTarget();
4307 int descriptor = transition->LastAdded(); 4307 int descriptor = transition->LastAdded();
4308 index = transition->instance_descriptors()->GetFieldIndex(descriptor) - 4308 index = transition->instance_descriptors()->GetFieldIndex(descriptor) -
4309 map->inobject_properties(); 4309 map->inobject_properties();
4310 PropertyDetails details = 4310 PropertyDetails details =
4311 transition->instance_descriptors()->GetDetails(descriptor); 4311 transition->instance_descriptors()->GetDetails(descriptor);
4312 representation = details.representation(); 4312 representation = details.representation();
4313 } 4313 }
4314 if (index < 0) { 4314 if (index < 0) {
4315 // Negative property indices are in-object properties, indexed 4315 // Negative property indices are in-object properties, indexed
4316 // from the end of the fixed part of the object. 4316 // from the end of the fixed part of the object.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 break; 4405 break;
4406 case kExternalMemory: 4406 case kExternalMemory:
4407 stream->Add("[external-memory]"); 4407 stream->Add("[external-memory]");
4408 break; 4408 break;
4409 } 4409 }
4410 4410
4411 stream->Add("@%d", offset()); 4411 stream->Add("@%d", offset());
4412 } 4412 }
4413 4413
4414 } } // namespace v8::internal 4414 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698