| OLD | NEW |
| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 HConstant* GetConstantUndefined(); | 345 HConstant* GetConstantUndefined(); |
| 346 HConstant* GetConstant0(); | 346 HConstant* GetConstant0(); |
| 347 HConstant* GetConstant1(); | 347 HConstant* GetConstant1(); |
| 348 HConstant* GetConstantMinus1(); | 348 HConstant* GetConstantMinus1(); |
| 349 HConstant* GetConstantTrue(); | 349 HConstant* GetConstantTrue(); |
| 350 HConstant* GetConstantFalse(); | 350 HConstant* GetConstantFalse(); |
| 351 HConstant* GetConstantHole(); | 351 HConstant* GetConstantHole(); |
| 352 HConstant* GetConstantNull(); | 352 HConstant* GetConstantNull(); |
| 353 HConstant* GetInvalidContext(); | 353 HConstant* GetInvalidContext(); |
| 354 | 354 |
| 355 bool IsConstantUndefined(HConstant* constant); |
| 356 bool IsConstant0(HConstant* constant); |
| 357 bool IsConstant1(HConstant* constant); |
| 358 bool IsConstantMinus1(HConstant* constant); |
| 359 bool IsConstantTrue(HConstant* constant); |
| 360 bool IsConstantFalse(HConstant* constant); |
| 361 bool IsConstantHole(HConstant* constant); |
| 362 bool IsConstantNull(HConstant* constant); |
| 355 bool IsStandardConstant(HConstant* constant); | 363 bool IsStandardConstant(HConstant* constant); |
| 356 | 364 |
| 357 HBasicBlock* CreateBasicBlock(); | 365 HBasicBlock* CreateBasicBlock(); |
| 358 HArgumentsObject* GetArgumentsObject() const { | 366 HArgumentsObject* GetArgumentsObject() const { |
| 359 return arguments_object_.get(); | 367 return arguments_object_.get(); |
| 360 } | 368 } |
| 361 | 369 |
| 362 void SetArgumentsObject(HArgumentsObject* object) { | 370 void SetArgumentsObject(HArgumentsObject* object) { |
| 363 arguments_object_.set(object); | 371 arguments_object_.set(object); |
| 364 } | 372 } |
| 365 | 373 |
| 366 int GetMaximumValueID() const { return values_.length(); } | 374 int GetMaximumValueID() const { return values_.length(); } |
| 367 int GetNextBlockID() { return next_block_id_++; } | 375 int GetNextBlockID() { return next_block_id_++; } |
| 368 int GetNextValueID(HValue* value) { | 376 int GetNextValueID(HValue* value) { |
| 377 ASSERT(!disallow_adding_new_values_); |
| 369 values_.Add(value, zone()); | 378 values_.Add(value, zone()); |
| 370 return values_.length() - 1; | 379 return values_.length() - 1; |
| 371 } | 380 } |
| 372 HValue* LookupValue(int id) const { | 381 HValue* LookupValue(int id) const { |
| 373 if (id >= 0 && id < values_.length()) return values_[id]; | 382 if (id >= 0 && id < values_.length()) return values_[id]; |
| 374 return NULL; | 383 return NULL; |
| 375 } | 384 } |
| 385 void DisallowAddingNewValues() { |
| 386 disallow_adding_new_values_ = true; |
| 387 } |
| 376 | 388 |
| 377 bool Optimize(BailoutReason* bailout_reason); | 389 bool Optimize(BailoutReason* bailout_reason); |
| 378 | 390 |
| 379 #ifdef DEBUG | 391 #ifdef DEBUG |
| 380 void Verify(bool do_full_verify) const; | 392 void Verify(bool do_full_verify) const; |
| 381 #endif | 393 #endif |
| 382 | 394 |
| 383 bool has_osr() { | 395 bool has_osr() { |
| 384 return osr_ != NULL; | 396 return osr_ != NULL; |
| 385 } | 397 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 504 |
| 493 CompilationInfo* info_; | 505 CompilationInfo* info_; |
| 494 Zone* zone_; | 506 Zone* zone_; |
| 495 | 507 |
| 496 bool is_recursive_; | 508 bool is_recursive_; |
| 497 bool use_optimistic_licm_; | 509 bool use_optimistic_licm_; |
| 498 bool depends_on_empty_array_proto_elements_; | 510 bool depends_on_empty_array_proto_elements_; |
| 499 int type_change_checksum_; | 511 int type_change_checksum_; |
| 500 int maximum_environment_size_; | 512 int maximum_environment_size_; |
| 501 int no_side_effects_scope_count_; | 513 int no_side_effects_scope_count_; |
| 514 bool disallow_adding_new_values_; |
| 502 | 515 |
| 503 DISALLOW_COPY_AND_ASSIGN(HGraph); | 516 DISALLOW_COPY_AND_ASSIGN(HGraph); |
| 504 }; | 517 }; |
| 505 | 518 |
| 506 | 519 |
| 507 Zone* HBasicBlock::zone() const { return graph_->zone(); } | 520 Zone* HBasicBlock::zone() const { return graph_->zone(); } |
| 508 | 521 |
| 509 | 522 |
| 510 // Type of stack frame an environment might refer to. | 523 // Type of stack frame an environment might refer to. |
| 511 enum FrameType { | 524 enum FrameType { |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 HValue* length); | 1269 HValue* length); |
| 1257 | 1270 |
| 1258 void BuildTransitionElementsKind(HValue* object, | 1271 void BuildTransitionElementsKind(HValue* object, |
| 1259 HValue* map, | 1272 HValue* map, |
| 1260 ElementsKind from_kind, | 1273 ElementsKind from_kind, |
| 1261 ElementsKind to_kind, | 1274 ElementsKind to_kind, |
| 1262 bool is_jsarray); | 1275 bool is_jsarray); |
| 1263 | 1276 |
| 1264 HValue* BuildNumberToString(HValue* object, Handle<Type> type); | 1277 HValue* BuildNumberToString(HValue* object, Handle<Type> type); |
| 1265 | 1278 |
| 1279 // Computes the size for a sequential string of the given length and encoding. |
| 1280 HValue* BuildSeqStringSizeFor(HValue* length, |
| 1281 String::Encoding encoding); |
| 1282 // Copies characters from one sequential string to another. |
| 1283 void BuildCopySeqStringChars(HValue* src, |
| 1284 HValue* src_offset, |
| 1285 String::Encoding src_encoding, |
| 1286 HValue* dst, |
| 1287 HValue* dst_offset, |
| 1288 String::Encoding dst_encoding, |
| 1289 HValue* length); |
| 1290 // Both operands are non-empty strings. |
| 1291 HValue* BuildUncheckedStringAdd(HValue* left, |
| 1292 HValue* right, |
| 1293 PretenureFlag pretenure_flag); |
| 1294 // Both operands are strings. |
| 1295 HValue* BuildStringAdd(HValue* left, |
| 1296 HValue* right, |
| 1297 PretenureFlag pretenure_flag); |
| 1298 |
| 1266 HInstruction* BuildUncheckedMonomorphicElementAccess( | 1299 HInstruction* BuildUncheckedMonomorphicElementAccess( |
| 1267 HValue* checked_object, | 1300 HValue* checked_object, |
| 1268 HValue* key, | 1301 HValue* key, |
| 1269 HValue* val, | 1302 HValue* val, |
| 1270 bool is_js_array, | 1303 bool is_js_array, |
| 1271 ElementsKind elements_kind, | 1304 ElementsKind elements_kind, |
| 1272 bool is_store, | 1305 bool is_store, |
| 1273 LoadKeyedHoleMode load_mode, | 1306 LoadKeyedHoleMode load_mode, |
| 1274 KeyedAccessStoreMode store_mode); | 1307 KeyedAccessStoreMode store_mode); |
| 1275 | 1308 |
| 1276 HInstruction* AddElementAccess( | 1309 HInstruction* AddElementAccess( |
| 1277 HValue* elements, | 1310 HValue* elements, |
| 1278 HValue* checked_key, | 1311 HValue* checked_key, |
| 1279 HValue* val, | 1312 HValue* val, |
| 1280 HValue* dependency, | 1313 HValue* dependency, |
| 1281 ElementsKind elements_kind, | 1314 ElementsKind elements_kind, |
| 1282 bool is_store, | 1315 bool is_store, |
| 1283 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); | 1316 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); |
| 1284 | 1317 |
| 1285 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); | 1318 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); |
| 1286 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); | 1319 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); |
| 1287 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); | 1320 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); |
| 1288 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); | 1321 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map> map); |
| 1322 HStoreNamedField* AddStoreMapConstantNoWriteBarrier(HValue* object, |
| 1323 Handle<Map> map) { |
| 1324 HStoreNamedField* store_map = AddStoreMapConstant(object, map); |
| 1325 store_map->SkipWriteBarrier(); |
| 1326 return store_map; |
| 1327 } |
| 1289 HLoadNamedField* AddLoadElements(HValue* object); | 1328 HLoadNamedField* AddLoadElements(HValue* object); |
| 1290 | 1329 |
| 1291 bool MatchRotateRight(HValue* left, | 1330 bool MatchRotateRight(HValue* left, |
| 1292 HValue* right, | 1331 HValue* right, |
| 1293 HValue** operand, | 1332 HValue** operand, |
| 1294 HValue** shift_amount); | 1333 HValue** shift_amount); |
| 1295 | 1334 |
| 1296 HInstruction* BuildBinaryOperation(Token::Value op, | 1335 HInstruction* BuildBinaryOperation(Token::Value op, |
| 1297 HValue* left, | 1336 HValue* left, |
| 1298 HValue* right, | 1337 HValue* right, |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2483 } | 2522 } |
| 2484 | 2523 |
| 2485 private: | 2524 private: |
| 2486 HGraphBuilder* builder_; | 2525 HGraphBuilder* builder_; |
| 2487 }; | 2526 }; |
| 2488 | 2527 |
| 2489 | 2528 |
| 2490 } } // namespace v8::internal | 2529 } } // namespace v8::internal |
| 2491 | 2530 |
| 2492 #endif // V8_HYDROGEN_H_ | 2531 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |