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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 index.translate(holder), Representation::Tagged()); | 1564 index.translate(holder), Representation::Tagged()); |
1565 GenerateJumpFunction(object, r1, &miss); | 1565 GenerateJumpFunction(object, r1, &miss); |
1566 | 1566 |
1567 HandlerFrontendFooter(&miss); | 1567 HandlerFrontendFooter(&miss); |
1568 | 1568 |
1569 // Return the generated code. | 1569 // Return the generated code. |
1570 return GetCode(Code::FAST, name); | 1570 return GetCode(Code::FAST, name); |
1571 } | 1571 } |
1572 | 1572 |
1573 | 1573 |
1574 Handle<Code> CallStubCompiler::CompileArrayCodeCall( | |
1575 Handle<Object> object, | |
1576 Handle<JSObject> holder, | |
1577 Handle<Cell> cell, | |
1578 Handle<JSFunction> function, | |
1579 Handle<String> name, | |
1580 Code::StubType type) { | |
1581 Label miss; | |
1582 | |
1583 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | |
1584 if (!cell.is_null()) { | |
1585 ASSERT(cell->value() == *function); | |
1586 GenerateLoadFunctionFromCell(cell, function, &miss); | |
1587 } | |
1588 | |
1589 Handle<AllocationSite> site = isolate()->factory()->NewAllocationSite(); | |
1590 site->SetElementsKind(GetInitialFastElementsKind()); | |
1591 Handle<Cell> site_feedback_cell = isolate()->factory()->NewCell(site); | |
1592 const int argc = arguments().immediate(); | |
1593 __ mov(r0, Operand(argc)); | |
1594 __ mov(r2, Operand(site_feedback_cell)); | |
1595 __ mov(r1, Operand(function)); | |
1596 | |
1597 ArrayConstructorStub stub(isolate()); | |
1598 __ TailCallStub(&stub); | |
1599 | |
1600 HandlerFrontendFooter(&miss); | |
1601 | |
1602 // Return the generated code. | |
1603 return GetCode(type, name); | |
1604 } | |
1605 | |
1606 | |
1607 Handle<Code> CallStubCompiler::CompileArrayPushCall( | 1574 Handle<Code> CallStubCompiler::CompileArrayPushCall( |
1608 Handle<Object> object, | 1575 Handle<Object> object, |
1609 Handle<JSObject> holder, | 1576 Handle<JSObject> holder, |
1610 Handle<Cell> cell, | 1577 Handle<Cell> cell, |
1611 Handle<JSFunction> function, | 1578 Handle<JSFunction> function, |
1612 Handle<String> name, | 1579 Handle<String> name, |
1613 Code::StubType type) { | 1580 Code::StubType type) { |
1614 // If object is not an array or is observed or sealed, bail out to regular | 1581 // If object is not an array or is observed or sealed, bail out to regular |
1615 // call. | 1582 // call. |
1616 if (!object->IsJSArray() || | 1583 if (!object->IsJSArray() || |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2890 // ----------------------------------- | 2857 // ----------------------------------- |
2891 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2858 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2892 } | 2859 } |
2893 | 2860 |
2894 | 2861 |
2895 #undef __ | 2862 #undef __ |
2896 | 2863 |
2897 } } // namespace v8::internal | 2864 } } // namespace v8::internal |
2898 | 2865 |
2899 #endif // V8_TARGET_ARCH_ARM | 2866 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |