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

Side by Side Diff: src/x64/full-codegen-x64.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, 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 | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2689 } 2689 }
2690 2690
2691 default: 2691 default:
2692 UNREACHABLE(); 2692 UNREACHABLE();
2693 } 2693 }
2694 } 2694 }
2695 2695
2696 2696
2697 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 2697 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
2698 Comment cmnt(masm_, "[ CountOperation"); 2698 Comment cmnt(masm_, "[ CountOperation");
2699 SetSourcePosition(expr->position());
2699 2700
2700 // Invalid left-hand-sides are rewritten to have a 'throw 2701 // Invalid left-hand-sides are rewritten to have a 'throw
2701 // ReferenceError' as the left-hand side. 2702 // ReferenceError' as the left-hand side.
2702 if (!expr->expression()->IsValidLeftHandSide()) { 2703 if (!expr->expression()->IsValidLeftHandSide()) {
2703 VisitForEffect(expr->expression()); 2704 VisitForEffect(expr->expression());
2704 return; 2705 return;
2705 } 2706 }
2706 2707
2707 // Expression can only be a property, a global or a (parameter or local) 2708 // Expression can only be a property, a global or a (parameter or local)
2708 // slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY. 2709 // slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 } else { 2968 } else {
2968 if (if_false != fall_through) __ jmp(if_false); 2969 if (if_false != fall_through) __ jmp(if_false);
2969 } 2970 }
2970 2971
2971 return true; 2972 return true;
2972 } 2973 }
2973 2974
2974 2975
2975 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { 2976 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
2976 Comment cmnt(masm_, "[ CompareOperation"); 2977 Comment cmnt(masm_, "[ CompareOperation");
2978 SetSourcePosition(expr->position());
2977 2979
2978 // Always perform the comparison for its control flow. Pack the result 2980 // Always perform the comparison for its control flow. Pack the result
2979 // into the expression's context after the comparison is performed. 2981 // into the expression's context after the comparison is performed.
2980 Label materialize_true, materialize_false; 2982 Label materialize_true, materialize_false;
2981 Label* if_true = NULL; 2983 Label* if_true = NULL;
2982 Label* if_false = NULL; 2984 Label* if_false = NULL;
2983 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); 2985 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
2984 2986
2985 // 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
2986 // the operands is a literal. 2988 // the operands is a literal.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 __ ret(0); 3156 __ ret(0);
3155 } 3157 }
3156 3158
3157 3159
3158 #undef __ 3160 #undef __
3159 3161
3160 3162
3161 } } // namespace v8::internal 3163 } } // namespace v8::internal
3162 3164
3163 #endif // V8_TARGET_ARCH_X64 3165 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698