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

Side by Side Diff: src/x64/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, 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 | « src/parser.cc ('k') | 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 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 5043 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 // For a compound assignment the right-hand side is a binary operation 5054 // For a compound assignment the right-hand side is a binary operation
5055 // between the current property value and the actual right-hand side. 5055 // between the current property value and the actual right-hand side.
5056 LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF); 5056 LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF);
5057 Load(node->value()); 5057 Load(node->value());
5058 5058
5059 // Perform the binary operation. 5059 // Perform the binary operation.
5060 bool overwrite_value = 5060 bool overwrite_value =
5061 (node->value()->AsBinaryOperation() != NULL && 5061 (node->value()->AsBinaryOperation() != NULL &&
5062 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); 5062 node->value()->AsBinaryOperation()->ResultOverwriteAllowed());
5063 // Construct the implicit binary operation. 5063 // Construct the implicit binary operation.
5064 BinaryOperation expr(node->binary_op(), node->target(), node->value()); 5064 BinaryOperation expr(node);
5065 expr.CopyAnalysisResultsFrom(node);
5066 GenericBinaryOperation(&expr, 5065 GenericBinaryOperation(&expr,
5067 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); 5066 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE);
5068 } else { 5067 } else {
5069 // For non-compound assignment just load the right-hand side. 5068 // For non-compound assignment just load the right-hand side.
5070 Load(node->value()); 5069 Load(node->value());
5071 } 5070 }
5072 5071
5073 // Perform the assignment. 5072 // Perform the assignment.
5074 if (var->mode() != Variable::CONST || node->op() == Token::INIT_CONST) { 5073 if (var->mode() != Variable::CONST || node->op() == Token::INIT_CONST) {
5075 CodeForSourcePosition(node->position()); 5074 CodeForSourcePosition(node->position());
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
5146 frame()->Dup(); 5145 frame()->Dup();
5147 } 5146 }
5148 Result value = EmitNamedLoad(name, var != NULL); 5147 Result value = EmitNamedLoad(name, var != NULL);
5149 frame()->Push(&value); 5148 frame()->Push(&value);
5150 Load(node->value()); 5149 Load(node->value());
5151 5150
5152 bool overwrite_value = 5151 bool overwrite_value =
5153 (node->value()->AsBinaryOperation() != NULL && 5152 (node->value()->AsBinaryOperation() != NULL &&
5154 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); 5153 node->value()->AsBinaryOperation()->ResultOverwriteAllowed());
5155 // Construct the implicit binary operation. 5154 // Construct the implicit binary operation.
5156 BinaryOperation expr(node->binary_op(), node->target(), node->value()); 5155 BinaryOperation expr(node);
5157 expr.CopyAnalysisResultsFrom(node);
5158 GenericBinaryOperation(&expr, 5156 GenericBinaryOperation(&expr,
5159 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); 5157 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE);
5160 } else { 5158 } else {
5161 // For non-compound assignment just load the right-hand side. 5159 // For non-compound assignment just load the right-hand side.
5162 Load(node->value()); 5160 Load(node->value());
5163 } 5161 }
5164 5162
5165 // Stack layout: 5163 // Stack layout:
5166 // [tos] : value 5164 // [tos] : value
5167 // [tos+1] : receiver (only materialized if non-trivial) 5165 // [tos+1] : receiver (only materialized if non-trivial)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
5248 frame()->PushElementAt(1); 5246 frame()->PushElementAt(1);
5249 frame()->PushElementAt(1); 5247 frame()->PushElementAt(1);
5250 Result value = EmitKeyedLoad(); 5248 Result value = EmitKeyedLoad();
5251 frame()->Push(&value); 5249 frame()->Push(&value);
5252 Load(node->value()); 5250 Load(node->value());
5253 5251
5254 // Perform the binary operation. 5252 // Perform the binary operation.
5255 bool overwrite_value = 5253 bool overwrite_value =
5256 (node->value()->AsBinaryOperation() != NULL && 5254 (node->value()->AsBinaryOperation() != NULL &&
5257 node->value()->AsBinaryOperation()->ResultOverwriteAllowed()); 5255 node->value()->AsBinaryOperation()->ResultOverwriteAllowed());
5258 BinaryOperation expr(node->binary_op(), node->target(), node->value()); 5256 BinaryOperation expr(node);
5259 expr.CopyAnalysisResultsFrom(node);
5260 GenericBinaryOperation(&expr, 5257 GenericBinaryOperation(&expr,
5261 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE); 5258 overwrite_value ? OVERWRITE_RIGHT : NO_OVERWRITE);
5262 } else { 5259 } else {
5263 // For non-compound assignment just load the right-hand side. 5260 // For non-compound assignment just load the right-hand side.
5264 Load(node->value()); 5261 Load(node->value());
5265 } 5262 }
5266 5263
5267 // Stack layout: 5264 // Stack layout:
5268 // [tos] : value 5265 // [tos] : value
5269 // [tos+1] : key 5266 // [tos+1] : key
(...skipping 7588 matching lines...) Expand 10 before | Expand all | Expand 10 after
12858 #undef __ 12855 #undef __
12859 12856
12860 void RecordWriteStub::Generate(MacroAssembler* masm) { 12857 void RecordWriteStub::Generate(MacroAssembler* masm) {
12861 masm->RecordWriteHelper(object_, addr_, scratch_); 12858 masm->RecordWriteHelper(object_, addr_, scratch_);
12862 masm->ret(0); 12859 masm->ret(0);
12863 } 12860 }
12864 12861
12865 } } // namespace v8::internal 12862 } } // namespace v8::internal
12866 12863
12867 #endif // V8_TARGET_ARCH_X64 12864 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698