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

Side by Side Diff: src/hydrogen.h

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: First pass at pre-VFP2 RA Created 8 years, 1 month 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
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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 Zone* HBasicBlock::zone() const { return graph_->zone(); } 419 Zone* HBasicBlock::zone() const { return graph_->zone(); }
420 420
421 421
422 // Type of stack frame an environment might refer to. 422 // Type of stack frame an environment might refer to.
423 enum FrameType { 423 enum FrameType {
424 JS_FUNCTION, 424 JS_FUNCTION,
425 JS_CONSTRUCT, 425 JS_CONSTRUCT,
426 JS_GETTER, 426 JS_GETTER,
427 JS_SETTER, 427 JS_SETTER,
428 ARGUMENTS_ADAPTOR 428 ARGUMENTS_ADAPTOR,
429 STUB
429 }; 430 };
430 431
431 432
432 class HEnvironment: public ZoneObject { 433 class HEnvironment: public ZoneObject {
433 public: 434 public:
434 HEnvironment(HEnvironment* outer, 435 HEnvironment(HEnvironment* outer,
435 Scope* scope, 436 Scope* scope,
436 Handle<JSFunction> closure, 437 Handle<JSFunction> closure,
437 Zone* zone); 438 Zone* zone);
438 439
440 explicit HEnvironment(Zone* zone);
441
439 HEnvironment* arguments_environment() { 442 HEnvironment* arguments_environment() {
440 return outer()->frame_type() == ARGUMENTS_ADAPTOR ? outer() : this; 443 return outer()->frame_type() == ARGUMENTS_ADAPTOR ? outer() : this;
441 } 444 }
442 445
443 // Simple accessors. 446 // Simple accessors.
444 Handle<JSFunction> closure() const { return closure_; } 447 Handle<JSFunction> closure() const { return closure_; }
445 const ZoneList<HValue*>* values() const { return &values_; } 448 const ZoneList<HValue*>* values() const { return &values_; }
446 const ZoneList<int>* assigned_variables() const { 449 const ZoneList<int>* assigned_variables() const {
447 return &assigned_variables_; 450 return &assigned_variables_;
448 } 451 }
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 NilValue nil); 1115 NilValue nil);
1113 1116
1114 HStringCharCodeAt* BuildStringCharCodeAt(HValue* context, 1117 HStringCharCodeAt* BuildStringCharCodeAt(HValue* context,
1115 HValue* string, 1118 HValue* string,
1116 HValue* index); 1119 HValue* index);
1117 HInstruction* BuildBinaryOperation(BinaryOperation* expr, 1120 HInstruction* BuildBinaryOperation(BinaryOperation* expr,
1118 HValue* left, 1121 HValue* left,
1119 HValue* right); 1122 HValue* right);
1120 HInstruction* BuildIncrement(bool returns_original_input, 1123 HInstruction* BuildIncrement(bool returns_original_input,
1121 CountOperation* expr); 1124 CountOperation* expr);
1122 HInstruction* BuildFastElementAccess(HValue* elements, 1125 HLoadNamedField* BuildLoadNamedField(HValue* object,
Jakob Kummerow 2012/11/19 12:36:00 merge problem?
danno 2012/11/26 17:16:18 Done.
1123 HValue* checked_key, 1126 Property* expr,
1124 HValue* val, 1127 Handle<Map> type,
1125 HValue* dependency, 1128 LookupResult* result,
1126 ElementsKind elements_kind, 1129 bool smi_and_map_check);
1127 bool is_store); 1130 HInstruction* BuildLoadNamedGeneric(HValue* object, Property* expr);
1131 HInstruction* BuildLoadKeyedGeneric(HValue* object,
1132 HValue* key);
1133 static HInstruction* BuildExternalArrayElementAccess(
1134 HGraph* graph,
1135 HBasicBlock* current_block,
1136 HValue* external_elements,
1137 HValue* checked_key,
1138 HValue* val,
1139 HValue* dependency,
1140 ElementsKind elements_kind,
1141 bool is_store,
1142 Zone* zone);
1143 static HInstruction* BuildFastElementAccess(
1144 HGraph* graph,
1145 HBasicBlock* current_block,
1146 HValue* elements,
1147 HValue* checked_key,
1148 HValue* val,
1149 HValue* dependency,
1150 ElementsKind elements_kind,
1151 bool is_store,
1152 Zone* zone);
1128 1153
1129 HInstruction* TryBuildConsolidatedElementLoad(HValue* object, 1154 HInstruction* TryBuildConsolidatedElementLoad(HValue* object,
1130 HValue* key, 1155 HValue* key,
1131 HValue* val, 1156 HValue* val,
1132 SmallMapList* maps); 1157 SmallMapList* maps);
1133 1158
1134 HInstruction* BuildUncheckedMonomorphicElementAccess(HValue* object, 1159 static HInstruction* BuildUncheckedMonomorphicElementAccess(
1135 HValue* key, 1160 HGraph* graph,
1136 HValue* val, 1161 HBasicBlock* current_block,
1137 HCheckMaps* mapcheck, 1162 HValue* object,
1138 Handle<Map> map, 1163 HValue* key,
1139 bool is_store); 1164 HValue* val,
1165 HCheckMaps* mapcheck,
1166 bool is_js_array,
1167 ElementsKind elements_kind,
1168 bool is_store,
1169 Zone* zone);
1140 1170
1141 HInstruction* BuildMonomorphicElementAccess(HValue* object, 1171 HInstruction* BuildMonomorphicElementAccess(HValue* object,
1142 HValue* key, 1172 HValue* key,
1143 HValue* val, 1173 HValue* val,
1144 HValue* dependency, 1174 HValue* dependency,
1145 Handle<Map> map, 1175 Handle<Map> map,
1146 bool is_store); 1176 bool is_store);
1147 1177
1148 HValue* HandlePolymorphicElementAccess(HValue* object, 1178 HValue* HandlePolymorphicElementAccess(HValue* object,
1149 HValue* key, 1179 HValue* key,
(...skipping 20 matching lines...) Expand all
1170 Handle<String> name, 1200 Handle<String> name,
1171 Property* expr); 1201 Property* expr);
1172 HInstruction* BuildCallGetter(HValue* object, 1202 HInstruction* BuildCallGetter(HValue* object,
1173 Handle<Map> map, 1203 Handle<Map> map,
1174 Handle<JSFunction> getter, 1204 Handle<JSFunction> getter,
1175 Handle<JSObject> holder); 1205 Handle<JSObject> holder);
1176 HInstruction* BuildLoadNamedMonomorphic(HValue* object, 1206 HInstruction* BuildLoadNamedMonomorphic(HValue* object,
1177 Handle<String> name, 1207 Handle<String> name,
1178 Property* expr, 1208 Property* expr,
1179 Handle<Map> map); 1209 Handle<Map> map);
1180 HInstruction* BuildLoadKeyedGeneric(HValue* object, HValue* key);
1181 HInstruction* BuildExternalArrayElementAccess(
1182 HValue* external_elements,
1183 HValue* checked_key,
1184 HValue* val,
1185 HValue* dependency,
1186 ElementsKind elements_kind,
1187 bool is_store);
1188 1210
1189 void AddCheckMapsWithTransitions(HValue* object, 1211 void AddCheckMapsWithTransitions(HValue* object,
1190 Handle<Map> map); 1212 Handle<Map> map);
1191 1213
1192 HInstruction* BuildStoreNamedField(HValue* object, 1214 HInstruction* BuildStoreNamedField(HValue* object,
1193 Handle<String> name, 1215 Handle<String> name,
1194 HValue* value, 1216 HValue* value,
1195 Handle<Map> map, 1217 Handle<Map> map,
1196 LookupResult* lookup); 1218 LookupResult* lookup);
1197 HInstruction* BuildStoreNamedGeneric(HValue* object, 1219 HInstruction* BuildStoreNamedGeneric(HValue* object,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1268
1247 int inlined_count_; 1269 int inlined_count_;
1248 ZoneList<Handle<Object> > globals_; 1270 ZoneList<Handle<Object> > globals_;
1249 1271
1250 Zone* zone_; 1272 Zone* zone_;
1251 1273
1252 bool inline_bailout_; 1274 bool inline_bailout_;
1253 1275
1254 friend class FunctionState; // Pushes and pops the state stack. 1276 friend class FunctionState; // Pushes and pops the state stack.
1255 friend class AstContext; // Pushes and pops the AST context stack. 1277 friend class AstContext; // Pushes and pops the AST context stack.
1278 friend class KeyedLoadFastElementStub;
1256 1279
1257 DISALLOW_COPY_AND_ASSIGN(HGraphBuilder); 1280 DISALLOW_COPY_AND_ASSIGN(HGraphBuilder);
1258 }; 1281 };
1259 1282
1260 1283
1261 Zone* AstContext::zone() const { return owner_->zone(); } 1284 Zone* AstContext::zone() const { return owner_->zone(); }
1262 1285
1263 1286
1264 class HValueMap: public ZoneObject { 1287 class HValueMap: public ZoneObject {
1265 public: 1288 public:
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 const char* name_; 1432 const char* name_;
1410 HGraph* graph_; 1433 HGraph* graph_;
1411 LChunk* chunk_; 1434 LChunk* chunk_;
1412 LAllocator* allocator_; 1435 LAllocator* allocator_;
1413 unsigned start_allocation_size_; 1436 unsigned start_allocation_size_;
1414 }; 1437 };
1415 1438
1416 1439
1417 class HTracer: public Malloced { 1440 class HTracer: public Malloced {
1418 public: 1441 public:
1419 void TraceCompilation(FunctionLiteral* function); 1442 void TraceCompilation(CompilationInfo* info);
1420 void TraceHydrogen(const char* name, HGraph* graph); 1443 void TraceHydrogen(const char* name, HGraph* graph);
1421 void TraceLithium(const char* name, LChunk* chunk); 1444 void TraceLithium(const char* name, LChunk* chunk);
1422 void TraceLiveRanges(const char* name, LAllocator* allocator); 1445 void TraceLiveRanges(const char* name, LAllocator* allocator);
1423 1446
1424 static HTracer* Instance() { 1447 static HTracer* Instance() {
1425 static SetOncePointer<HTracer> instance; 1448 static SetOncePointer<HTracer> instance;
1426 if (!instance.is_set()) { 1449 if (!instance.is_set()) {
1427 instance.set(new HTracer("hydrogen.cfg")); 1450 instance.set(new HTracer("hydrogen.cfg"));
1428 } 1451 }
1429 return instance.get(); 1452 return instance.get();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 const char* filename_; 1519 const char* filename_;
1497 HeapStringAllocator string_allocator_; 1520 HeapStringAllocator string_allocator_;
1498 StringStream trace_; 1521 StringStream trace_;
1499 int indent_; 1522 int indent_;
1500 }; 1523 };
1501 1524
1502 1525
1503 } } // namespace v8::internal 1526 } } // namespace v8::internal
1504 1527
1505 #endif // V8_HYDROGEN_H_ 1528 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698