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

Side by Side Diff: src/ast.cc

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/bignum-dtoa.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 int FunctionLiteral::end_position() const { 179 int FunctionLiteral::end_position() const {
180 return scope()->end_position(); 180 return scope()->end_position();
181 } 181 }
182 182
183 183
184 LanguageMode FunctionLiteral::language_mode() const { 184 LanguageMode FunctionLiteral::language_mode() const {
185 return scope()->language_mode(); 185 return scope()->language_mode();
186 } 186 }
187 187
188 188
189 void FunctionLiteral::InitializeSharedInfo(
190 Handle<Code> unoptimized_code) {
191 for (RelocIterator it(*unoptimized_code); !it.done(); it.next()) {
192 RelocInfo* rinfo = it.rinfo();
193 if (rinfo->rmode() != RelocInfo::EMBEDDED_OBJECT) continue;
194 Object* obj = rinfo->target_object();
195 if (obj->IsSharedFunctionInfo()) {
196 SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
197 if (shared->start_position() == start_position()) {
198 shared_info_ = Handle<SharedFunctionInfo>(shared);
199 break;
200 }
201 }
202 }
203 }
204
205
189 ObjectLiteralProperty::ObjectLiteralProperty(Literal* key, 206 ObjectLiteralProperty::ObjectLiteralProperty(Literal* key,
190 Expression* value, 207 Expression* value,
191 Isolate* isolate) { 208 Isolate* isolate) {
192 emit_store_ = true; 209 emit_store_ = true;
193 key_ = key; 210 key_ = key;
194 value_ = value; 211 value_ = value;
195 Object* k = *key->value(); 212 Object* k = *key->value();
196 if (k->IsInternalizedString() && 213 if (k->IsInternalizedString() &&
197 isolate->heap()->proto_string()->Equals(String::cast(k))) { 214 isolate->heap()->proto_string()->Equals(String::cast(k))) {
198 kind_ = PROTOTYPE; 215 kind_ = PROTOTYPE;
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1134 }
1118 1135
1119 1136
1120 CaseClause::CaseClause(Isolate* isolate, 1137 CaseClause::CaseClause(Isolate* isolate,
1121 Expression* label, 1138 Expression* label,
1122 ZoneList<Statement*>* statements, 1139 ZoneList<Statement*>* statements,
1123 int pos) 1140 int pos)
1124 : Expression(isolate, pos), 1141 : Expression(isolate, pos),
1125 label_(label), 1142 label_(label),
1126 statements_(statements), 1143 statements_(statements),
1127 compare_type_(Type::None(), isolate), 1144 compare_type_(Type::None(isolate)),
1128 compare_id_(AstNode::GetNextId(isolate)), 1145 compare_id_(AstNode::GetNextId(isolate)),
1129 entry_id_(AstNode::GetNextId(isolate)) { 1146 entry_id_(AstNode::GetNextId(isolate)) {
1130 } 1147 }
1131 1148
1132 1149
1133 #define REGULAR_NODE(NodeType) \ 1150 #define REGULAR_NODE(NodeType) \
1134 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \ 1151 void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
1135 increase_node_count(); \ 1152 increase_node_count(); \
1136 } 1153 }
1137 #define DONT_OPTIMIZE_NODE(NodeType) \ 1154 #define DONT_OPTIMIZE_NODE(NodeType) \
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1262 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1246 str = arr; 1263 str = arr;
1247 } else { 1264 } else {
1248 str = DoubleToCString(value_->Number(), buffer); 1265 str = DoubleToCString(value_->Number(), buffer);
1249 } 1266 }
1250 return isolate_->factory()->NewStringFromAscii(CStrVector(str)); 1267 return isolate_->factory()->NewStringFromAscii(CStrVector(str));
1251 } 1268 }
1252 1269
1253 1270
1254 } } // namespace v8::internal 1271 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/bignum-dtoa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698