OLD | NEW |
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 4327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4338 | 4338 |
4339 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, | 4339 HObjectAccess HObjectAccess::ForBackingStoreOffset(int offset, |
4340 Representation representation) { | 4340 Representation representation) { |
4341 ASSERT(offset >= 0); | 4341 ASSERT(offset >= 0); |
4342 return HObjectAccess(kBackingStore, offset, representation, | 4342 return HObjectAccess(kBackingStore, offset, representation, |
4343 Handle<String>::null(), false, false); | 4343 Handle<String>::null(), false, false); |
4344 } | 4344 } |
4345 | 4345 |
4346 | 4346 |
4347 HObjectAccess HObjectAccess::ForField(Handle<Map> map, | 4347 HObjectAccess HObjectAccess::ForField(Handle<Map> map, |
4348 LookupResult *lookup, Handle<String> name) { | 4348 LookupResult* lookup, |
| 4349 Handle<String> name) { |
4349 ASSERT(lookup->IsField() || lookup->IsTransitionToField(*map)); | 4350 ASSERT(lookup->IsField() || lookup->IsTransitionToField(*map)); |
4350 int index; | 4351 int index; |
4351 Representation representation; | 4352 Representation representation; |
4352 if (lookup->IsField()) { | 4353 if (lookup->IsField()) { |
4353 index = lookup->GetLocalFieldIndexFromMap(*map); | 4354 index = lookup->GetLocalFieldIndexFromMap(*map); |
4354 representation = lookup->representation(); | 4355 representation = lookup->representation(); |
4355 } else { | 4356 } else { |
4356 Map* transition = lookup->GetTransitionMapFromMap(*map); | 4357 Map* transition = lookup->GetTransitionMapFromMap(*map); |
4357 int descriptor = transition->LastAdded(); | 4358 int descriptor = transition->LastAdded(); |
4358 index = transition->instance_descriptors()->GetFieldIndex(descriptor) - | 4359 index = transition->instance_descriptors()->GetFieldIndex(descriptor) - |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4460 break; | 4461 break; |
4461 case kExternalMemory: | 4462 case kExternalMemory: |
4462 stream->Add("[external-memory]"); | 4463 stream->Add("[external-memory]"); |
4463 break; | 4464 break; |
4464 } | 4465 } |
4465 | 4466 |
4466 stream->Add("@%d", offset()); | 4467 stream->Add("@%d", offset()); |
4467 } | 4468 } |
4468 | 4469 |
4469 } } // namespace v8::internal | 4470 } } // namespace v8::internal |
OLD | NEW |