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

Side by Side Diff: src/ast.cc

Issue 4078: - Added a map cache for literal objects. This will... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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 | « no previous file | src/codegen-ia32.cc » ('j') | src/factory.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 139 }
140 140
141 141
142 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { 142 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) {
143 key_ = new Literal(value->name()); 143 key_ = new Literal(value->name());
144 value_ = value; 144 value_ = value;
145 kind_ = is_getter ? GETTER : SETTER; 145 kind_ = is_getter ? GETTER : SETTER;
146 } 146 }
147 147
148 148
149
150 void LabelCollector::AddLabel(Label* label) { 149 void LabelCollector::AddLabel(Label* label) {
151 // Add the label to the collector, but discard duplicates. 150 // Add the label to the collector, but discard duplicates.
152 int length = labels_->length(); 151 int length = labels_->length();
153 for (int i = 0; i < length; i++) { 152 for (int i = 0; i < length; i++) {
154 if (labels_->at(i) == label) return; 153 if (labels_->at(i) == label) return;
155 } 154 }
156 labels_->Add(label); 155 labels_->Add(label);
157 } 156 }
158 157
159 158
(...skipping 14 matching lines...) Expand all
174 // to this code. Maybe this should be handled by introducing an 173 // to this code. Maybe this should be handled by introducing an
175 // undefined expression or literal? Revisit this code if this 174 // undefined expression or literal? Revisit this code if this
176 // changes 175 // changes
177 Expression* expression = expressions->at(i); 176 Expression* expression = expressions->at(i);
178 if (expression != NULL) Visit(expression); 177 if (expression != NULL) Visit(expression);
179 } 178 }
180 } 179 }
181 180
182 181
183 } } // namespace v8::internal 182 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | src/factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698