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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 return DoGenerateCode(isolate, this); | 607 return DoGenerateCode(isolate, this); |
608 } | 608 } |
609 | 609 |
610 | 610 |
611 template<> | 611 template<> |
612 HValue* CodeStubGraphBuilder<KeyedArrayCallStub>::BuildCodeStub() { | 612 HValue* CodeStubGraphBuilder<KeyedArrayCallStub>::BuildCodeStub() { |
613 int argc = casted_stub()->argc() + 1; | 613 int argc = casted_stub()->argc() + 1; |
614 info()->set_parameter_count(argc); | 614 info()->set_parameter_count(argc); |
615 | 615 |
616 HValue* receiver = Add<HParameter>(1); | 616 HValue* receiver = Add<HParameter>(1); |
| 617 BuildCheckHeapObject(receiver); |
617 | 618 |
618 // Load the expected initial array map from the context. | 619 // Load the expected initial array map from the context. |
619 JSArrayBuilder array_builder(this, casted_stub()->elements_kind()); | 620 JSArrayBuilder array_builder(this, casted_stub()->elements_kind()); |
620 HValue* map = array_builder.EmitMapCode(); | 621 HValue* map = array_builder.EmitMapCode(); |
621 | 622 |
622 HValue* checked_receiver = Add<HCheckMapValue>(receiver, map); | 623 HValue* checked_receiver = Add<HCheckMapValue>(receiver, map); |
623 | 624 |
624 HValue* function = BuildUncheckedMonomorphicElementAccess( | 625 HValue* function = BuildUncheckedMonomorphicElementAccess( |
625 checked_receiver, GetParameter(0), | 626 checked_receiver, GetParameter(0), |
626 NULL, true, casted_stub()->elements_kind(), | 627 NULL, true, casted_stub()->elements_kind(), |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 return BuildUncheckedDictionaryElementLoad(receiver, key); | 1331 return BuildUncheckedDictionaryElementLoad(receiver, key); |
1331 } | 1332 } |
1332 | 1333 |
1333 | 1334 |
1334 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { | 1335 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { |
1335 return DoGenerateCode(isolate, this); | 1336 return DoGenerateCode(isolate, this); |
1336 } | 1337 } |
1337 | 1338 |
1338 | 1339 |
1339 } } // namespace v8::internal | 1340 } } // namespace v8::internal |
OLD | NEW |