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

Side by Side Diff: src/ast.cc

Issue 5862002: Version 3.0.2. (Closed)
Patch Set: Created 10 years 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
« ChangeLog ('K') | « src/ast.h ('k') | src/ast-inl.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 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 119
120 Assignment::Assignment(Token::Value op, 120 Assignment::Assignment(Token::Value op,
121 Expression* target, 121 Expression* target,
122 Expression* value, 122 Expression* value,
123 int pos) 123 int pos)
124 : op_(op), 124 : op_(op),
125 target_(target), 125 target_(target),
126 value_(value), 126 value_(value),
127 pos_(pos), 127 pos_(pos),
128 binary_operation_(NULL), 128 compound_bailout_id_(kNoNumber),
129 compound_load_id_(kNoNumber),
130 assignment_id_(GetNextId()),
131 block_start_(false), 129 block_start_(false),
132 block_end_(false), 130 block_end_(false),
133 is_monomorphic_(false), 131 is_monomorphic_(false),
134 receiver_types_(NULL) { 132 receiver_types_(NULL) {
135 ASSERT(Token::IsAssignmentOp(op)); 133 ASSERT(Token::IsAssignmentOp(op));
134 binary_operation_ = is_compound()
135 ? new BinaryOperation(binary_op(), target, value, pos + 1)
136 : NULL;
136 if (is_compound()) { 137 if (is_compound()) {
137 binary_operation_ = 138 compound_bailout_id_ = GetNextId();
138 new BinaryOperation(binary_op(), target, value, pos + 1);
139 compound_load_id_ = GetNextId();
140 } 139 }
141 } 140 }
142 141
143 142
144 Token::Value Assignment::binary_op() const { 143 Token::Value Assignment::binary_op() const {
145 switch (op_) { 144 switch (op_) {
146 case Token::ASSIGN_BIT_OR: return Token::BIT_OR; 145 case Token::ASSIGN_BIT_OR: return Token::BIT_OR;
147 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; 146 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR;
148 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; 147 case Token::ASSIGN_BIT_AND: return Token::BIT_AND;
149 case Token::ASSIGN_SHL: return Token::SHL; 148 case Token::ASSIGN_SHL: return Token::SHL;
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 1034
1036 CaseClause::CaseClause(Expression* label, 1035 CaseClause::CaseClause(Expression* label,
1037 ZoneList<Statement*>* statements, 1036 ZoneList<Statement*>* statements,
1038 int pos) 1037 int pos)
1039 : label_(label), 1038 : label_(label),
1040 statements_(statements), 1039 statements_(statements),
1041 position_(pos), 1040 position_(pos),
1042 compare_type_(NONE) {} 1041 compare_type_(NONE) {}
1043 1042
1044 } } // namespace v8::internal 1043 } } // namespace v8::internal
OLDNEW
« ChangeLog ('K') | « src/ast.h ('k') | src/ast-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698