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

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

Issue 10897010: Introduce some predicates over variable modes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/v8globals.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 __ str(ip, ContextOperand(cp, variable->index())); 825 __ str(ip, ContextOperand(cp, variable->index()));
826 // No write barrier since the_hole_value is in old space. 826 // No write barrier since the_hole_value is in old space.
827 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 827 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
828 } 828 }
829 break; 829 break;
830 830
831 case Variable::LOOKUP: { 831 case Variable::LOOKUP: {
832 Comment cmnt(masm_, "[ VariableDeclaration"); 832 Comment cmnt(masm_, "[ VariableDeclaration");
833 __ mov(r2, Operand(variable->name())); 833 __ mov(r2, Operand(variable->name()));
834 // Declaration nodes are always introduced in one of four modes. 834 // Declaration nodes are always introduced in one of four modes.
835 ASSERT(mode == VAR || mode == LET || 835 ASSERT(IsDeclaredVariableMode(mode));
836 mode == CONST || mode == CONST_HARMONY); 836 PropertyAttributes attr =
837 PropertyAttributes attr = (mode == CONST || mode == CONST_HARMONY) 837 IsImmutableVariableMode(mode) ? READ_ONLY : NONE;
838 ? READ_ONLY : NONE;
839 __ mov(r1, Operand(Smi::FromInt(attr))); 838 __ mov(r1, Operand(Smi::FromInt(attr)));
840 // Push initial value, if any. 839 // Push initial value, if any.
841 // Note: For variables we must not push an initial value (such as 840 // Note: For variables we must not push an initial value (such as
842 // 'undefined') because we may have a (legal) redeclaration and we 841 // 'undefined') because we may have a (legal) redeclaration and we
843 // must not destroy the current value. 842 // must not destroy the current value.
844 if (hole_init) { 843 if (hole_init) {
845 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex); 844 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
846 __ Push(cp, r2, r1, r0); 845 __ Push(cp, r2, r1, r0);
847 } else { 846 } else {
848 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value. 847 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value.
(...skipping 3728 matching lines...) Expand 10 before | Expand all | Expand 10 after
4577 *context_length = 0; 4576 *context_length = 0;
4578 return previous_; 4577 return previous_;
4579 } 4578 }
4580 4579
4581 4580
4582 #undef __ 4581 #undef __
4583 4582
4584 } } // namespace v8::internal 4583 } } // namespace v8::internal
4585 4584
4586 #endif // V8_TARGET_ARCH_ARM 4585 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/v8globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698