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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 203173003: Array constructor expects AllocationSite or undefined as feedback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 9 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/code-stubs-a64.cc ('k') | src/arm/builtins-arm.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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 434 }
435 435
436 436
437 void LCodeGen::DoCallNew(LCallNew* instr) { 437 void LCodeGen::DoCallNew(LCallNew* instr) {
438 ASSERT(ToRegister(instr->context()).is(cp)); 438 ASSERT(ToRegister(instr->context()).is(cp));
439 ASSERT(instr->IsMarkedAsCall()); 439 ASSERT(instr->IsMarkedAsCall());
440 ASSERT(ToRegister(instr->constructor()).is(x1)); 440 ASSERT(ToRegister(instr->constructor()).is(x1));
441 441
442 __ Mov(x0, instr->arity()); 442 __ Mov(x0, instr->arity());
443 // No cell in x2 for construct type feedback in optimized code. 443 // No cell in x2 for construct type feedback in optimized code.
444 Handle<Object> megamorphic_symbol = 444 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
445 TypeFeedbackInfo::MegamorphicSentinel(isolate());
446 __ Mov(x2, Operand(megamorphic_symbol));
447 445
448 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); 446 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
449 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 447 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
450 448
451 ASSERT(ToRegister(instr->result()).is(x0)); 449 ASSERT(ToRegister(instr->result()).is(x0));
452 } 450 }
453 451
454 452
455 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 453 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
456 ASSERT(instr->IsMarkedAsCall()); 454 ASSERT(instr->IsMarkedAsCall());
457 ASSERT(ToRegister(instr->context()).is(cp)); 455 ASSERT(ToRegister(instr->context()).is(cp));
458 ASSERT(ToRegister(instr->constructor()).is(x1)); 456 ASSERT(ToRegister(instr->constructor()).is(x1));
459 457
460 __ Mov(x0, Operand(instr->arity())); 458 __ Mov(x0, Operand(instr->arity()));
461 __ Mov(x2, Operand(TypeFeedbackInfo::MegamorphicSentinel(isolate()))); 459 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex);
462 460
463 ElementsKind kind = instr->hydrogen()->elements_kind(); 461 ElementsKind kind = instr->hydrogen()->elements_kind();
464 AllocationSiteOverrideMode override_mode = 462 AllocationSiteOverrideMode override_mode =
465 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 463 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
466 ? DISABLE_ALLOCATION_SITES 464 ? DISABLE_ALLOCATION_SITES
467 : DONT_OVERRIDE; 465 : DONT_OVERRIDE;
468 466
469 if (instr->arity() == 0) { 467 if (instr->arity() == 0) {
470 ArrayNoArgumentConstructorStub stub(kind, override_mode); 468 ArrayNoArgumentConstructorStub stub(kind, override_mode);
471 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 469 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 __ Bind(&out_of_object); 5834 __ Bind(&out_of_object);
5837 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5835 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5838 // Index is equal to negated out of object property index plus 1. 5836 // Index is equal to negated out of object property index plus 1.
5839 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5837 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5840 __ Ldr(result, FieldMemOperand(result, 5838 __ Ldr(result, FieldMemOperand(result,
5841 FixedArray::kHeaderSize - kPointerSize)); 5839 FixedArray::kHeaderSize - kPointerSize));
5842 __ Bind(&done); 5840 __ Bind(&done);
5843 } 5841 }
5844 5842
5845 } } // namespace v8::internal 5843 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/code-stubs-a64.cc ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698