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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 index.translate(holder), Representation::Tagged()); | 1586 index.translate(holder), Representation::Tagged()); |
1587 GenerateJumpFunction(object, rdi, &miss); | 1587 GenerateJumpFunction(object, rdi, &miss); |
1588 | 1588 |
1589 HandlerFrontendFooter(&miss); | 1589 HandlerFrontendFooter(&miss); |
1590 | 1590 |
1591 // Return the generated code. | 1591 // Return the generated code. |
1592 return GetCode(Code::FAST, name); | 1592 return GetCode(Code::FAST, name); |
1593 } | 1593 } |
1594 | 1594 |
1595 | 1595 |
1596 Handle<Code> CallStubCompiler::CompileArrayCodeCall( | |
1597 Handle<Object> object, | |
1598 Handle<JSObject> holder, | |
1599 Handle<Cell> cell, | |
1600 Handle<JSFunction> function, | |
1601 Handle<String> name, | |
1602 Code::StubType type) { | |
1603 Label miss; | |
1604 | |
1605 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | |
1606 if (!cell.is_null()) { | |
1607 ASSERT(cell->value() == *function); | |
1608 GenerateLoadFunctionFromCell(cell, function, &miss); | |
1609 } | |
1610 | |
1611 Handle<AllocationSite> site = isolate()->factory()->NewAllocationSite(); | |
1612 site->SetElementsKind(GetInitialFastElementsKind()); | |
1613 Handle<Cell> site_feedback_cell = isolate()->factory()->NewCell(site); | |
1614 const int argc = arguments().immediate(); | |
1615 __ movq(rax, Immediate(argc)); | |
1616 __ Move(rbx, site_feedback_cell); | |
1617 __ Move(rdi, function); | |
1618 | |
1619 ArrayConstructorStub stub(isolate()); | |
1620 __ TailCallStub(&stub); | |
1621 | |
1622 HandlerFrontendFooter(&miss); | |
1623 | |
1624 // Return the generated code. | |
1625 return GetCode(type, name); | |
1626 } | |
1627 | |
1628 | |
1629 Handle<Code> CallStubCompiler::CompileArrayPushCall( | 1596 Handle<Code> CallStubCompiler::CompileArrayPushCall( |
1630 Handle<Object> object, | 1597 Handle<Object> object, |
1631 Handle<JSObject> holder, | 1598 Handle<JSObject> holder, |
1632 Handle<Cell> cell, | 1599 Handle<Cell> cell, |
1633 Handle<JSFunction> function, | 1600 Handle<JSFunction> function, |
1634 Handle<String> name, | 1601 Handle<String> name, |
1635 Code::StubType type) { | 1602 Code::StubType type) { |
1636 // If object is not an array or is observed or sealed, bail out to regular | 1603 // If object is not an array or is observed or sealed, bail out to regular |
1637 // call. | 1604 // call. |
1638 if (!object->IsJSArray() || | 1605 if (!object->IsJSArray() || |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2906 // ----------------------------------- | 2873 // ----------------------------------- |
2907 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2874 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2908 } | 2875 } |
2909 | 2876 |
2910 | 2877 |
2911 #undef __ | 2878 #undef __ |
2912 | 2879 |
2913 } } // namespace v8::internal | 2880 } } // namespace v8::internal |
2914 | 2881 |
2915 #endif // V8_TARGET_ARCH_X64 | 2882 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |