Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/ic/arm64/handler-compiler-arm64.cc

Issue 1609233002: Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make GCMole happy again. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/call-optimization.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 Isolate* isolate = masm->isolate(); 193 Isolate* isolate = masm->isolate();
194 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 194 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
195 bool call_data_undefined = false; 195 bool call_data_undefined = false;
196 // Put call data in place. 196 // Put call data in place.
197 if (api_call_info->data()->IsUndefined()) { 197 if (api_call_info->data()->IsUndefined()) {
198 call_data_undefined = true; 198 call_data_undefined = true;
199 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 199 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
200 } else { 200 } else {
201 __ Ldr(data, 201 if (optimization.is_constant_call()) {
202 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 202 __ Ldr(data,
203 __ Ldr(data, 203 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
204 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 204 __ Ldr(data,
205 __ Ldr(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 205 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
206 __ Ldr(data,
207 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
208 } else {
209 __ Ldr(data,
210 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
211 }
206 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 212 __ Ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
207 } 213 }
208 214
209 if (api_call_info->fast_handler()->IsCode()) { 215 if (api_call_info->fast_handler()->IsCode()) {
210 // Just tail call into the fast handler if present. 216 // Just tail call into the fast handler if present.
211 __ Jump(handle(Code::cast(api_call_info->fast_handler())), 217 __ Jump(handle(Code::cast(api_call_info->fast_handler())),
212 RelocInfo::CODE_TARGET); 218 RelocInfo::CODE_TARGET);
213 return; 219 return;
214 } 220 }
215 221
216 // Put api_function_address in place. 222 // Put api_function_address in place.
217 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 223 Address function_address = v8::ToCData<Address>(api_call_info->callback());
218 ApiFunction fun(function_address); 224 ApiFunction fun(function_address);
219 ExternalReference ref = ExternalReference( 225 ExternalReference ref = ExternalReference(
220 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate()); 226 &fun, ExternalReference::DIRECT_API_CALL, masm->isolate());
221 __ Mov(api_function_address, ref); 227 __ Mov(api_function_address, ref);
222 228
223 // Jump to stub. 229 // Jump to stub.
224 CallApiAccessorStub stub(isolate, is_store, call_data_undefined); 230 CallApiAccessorStub stub(isolate, is_store, call_data_undefined,
231 !optimization.is_constant_call());
225 __ TailCallStub(&stub); 232 __ TailCallStub(&stub);
226 } 233 }
227 234
228 235
229 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( 236 void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
230 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 237 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
231 int accessor_index, int expected_arguments, Register scratch) { 238 int accessor_index, int expected_arguments, Register scratch) {
232 // ----------- S t a t e ------------- 239 // ----------- S t a t e -------------
233 // -- lr : return address 240 // -- lr : return address
234 // ----------------------------------- 241 // -----------------------------------
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 // Return the generated code. 792 // Return the generated code.
786 return GetCode(kind(), Code::FAST, name); 793 return GetCode(kind(), Code::FAST, name);
787 } 794 }
788 795
789 796
790 #undef __ 797 #undef __
791 } // namespace internal 798 } // namespace internal
792 } // namespace v8 799 } // namespace v8
793 800
794 #endif // V8_TARGET_ARCH_IA32 801 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/call-optimization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698