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

Side by Side Diff: src/ast.cc

Issue 48006: Reapply revisions 1432, 1433, 1469 and 1472 while fixing issue 279. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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/codegen-arm.cc » ('j') | src/objects.h » ('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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return scope()->AllowsLazyCompilation(); 128 return scope()->AllowsLazyCompilation();
129 } 129 }
130 130
131 131
132 ObjectLiteral::Property::Property(Literal* key, Expression* value) { 132 ObjectLiteral::Property::Property(Literal* key, Expression* value) {
133 key_ = key; 133 key_ = key;
134 value_ = value; 134 value_ = value;
135 Object* k = *key->handle(); 135 Object* k = *key->handle();
136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) { 136 if (k->IsSymbol() && Heap::Proto_symbol()->Equals(String::cast(k))) {
137 kind_ = PROTOTYPE; 137 kind_ = PROTOTYPE;
138 } else if (value_->AsMaterializedLiteral() != NULL) {
139 kind_ = MATERIALIZED_LITERAL;
140 } else if (value_->AsLiteral() != NULL) {
141 kind_ = CONSTANT;
138 } else { 142 } else {
139 kind_ = value_->AsLiteral() == NULL ? COMPUTED : CONSTANT; 143 kind_ = COMPUTED;
140 } 144 }
141 } 145 }
142 146
143 147
144 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) { 148 ObjectLiteral::Property::Property(bool is_getter, FunctionLiteral* value) {
145 key_ = new Literal(value->name()); 149 key_ = new Literal(value->name());
146 value_ = value; 150 value_ = value;
147 kind_ = is_getter ? GETTER : SETTER; 151 kind_ = is_getter ? GETTER : SETTER;
148 } 152 }
149 153
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 if (kInfinity - max_match_ < node_max_match) { 481 if (kInfinity - max_match_ < node_max_match) {
478 max_match_ = kInfinity; 482 max_match_ = kInfinity;
479 } else { 483 } else {
480 max_match_ += node->max_match(); 484 max_match_ += node->max_match();
481 } 485 }
482 } 486 }
483 } 487 }
484 488
485 489
486 } } // namespace v8::internal 490 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/codegen-arm.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698