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

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

Issue 2837283004: PPC/s390: [stubs] Drop CallApiCallbackStub::call_data_undefined optimization. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | src/ic/s390/handler-compiler-s390.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_PPC 5 #if V8_TARGET_ARCH_PPC
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 __ LoadP(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); 209 __ LoadP(holder, FieldMemOperand(holder, Map::kPrototypeOffset));
210 } 210 }
211 break; 211 break;
212 case CallOptimization::kHolderNotFound: 212 case CallOptimization::kHolderNotFound:
213 UNREACHABLE(); 213 UNREACHABLE();
214 break; 214 break;
215 } 215 }
216 216
217 Isolate* isolate = masm->isolate(); 217 Isolate* isolate = masm->isolate();
218 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 218 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
219 bool call_data_undefined = false;
220 // Put call data in place. 219 // Put call data in place.
221 if (api_call_info->data()->IsUndefined(isolate)) { 220 if (api_call_info->data()->IsUndefined(isolate)) {
222 call_data_undefined = true;
223 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); 221 __ LoadRoot(data, Heap::kUndefinedValueRootIndex);
224 } else { 222 } else {
225 if (optimization.is_constant_call()) { 223 if (optimization.is_constant_call()) {
226 __ LoadP(data, 224 __ LoadP(data,
227 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); 225 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset));
228 __ LoadP(data, 226 __ LoadP(data,
229 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); 227 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset));
230 __ LoadP(data, 228 __ LoadP(data,
231 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); 229 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset));
232 } else { 230 } else {
233 __ LoadP(data, 231 __ LoadP(data,
234 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); 232 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset));
235 } 233 }
236 __ LoadP(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); 234 __ LoadP(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
237 } 235 }
238 236
239 // Put api_function_address in place. 237 // Put api_function_address in place.
240 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 238 Address function_address = v8::ToCData<Address>(api_call_info->callback());
241 ApiFunction fun(function_address); 239 ApiFunction fun(function_address);
242 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 240 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
243 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 241 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
244 __ mov(api_function_address, Operand(ref)); 242 __ mov(api_function_address, Operand(ref));
245 243
246 // Jump to stub. 244 // Jump to stub.
247 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, 245 CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call());
248 !optimization.is_constant_call());
249 __ TailCallStub(&stub); 246 __ TailCallStub(&stub);
250 } 247 }
251 248
252 #undef __ 249 #undef __
253 #define __ ACCESS_MASM(masm()) 250 #define __ ACCESS_MASM(masm())
254 251
255 252
256 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 253 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
257 Handle<Name> name) { 254 Handle<Name> name) {
258 if (!label->is_unused()) { 255 if (!label->is_unused()) {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 Register NamedStoreHandlerCompiler::value() { 425 Register NamedStoreHandlerCompiler::value() {
429 return StoreDescriptor::ValueRegister(); 426 return StoreDescriptor::ValueRegister();
430 } 427 }
431 428
432 429
433 #undef __ 430 #undef __
434 } // namespace internal 431 } // namespace internal
435 } // namespace v8 432 } // namespace v8
436 433
437 #endif // V8_TARGET_ARCH_ARM 434 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ic/s390/handler-compiler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698