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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6458001: Port fix for duplicate AST ID for deoptimization to ARM and x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/x64/full-codegen-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 __ Push(cp, r2, r1, r0); 674 __ Push(cp, r2, r1, r0);
675 } 675 }
676 __ CallRuntime(Runtime::kDeclareContextSlot, 4); 676 __ CallRuntime(Runtime::kDeclareContextSlot, 4);
677 break; 677 break;
678 } 678 }
679 } 679 }
680 680
681 } else if (prop != NULL) { 681 } else if (prop != NULL) {
682 if (function != NULL || mode == Variable::CONST) { 682 if (function != NULL || mode == Variable::CONST) {
683 // We are declaring a function or constant that rewrites to a 683 // We are declaring a function or constant that rewrites to a
684 // property. Use (keyed) IC to set the initial value. 684 // property. Use (keyed) IC to set the initial value. We
685 VisitForStackValue(prop->obj()); 685 // cannot visit the rewrite because it's shared and we risk
686 // recording duplicate AST IDs for bailouts from optimized code.
687 ASSERT(prop->obj()->AsVariableProxy() != NULL);
688 { AccumulatorValueContext for_object(this);
689 EmitVariableLoad(prop->obj()->AsVariableProxy()->var());
690 }
686 if (function != NULL) { 691 if (function != NULL) {
687 VisitForStackValue(prop->key()); 692 __ push(r0);
688 VisitForAccumulatorValue(function); 693 VisitForAccumulatorValue(function);
689 __ pop(r1); // Key. 694 __ pop(r2);
690 } else { 695 } else {
691 VisitForAccumulatorValue(prop->key()); 696 __ mov(r2, r0);
692 __ mov(r1, result_register()); // Key. 697 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
693 __ LoadRoot(result_register(), Heap::kTheHoleValueRootIndex);
694 } 698 }
695 __ pop(r2); // Receiver. 699 ASSERT(prop->key()->AsLiteral() != NULL &&
700 prop->key()->AsLiteral()->handle()->IsSmi());
701 __ mov(r1, Operand(prop->key()->AsLiteral()->handle()));
696 702
697 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); 703 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
698 EmitCallIC(ic, RelocInfo::CODE_TARGET); 704 EmitCallIC(ic, RelocInfo::CODE_TARGET);
699 // Value in r0 is ignored (declarations are statements). 705 // Value in r0 is ignored (declarations are statements).
700 } 706 }
701 } 707 }
702 } 708 }
703 709
704 710
705 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 711 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
(...skipping 2922 matching lines...) Expand 10 before | Expand all | Expand 10 after
3628 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3634 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3629 __ add(pc, r1, Operand(masm_->CodeObject())); 3635 __ add(pc, r1, Operand(masm_->CodeObject()));
3630 } 3636 }
3631 3637
3632 3638
3633 #undef __ 3639 #undef __
3634 3640
3635 } } // namespace v8::internal 3641 } } // namespace v8::internal
3636 3642
3637 #endif // V8_TARGET_ARCH_ARM 3643 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698