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

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

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 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 | Annotate | Revision Log
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 __ Ret(); 278 __ Ret();
279 } 279 }
280 280
281 281
282 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 282 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
283 MacroAssembler* masm) { 283 MacroAssembler* masm) {
284 // The return address is in lr. 284 // The return address is in lr.
285 Label slow, miss; 285 Label slow, miss;
286 286
287 Register result = x0; 287 Register result = x0;
288 Register key = LoadConvention::NameRegister(); 288 Register key = LoadDescriptor::NameRegister();
289 Register receiver = LoadConvention::ReceiverRegister(); 289 Register receiver = LoadDescriptor::ReceiverRegister();
290 DCHECK(receiver.is(x1)); 290 DCHECK(receiver.is(x1));
291 DCHECK(key.is(x2)); 291 DCHECK(key.is(x2));
292 292
293 __ JumpIfNotSmi(key, &miss); 293 __ JumpIfNotSmi(key, &miss);
294 __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset)); 294 __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset));
295 __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6); 295 __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6);
296 __ Ret(); 296 __ Ret();
297 297
298 __ Bind(&slow); 298 __ Bind(&slow);
299 __ IncrementCounter( 299 __ IncrementCounter(
300 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, x4, x3); 300 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, x4, x3);
301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); 301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
302 302
303 // Miss case, call the runtime. 303 // Miss case, call the runtime.
304 __ Bind(&miss); 304 __ Bind(&miss);
305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
306 } 306 }
307 307
308 308
309 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 309 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
310 // Push receiver, name and value for runtime call. 310 // Push receiver, name and value for runtime call.
311 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 311 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
312 StoreConvention::ValueRegister()); 312 StoreDescriptor::ValueRegister());
313 313
314 // The slow case calls into the runtime to complete the store without causing 314 // The slow case calls into the runtime to complete the store without causing
315 // an IC miss that would otherwise cause a transition to the generic stub. 315 // an IC miss that would otherwise cause a transition to the generic stub.
316 ExternalReference ref = 316 ExternalReference ref =
317 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 317 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
318 __ TailCallExternalReference(ref, 3, 1); 318 __ TailCallExternalReference(ref, 3, 1);
319 } 319 }
320 320
321 321
322 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 322 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
323 ASM_LOCATION("ElementHandlerCompiler::GenerateStoreSlow"); 323 ASM_LOCATION("ElementHandlerCompiler::GenerateStoreSlow");
324 324
325 // Push receiver, key and value for runtime call. 325 // Push receiver, key and value for runtime call.
326 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 326 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
327 StoreConvention::ValueRegister()); 327 StoreDescriptor::ValueRegister());
328 328
329 // The slow case calls into the runtime to complete the store without causing 329 // The slow case calls into the runtime to complete the store without causing
330 // an IC miss that would otherwise cause a transition to the generic stub. 330 // an IC miss that would otherwise cause a transition to the generic stub.
331 ExternalReference ref = 331 ExternalReference ref =
332 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); 332 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
333 __ TailCallExternalReference(ref, 3, 1); 333 __ TailCallExternalReference(ref, 3, 1);
334 } 334 }
335 335
336 336
337 #undef __ 337 #undef __
338 #define __ ACCESS_MASM(masm()) 338 #define __ ACCESS_MASM(masm())
339 339
340 340
341 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 341 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
342 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 342 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
343 Label miss; 343 Label miss;
344 FrontendHeader(receiver(), name, &miss); 344 FrontendHeader(receiver(), name, &miss);
345 345
346 // Get the value from the cell. 346 // Get the value from the cell.
347 Register result = StoreConvention::ValueRegister(); 347 Register result = StoreDescriptor::ValueRegister();
348 __ Mov(result, Operand(cell)); 348 __ Mov(result, Operand(cell));
349 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 349 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
350 350
351 // Check for deleted property if property can actually be deleted. 351 // Check for deleted property if property can actually be deleted.
352 if (is_configurable) { 352 if (is_configurable) {
353 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss); 353 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss);
354 } 354 }
355 355
356 Counters* counters = isolate()->counters(); 356 Counters* counters = isolate()->counters();
357 __ IncrementCounter(counters->named_load_global_stub(), 1, x1, x3); 357 __ IncrementCounter(counters->named_load_global_stub(), 1, x1, x3);
(...skipping 18 matching lines...) Expand all
376 ExternalReference store_ic_property = ExternalReference( 376 ExternalReference store_ic_property = ExternalReference(
377 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 377 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
378 __ TailCallExternalReference(store_ic_property, 3, 1); 378 __ TailCallExternalReference(store_ic_property, 3, 1);
379 379
380 // Return the generated code. 380 // Return the generated code.
381 return GetCode(kind(), Code::FAST, name); 381 return GetCode(kind(), Code::FAST, name);
382 } 382 }
383 383
384 384
385 Register NamedStoreHandlerCompiler::value() { 385 Register NamedStoreHandlerCompiler::value() {
386 return StoreConvention::ValueRegister(); 386 return StoreDescriptor::ValueRegister();
387 } 387 }
388 388
389 389
390 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 390 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
391 Handle<Name> name) { 391 Handle<Name> name) {
392 if (!label->is_unused()) { 392 if (!label->is_unused()) {
393 __ Bind(label); 393 __ Bind(label);
394 __ Mov(this->name(), Operand(name)); 394 __ Mov(this->name(), Operand(name));
395 } 395 }
396 } 396 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 // Return the generated code. 865 // Return the generated code.
866 return GetCode(kind(), Code::FAST, name); 866 return GetCode(kind(), Code::FAST, name);
867 } 867 }
868 868
869 869
870 #undef __ 870 #undef __
871 } 871 }
872 } // namespace v8::internal 872 } // namespace v8::internal
873 873
874 #endif // V8_TARGET_ARCH_IA32 874 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698