| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 __ bind(&miss); | 2032 __ bind(&miss); |
| 2033 __ DecrementCounter(&Counters::keyed_store_field, 1); | 2033 __ DecrementCounter(&Counters::keyed_store_field, 1); |
| 2034 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); | 2034 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); |
| 2035 __ Jump(ic, RelocInfo::CODE_TARGET); | 2035 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 2036 | 2036 |
| 2037 // Return the generated code. | 2037 // Return the generated code. |
| 2038 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); | 2038 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); |
| 2039 } | 2039 } |
| 2040 | 2040 |
| 2041 | 2041 |
| 2042 // TODO(1241006): Avoid having lazy compile stubs specialized by the | |
| 2043 // number of arguments. It is not needed anymore. | |
| 2044 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) { | |
| 2045 // Enter an internal frame. | |
| 2046 __ EnterInternalFrame(); | |
| 2047 | |
| 2048 // Push a copy of the function onto the stack. | |
| 2049 __ push(rdi); | |
| 2050 | |
| 2051 __ push(rdi); // function is also the parameter to the runtime call | |
| 2052 __ CallRuntime(Runtime::kLazyCompile, 1); | |
| 2053 __ pop(rdi); | |
| 2054 | |
| 2055 // Tear down temporary frame. | |
| 2056 __ LeaveInternalFrame(); | |
| 2057 | |
| 2058 // Do a tail-call of the compiled function. | |
| 2059 __ lea(rcx, FieldOperand(rax, Code::kHeaderSize)); | |
| 2060 __ jmp(rcx); | |
| 2061 | |
| 2062 return GetCodeWithFlags(flags, "LazyCompileStub"); | |
| 2063 } | |
| 2064 | |
| 2065 | |
| 2066 void StubCompiler::GenerateLoadInterceptor(JSObject* object, | 2042 void StubCompiler::GenerateLoadInterceptor(JSObject* object, |
| 2067 JSObject* interceptor_holder, | 2043 JSObject* interceptor_holder, |
| 2068 LookupResult* lookup, | 2044 LookupResult* lookup, |
| 2069 Register receiver, | 2045 Register receiver, |
| 2070 Register name_reg, | 2046 Register name_reg, |
| 2071 Register scratch1, | 2047 Register scratch1, |
| 2072 Register scratch2, | 2048 Register scratch2, |
| 2073 Register scratch3, | 2049 Register scratch3, |
| 2074 String* name, | 2050 String* name, |
| 2075 Label* miss) { | 2051 Label* miss) { |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2614 // Return the generated code. | 2590 // Return the generated code. |
| 2615 return GetCode(); | 2591 return GetCode(); |
| 2616 } | 2592 } |
| 2617 | 2593 |
| 2618 | 2594 |
| 2619 #undef __ | 2595 #undef __ |
| 2620 | 2596 |
| 2621 } } // namespace v8::internal | 2597 } } // namespace v8::internal |
| 2622 | 2598 |
| 2623 #endif // V8_TARGET_ARCH_X64 | 2599 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |