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

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

Issue 2838143003: [stubs] Drop CallApiCallbackStub::call_data_undefined optimization. (Closed)
Patch Set: Fix handler-compiler for remaining archs. Created 3 years, 8 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/mips64/handler-compiler-mips64.cc ('k') | src/mips/code-stubs-mips.cc » ('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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/api-arguments.h" 9 #include "src/api-arguments.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 __ movp(holder, FieldOperand(holder, Map::kPrototypeOffset)); 132 __ movp(holder, FieldOperand(holder, Map::kPrototypeOffset));
133 } 133 }
134 break; 134 break;
135 case CallOptimization::kHolderNotFound: 135 case CallOptimization::kHolderNotFound:
136 UNREACHABLE(); 136 UNREACHABLE();
137 break; 137 break;
138 } 138 }
139 139
140 Isolate* isolate = masm->isolate(); 140 Isolate* isolate = masm->isolate();
141 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 141 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
142 bool call_data_undefined = false;
143 // Put call data in place. 142 // Put call data in place.
144 if (api_call_info->data()->IsUndefined(isolate)) { 143 if (api_call_info->data()->IsUndefined(isolate)) {
145 call_data_undefined = true;
146 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 144 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
147 } else { 145 } else {
148 if (optimization.is_constant_call()) { 146 if (optimization.is_constant_call()) {
149 __ movp(data, 147 __ movp(data,
150 FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 148 FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset));
151 __ movp(data, 149 __ movp(data,
152 FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 150 FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset));
153 __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 151 __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset));
154 } else { 152 } else {
155 __ movp(data, 153 __ movp(data,
156 FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); 154 FieldOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
157 } 155 }
158 __ movp(data, FieldOperand(data, CallHandlerInfo::kDataOffset)); 156 __ movp(data, FieldOperand(data, CallHandlerInfo::kDataOffset));
159 } 157 }
160 158
161 // Put api_function_address in place. 159 // Put api_function_address in place.
162 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 160 Address function_address = v8::ToCData<Address>(api_call_info->callback());
163 __ Move(api_function_address, function_address, 161 __ Move(api_function_address, function_address,
164 RelocInfo::EXTERNAL_REFERENCE); 162 RelocInfo::EXTERNAL_REFERENCE);
165 163
166 // Jump to stub. 164 // Jump to stub.
167 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, 165 CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call());
168 !optimization.is_constant_call());
169 __ TailCallStub(&stub); 166 __ TailCallStub(&stub);
170 } 167 }
171 168
172 169
173 void PropertyHandlerCompiler::GenerateCheckPropertyCell( 170 void PropertyHandlerCompiler::GenerateCheckPropertyCell(
174 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, 171 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name,
175 Register scratch, Label* miss) { 172 Register scratch, Label* miss) {
176 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell( 173 Handle<PropertyCell> cell = JSGlobalObject::EnsureEmptyPropertyCell(
177 global, name, PropertyCellType::kInvalidated); 174 global, name, PropertyCellType::kInvalidated);
178 Isolate* isolate = masm->isolate(); 175 Isolate* isolate = masm->isolate();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 Register NamedStoreHandlerCompiler::value() { 417 Register NamedStoreHandlerCompiler::value() {
421 return StoreDescriptor::ValueRegister(); 418 return StoreDescriptor::ValueRegister();
422 } 419 }
423 420
424 421
425 #undef __ 422 #undef __
426 } // namespace internal 423 } // namespace internal
427 } // namespace v8 424 } // namespace v8
428 425
429 #endif // V8_TARGET_ARCH_X64 426 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698