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

Side by Side Diff: src/hydrogen-instructions.h

Issue 145133013: External Array renaming and boilerplate scrapping (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 kAllowUndefinedAsNaN, 566 kAllowUndefinedAsNaN,
567 kIsArguments, 567 kIsArguments,
568 kTruncatingToInt32, 568 kTruncatingToInt32,
569 kAllUsesTruncatingToInt32, 569 kAllUsesTruncatingToInt32,
570 kTruncatingToSmi, 570 kTruncatingToSmi,
571 kAllUsesTruncatingToSmi, 571 kAllUsesTruncatingToSmi,
572 // Set after an instruction is killed. 572 // Set after an instruction is killed.
573 kIsDead, 573 kIsDead,
574 // Instructions that are allowed to produce full range unsigned integer 574 // Instructions that are allowed to produce full range unsigned integer
575 // values are marked with kUint32 flag. If arithmetic shift or a load from 575 // values are marked with kUint32 flag. If arithmetic shift or a load from
576 // EXTERNAL_UNSIGNED_INT_ELEMENTS array is not marked with this flag 576 // EXTERNAL_UINT32_ELEMENTS array is not marked with this flag
577 // it will deoptimize if result does not fit into signed integer range. 577 // it will deoptimize if result does not fit into signed integer range.
578 // HGraph::ComputeSafeUint32Operations is responsible for setting this 578 // HGraph::ComputeSafeUint32Operations is responsible for setting this
579 // flag. 579 // flag.
580 kUint32, 580 kUint32,
581 kHasNoObservableSideEffects, 581 kHasNoObservableSideEffects,
582 // Indicates the instruction is live during dead code elimination. 582 // Indicates the instruction is live during dead code elimination.
583 kIsLive, 583 kIsLive,
584 584
585 // HEnvironmentMarkers are deleted before dead code 585 // HEnvironmentMarkers are deleted before dead code
586 // elimination takes place, so they can repurpose the kIsLive flag: 586 // elimination takes place, so they can repurpose the kIsLive flag:
(...skipping 5834 matching lines...) Expand 10 before | Expand all | Expand 10 after
6421 } else { 6421 } else {
6422 set_representation(Representation::Tagged()); 6422 set_representation(Representation::Tagged());
6423 } 6423 }
6424 6424
6425 SetGVNFlag(kDependsOnArrayElements); 6425 SetGVNFlag(kDependsOnArrayElements);
6426 } else { 6426 } else {
6427 set_representation(Representation::Double()); 6427 set_representation(Representation::Double());
6428 SetGVNFlag(kDependsOnDoubleArrayElements); 6428 SetGVNFlag(kDependsOnDoubleArrayElements);
6429 } 6429 }
6430 } else { 6430 } else {
6431 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || 6431 if (elements_kind == EXTERNAL_FLOAT32_ELEMENTS ||
6432 elements_kind == EXTERNAL_DOUBLE_ELEMENTS || 6432 elements_kind == EXTERNAL_FLOAT64_ELEMENTS ||
6433 elements_kind == FLOAT32_ELEMENTS || 6433 elements_kind == FLOAT32_ELEMENTS ||
6434 elements_kind == FLOAT64_ELEMENTS) { 6434 elements_kind == FLOAT64_ELEMENTS) {
6435 set_representation(Representation::Double()); 6435 set_representation(Representation::Double());
6436 } else { 6436 } else {
6437 set_representation(Representation::Integer32()); 6437 set_representation(Representation::Integer32());
6438 } 6438 }
6439 6439
6440 if (is_external()) { 6440 if (is_external()) {
6441 SetGVNFlag(kDependsOnExternalMemory); 6441 SetGVNFlag(kDependsOnExternalMemory);
6442 } else if (is_fixed_typed_array()) { 6442 } else if (is_fixed_typed_array()) {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
6843 } else if (IsFastSmiElementsKind(elements_kind)) { 6843 } else if (IsFastSmiElementsKind(elements_kind)) {
6844 SetGVNFlag(kChangesArrayElements); 6844 SetGVNFlag(kChangesArrayElements);
6845 } else if (is_fixed_typed_array()) { 6845 } else if (is_fixed_typed_array()) {
6846 SetGVNFlag(kChangesTypedArrayElements); 6846 SetGVNFlag(kChangesTypedArrayElements);
6847 SetFlag(kAllowUndefinedAsNaN); 6847 SetFlag(kAllowUndefinedAsNaN);
6848 } else { 6848 } else {
6849 SetGVNFlag(kChangesArrayElements); 6849 SetGVNFlag(kChangesArrayElements);
6850 } 6850 }
6851 6851
6852 // EXTERNAL_{UNSIGNED_,}{BYTE,SHORT,INT}_ELEMENTS are truncating. 6852 // EXTERNAL_{UNSIGNED_,}{BYTE,SHORT,INT}_ELEMENTS are truncating.
6853 if ((elements_kind >= EXTERNAL_BYTE_ELEMENTS && 6853 if ((elements_kind >= EXTERNAL_INT8_ELEMENTS &&
6854 elements_kind <= EXTERNAL_UNSIGNED_INT_ELEMENTS) || 6854 elements_kind <= EXTERNAL_UINT32_ELEMENTS) ||
6855 (elements_kind >= UINT8_ELEMENTS && 6855 (elements_kind >= UINT8_ELEMENTS &&
6856 elements_kind <= INT32_ELEMENTS)) { 6856 elements_kind <= INT32_ELEMENTS)) {
6857 SetFlag(kTruncatingToInt32); 6857 SetFlag(kTruncatingToInt32);
6858 } 6858 }
6859 } 6859 }
6860 6860
6861 ElementsKind elements_kind_; 6861 ElementsKind elements_kind_;
6862 uint32_t index_offset_; 6862 uint32_t index_offset_;
6863 bool is_dehoisted_ : 1; 6863 bool is_dehoisted_ : 1;
6864 bool is_uninitialized_ : 1; 6864 bool is_uninitialized_ : 1;
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
7555 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7555 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7556 }; 7556 };
7557 7557
7558 7558
7559 #undef DECLARE_INSTRUCTION 7559 #undef DECLARE_INSTRUCTION
7560 #undef DECLARE_CONCRETE_INSTRUCTION 7560 #undef DECLARE_CONCRETE_INSTRUCTION
7561 7561
7562 } } // namespace v8::internal 7562 } } // namespace v8::internal
7563 7563
7564 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7564 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« src/api.cc ('K') | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698