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

Side by Side Diff: src/ast.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/ast.h ('k') | src/full-codegen.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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 return false; 232 return false;
233 } 233 }
234 234
235 235
236 void Expression::CopyAnalysisResultsFrom(Expression* other) { 236 void Expression::CopyAnalysisResultsFrom(Expression* other) {
237 bitfields_ = other->bitfields_; 237 bitfields_ = other->bitfields_;
238 type_ = other->type_; 238 type_ = other->type_;
239 } 239 }
240 240
241 241
242 BinaryOperation::BinaryOperation(Assignment* assignment) {
243 ASSERT(assignment->is_compound());
244 op_ = assignment->binary_op();
245 left_ = assignment->target();
246 right_ = assignment->value();
247 pos_ = assignment->position();
248 CopyAnalysisResultsFrom(assignment);
249 }
250
251
242 // ---------------------------------------------------------------------------- 252 // ----------------------------------------------------------------------------
243 // Implementation of AstVisitor 253 // Implementation of AstVisitor
244 254
245 bool AstVisitor::CheckStackOverflow() { 255 bool AstVisitor::CheckStackOverflow() {
246 if (stack_overflow_) return true; 256 if (stack_overflow_) return true;
247 StackLimitCheck check; 257 StackLimitCheck check;
248 if (!check.HasOverflowed()) return false; 258 if (!check.HasOverflowed()) return false;
249 return (stack_overflow_ = true); 259 return (stack_overflow_ = true);
250 } 260 }
251 261
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 cond_(NULL), 593 cond_(NULL),
584 may_have_function_literal_(true) { 594 may_have_function_literal_(true) {
585 } 595 }
586 596
587 597
588 CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements) 598 CaseClause::CaseClause(Expression* label, ZoneList<Statement*>* statements)
589 : label_(label), statements_(statements) { 599 : label_(label), statements_(statements) {
590 } 600 }
591 601
592 } } // namespace v8::internal 602 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698