| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 6337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6348 dependency); | 6348 dependency); |
| 6349 if (dependency) { | 6349 if (dependency) { |
| 6350 checked_object->ClearDependsOnFlag(kElementsKind); | 6350 checked_object->ClearDependsOnFlag(kElementsKind); |
| 6351 } | 6351 } |
| 6352 | 6352 |
| 6353 if (access_type == STORE && map->prototype()->IsJSObject()) { | 6353 if (access_type == STORE && map->prototype()->IsJSObject()) { |
| 6354 // monomorphic stores need a prototype chain check because shape | 6354 // monomorphic stores need a prototype chain check because shape |
| 6355 // changes could allow callbacks on elements in the chain that | 6355 // changes could allow callbacks on elements in the chain that |
| 6356 // aren't compatible with monomorphic keyed stores. | 6356 // aren't compatible with monomorphic keyed stores. |
| 6357 Handle<JSObject> prototype(JSObject::cast(map->prototype())); | 6357 Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
| 6358 Object* holder = map->prototype(); | 6358 Handle<Object> holder(map->prototype(), isolate()); |
| 6359 while (holder->GetPrototype(isolate())->IsJSObject()) { | 6359 while (Object::GetPrototype(isolate(), holder)->IsJSObject()) { |
| 6360 holder = holder->GetPrototype(isolate()); | 6360 holder = Object::GetPrototype(isolate(), holder); |
| 6361 } | 6361 } |
| 6362 ASSERT(holder->GetPrototype(isolate())->IsNull()); | 6362 ASSERT(Object::GetPrototype(isolate(), holder)->IsNull()); |
| 6363 | 6363 |
| 6364 BuildCheckPrototypeMaps(prototype, | 6364 BuildCheckPrototypeMaps(prototype, |
| 6365 Handle<JSObject>(JSObject::cast(holder))); | 6365 Handle<JSObject>(JSObject::cast(*holder))); |
| 6366 } | 6366 } |
| 6367 | 6367 |
| 6368 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map); | 6368 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map); |
| 6369 return BuildUncheckedMonomorphicElementAccess( | 6369 return BuildUncheckedMonomorphicElementAccess( |
| 6370 checked_object, key, val, | 6370 checked_object, key, val, |
| 6371 map->instance_type() == JS_ARRAY_TYPE, | 6371 map->instance_type() == JS_ARRAY_TYPE, |
| 6372 map->elements_kind(), access_type, | 6372 map->elements_kind(), access_type, |
| 6373 load_mode, store_mode); | 6373 load_mode, store_mode); |
| 6374 } | 6374 } |
| 6375 | 6375 |
| (...skipping 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11601 if (ShouldProduceTraceOutput()) { | 11601 if (ShouldProduceTraceOutput()) { |
| 11602 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11602 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 11603 } | 11603 } |
| 11604 | 11604 |
| 11605 #ifdef DEBUG | 11605 #ifdef DEBUG |
| 11606 graph_->Verify(false); // No full verify. | 11606 graph_->Verify(false); // No full verify. |
| 11607 #endif | 11607 #endif |
| 11608 } | 11608 } |
| 11609 | 11609 |
| 11610 } } // namespace v8::internal | 11610 } } // namespace v8::internal |
| OLD | NEW |