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

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

Issue 3120027: Add position information for compares, binary ops, and count (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 } 2695 }
2696 2696
2697 default: 2697 default:
2698 UNREACHABLE(); 2698 UNREACHABLE();
2699 } 2699 }
2700 } 2700 }
2701 2701
2702 2702
2703 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 2703 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
2704 Comment cmnt(masm_, "[ CountOperation"); 2704 Comment cmnt(masm_, "[ CountOperation");
2705 SetSourcePosition(expr->position());
2706
2705 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' 2707 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError'
2706 // as the left-hand side. 2708 // as the left-hand side.
2707 if (!expr->expression()->IsValidLeftHandSide()) { 2709 if (!expr->expression()->IsValidLeftHandSide()) {
2708 VisitForEffect(expr->expression()); 2710 VisitForEffect(expr->expression());
2709 return; 2711 return;
2710 } 2712 }
2711 2713
2712 // Expression can only be a property, a global or a (parameter or local) 2714 // Expression can only be a property, a global or a (parameter or local)
2713 // slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY. 2715 // slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY.
2714 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 2716 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2965 } else { 2967 } else {
2966 if (if_false != fall_through) __ jmp(if_false); 2968 if (if_false != fall_through) __ jmp(if_false);
2967 } 2969 }
2968 2970
2969 return true; 2971 return true;
2970 } 2972 }
2971 2973
2972 2974
2973 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { 2975 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
2974 Comment cmnt(masm_, "[ CompareOperation"); 2976 Comment cmnt(masm_, "[ CompareOperation");
2977 SetSourcePosition(expr->position());
2975 2978
2976 // Always perform the comparison for its control flow. Pack the result 2979 // Always perform the comparison for its control flow. Pack the result
2977 // into the expression's context after the comparison is performed. 2980 // into the expression's context after the comparison is performed.
2978 2981
2979 Label materialize_true, materialize_false; 2982 Label materialize_true, materialize_false;
2980 Label* if_true = NULL; 2983 Label* if_true = NULL;
2981 Label* if_false = NULL; 2984 Label* if_false = NULL;
2982 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); 2985 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
2983 2986
2984 // First we try a fast inlined version of the compare when one of 2987 // First we try a fast inlined version of the compare when one of
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3154 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3152 __ add(pc, r1, Operand(masm_->CodeObject())); 3155 __ add(pc, r1, Operand(masm_->CodeObject()));
3153 } 3156 }
3154 3157
3155 3158
3156 #undef __ 3159 #undef __
3157 3160
3158 } } // namespace v8::internal 3161 } } // namespace v8::internal
3159 3162
3160 #endif // V8_TARGET_ARCH_ARM 3163 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698