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

Side by Side Diff: src/a64/stub-cache-a64.cc

Issue 131363008: A64: Synchronize with r15922. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | src/api.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 // We don't need scratch3. 473 // We don't need scratch3.
474 scratch3 = NoReg; 474 scratch3 = NoReg;
475 475
476 int descriptor = transition->LastAdded(); 476 int descriptor = transition->LastAdded();
477 DescriptorArray* descriptors = transition->instance_descriptors(); 477 DescriptorArray* descriptors = transition->instance_descriptors();
478 PropertyDetails details = descriptors->GetDetails(descriptor); 478 PropertyDetails details = descriptors->GetDetails(descriptor);
479 Representation representation = details.representation(); 479 Representation representation = details.representation();
480 ASSERT(!representation.IsNone()); 480 ASSERT(!representation.IsNone());
481 481
482 if (details.type() == CONSTANT_FUNCTION) { 482 if (details.type() == CONSTANT) {
483 Handle<HeapObject> constant( 483 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
484 HeapObject::cast(descriptors->GetValue(descriptor))); 484 __ LoadObject(scratch1, constant);
485 __ LoadHeapObject(scratch1, constant);
486 __ Cmp(value_reg, scratch1); 485 __ Cmp(value_reg, scratch1);
487 __ B(ne, miss_label); 486 __ B(ne, miss_label);
488 } else if (FLAG_track_fields && representation.IsSmi()) { 487 } else if (FLAG_track_fields && representation.IsSmi()) {
489 __ JumpIfNotSmi(value_reg, miss_label); 488 __ JumpIfNotSmi(value_reg, miss_label);
490 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 489 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
491 __ JumpIfSmi(value_reg, miss_label); 490 __ JumpIfSmi(value_reg, miss_label);
492 } else if (FLAG_track_double_fields && representation.IsDouble()) { 491 } else if (FLAG_track_double_fields && representation.IsDouble()) {
493 Label do_store, heap_number; 492 Label do_store, heap_number;
494 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2); 493 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2);
495 494
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // Update the write barrier for the map field. 532 // Update the write barrier for the map field.
534 __ RecordWriteField(receiver_reg, 533 __ RecordWriteField(receiver_reg,
535 HeapObject::kMapOffset, 534 HeapObject::kMapOffset,
536 scratch1, 535 scratch1,
537 scratch2, 536 scratch2,
538 kLRHasNotBeenSaved, 537 kLRHasNotBeenSaved,
539 kDontSaveFPRegs, 538 kDontSaveFPRegs,
540 OMIT_REMEMBERED_SET, 539 OMIT_REMEMBERED_SET,
541 OMIT_SMI_CHECK); 540 OMIT_SMI_CHECK);
542 541
543 if (details.type() == CONSTANT_FUNCTION) { 542 if (details.type() == CONSTANT) {
544 ASSERT(value_reg.is(x0)); 543 ASSERT(value_reg.is(x0));
545 __ Ret(); 544 __ Ret();
546 return; 545 return;
547 } 546 }
548 547
549 int index = transition->instance_descriptors()->GetFieldIndex( 548 int index = transition->instance_descriptors()->GetFieldIndex(
550 transition->LastAdded()); 549 transition->LastAdded());
551 550
552 // Adjust for the number of properties stored in the object. Even in the 551 // Adjust for the number of properties stored in the object. Even in the
553 // face of a transition we can use the old map here because the size of the 552 // face of a transition we can use the old map here because the size of the
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 GenerateTailCall(masm(), stub.GetCode(isolate())); 1416 GenerateTailCall(masm(), stub.GetCode(isolate()));
1418 } else { 1417 } else {
1419 KeyedLoadFieldStub stub(field.is_inobject(holder), 1418 KeyedLoadFieldStub stub(field.is_inobject(holder),
1420 field.translate(holder), 1419 field.translate(holder),
1421 representation); 1420 representation);
1422 GenerateTailCall(masm(), stub.GetCode(isolate())); 1421 GenerateTailCall(masm(), stub.GetCode(isolate()));
1423 } 1422 }
1424 } 1423 }
1425 1424
1426 1425
1427 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<JSFunction> value) { 1426 void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1428 // Return the constant value. 1427 // Return the constant value.
1429 __ LoadHeapObject(x0, value); 1428 __ LoadObject(x0, value);
1430 __ Ret(); 1429 __ Ret();
1431 } 1430 }
1432 1431
1433 1432
1434 void BaseLoadStubCompiler::GenerateLoadCallback( 1433 void BaseLoadStubCompiler::GenerateLoadCallback(
1435 Register reg, 1434 Register reg,
1436 Handle<ExecutableAccessorInfo> callback) { 1435 Handle<ExecutableAccessorInfo> callback) {
1437 // Build ExecutableAccessorInfo::args_ list on the stack and push property 1436 // Build ExecutableAccessorInfo::args_ list on the stack and push property
1438 // name below the exit frame to make GC aware of them and store pointers to 1437 // name below the exit frame to make GC aware of them and store pointers to
1439 // them. 1438 // them.
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 Handle<Code> CallStubCompiler::CompileCallConstant( 2751 Handle<Code> CallStubCompiler::CompileCallConstant(
2753 Handle<Object> object, 2752 Handle<Object> object,
2754 Handle<JSObject> holder, 2753 Handle<JSObject> holder,
2755 Handle<Name> name, 2754 Handle<Name> name,
2756 CheckType check, 2755 CheckType check,
2757 Handle<JSFunction> function) { 2756 Handle<JSFunction> function) {
2758 if (HasCustomCallGenerator(function)) { 2757 if (HasCustomCallGenerator(function)) {
2759 Handle<Code> code = CompileCustomCall(object, holder, 2758 Handle<Code> code = CompileCustomCall(object, holder,
2760 Handle<Cell>::null(), 2759 Handle<Cell>::null(),
2761 function, Handle<String>::cast(name), 2760 function, Handle<String>::cast(name),
2762 Code::CONSTANT_FUNCTION); 2761 Code::CONSTANT);
2763 // A null handle means bail out to the regular compiler code below. 2762 // A null handle means bail out to the regular compiler code below.
2764 if (!code.is_null()) return code; 2763 if (!code.is_null()) return code;
2765 } 2764 }
2766 2765
2767 Label success; 2766 Label success;
2768 2767
2769 CompileHandlerFrontend(object, holder, name, check, &success); 2768 CompileHandlerFrontend(object, holder, name, check, &success);
2770 __ Bind(&success); 2769 __ Bind(&success);
2771 CompileHandlerBackend(function); 2770 CompileHandlerBackend(function);
2772 2771
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 // ----------- S t a t e ------------- 3759 // ----------- S t a t e -------------
3761 3760
3762 GenerateStoreFastSmiOrDoubleElement(masm, is_js_array, FAST_DOUBLE_ELEMENTS, 3761 GenerateStoreFastSmiOrDoubleElement(masm, is_js_array, FAST_DOUBLE_ELEMENTS,
3763 store_mode, true); 3762 store_mode, true);
3764 } 3763 }
3765 3764
3766 3765
3767 } } // namespace v8::internal 3766 } } // namespace v8::internal
3768 3767
3769 #endif // V8_TARGET_ARCH_A64 3768 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698