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

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

Issue 18059005: Make sure HCallNewArray uses right ElementsKind (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/hydrogen.cc ('k') | no next file » | 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 2470 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 HValue* context() { return first(); } 2481 HValue* context() { return first(); }
2482 HValue* constructor() { return second(); } 2482 HValue* constructor() { return second(); }
2483 2483
2484 DECLARE_CONCRETE_INSTRUCTION(CallNew) 2484 DECLARE_CONCRETE_INSTRUCTION(CallNew)
2485 }; 2485 };
2486 2486
2487 2487
2488 class HCallNewArray: public HCallNew { 2488 class HCallNewArray: public HCallNew {
2489 public: 2489 public:
2490 HCallNewArray(HValue* context, HValue* constructor, int argument_count, 2490 HCallNewArray(HValue* context, HValue* constructor, int argument_count,
2491 Handle<Cell> type_cell) 2491 Handle<Cell> type_cell, ElementsKind elements_kind)
2492 : HCallNew(context, constructor, argument_count), 2492 : HCallNew(context, constructor, argument_count),
2493 type_cell_(type_cell) { 2493 elements_kind_(elements_kind),
2494 elements_kind_ = static_cast<ElementsKind>( 2494 type_cell_(type_cell) {}
2495 Smi::cast(type_cell->value())->value());
2496 }
2497 2495
2498 Handle<Cell> property_cell() const { 2496 Handle<Cell> property_cell() const {
2499 return type_cell_; 2497 return type_cell_;
2500 } 2498 }
2501 2499
2502 ElementsKind elements_kind() const { return elements_kind_; } 2500 ElementsKind elements_kind() const { return elements_kind_; }
2503 2501
2504 DECLARE_CONCRETE_INSTRUCTION(CallNewArray) 2502 DECLARE_CONCRETE_INSTRUCTION(CallNewArray)
2505 2503
2506 private: 2504 private:
(...skipping 4134 matching lines...) Expand 10 before | Expand all | Expand 10 after
6641 virtual bool IsDeletable() const { return true; } 6639 virtual bool IsDeletable() const { return true; }
6642 }; 6640 };
6643 6641
6644 6642
6645 #undef DECLARE_INSTRUCTION 6643 #undef DECLARE_INSTRUCTION
6646 #undef DECLARE_CONCRETE_INSTRUCTION 6644 #undef DECLARE_CONCRETE_INSTRUCTION
6647 6645
6648 } } // namespace v8::internal 6646 } } // namespace v8::internal
6649 6647
6650 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6648 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698