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 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2345 DECLARE_CONCRETE_INSTRUCTION(CallNew) | 2345 DECLARE_CONCRETE_INSTRUCTION(CallNew) |
2346 }; | 2346 }; |
2347 | 2347 |
2348 | 2348 |
2349 class HCallNewArray: public HCallNew { | 2349 class HCallNewArray: public HCallNew { |
2350 public: | 2350 public: |
2351 HCallNewArray(HValue* context, HValue* constructor, int argument_count, | 2351 HCallNewArray(HValue* context, HValue* constructor, int argument_count, |
2352 Handle<JSGlobalPropertyCell> type_cell) | 2352 Handle<JSGlobalPropertyCell> type_cell) |
2353 : HCallNew(context, constructor, argument_count), | 2353 : HCallNew(context, constructor, argument_count), |
2354 type_cell_(type_cell) { | 2354 type_cell_(type_cell) { |
2355 kind_ = static_cast<ElementsKind>(Smi::cast(type_cell->value())->value()); | |
2355 } | 2356 } |
2356 | 2357 |
2357 Handle<JSGlobalPropertyCell> property_cell() const { | 2358 Handle<JSGlobalPropertyCell> property_cell() const { |
2358 return type_cell_; | 2359 return type_cell_; |
2359 } | 2360 } |
2360 | 2361 |
2362 ElementsKind kind() const { return kind_; } | |
Michael Starzinger
2013/05/08 10:40:30
There are so many "kind"s in V8 already, can we re
| |
2363 | |
2361 DECLARE_CONCRETE_INSTRUCTION(CallNewArray) | 2364 DECLARE_CONCRETE_INSTRUCTION(CallNewArray) |
2362 | 2365 |
2363 private: | 2366 private: |
2367 ElementsKind kind_; | |
2364 Handle<JSGlobalPropertyCell> type_cell_; | 2368 Handle<JSGlobalPropertyCell> type_cell_; |
2365 }; | 2369 }; |
2366 | 2370 |
2367 | 2371 |
2368 class HCallRuntime: public HCall<1> { | 2372 class HCallRuntime: public HCall<1> { |
2369 public: | 2373 public: |
2370 HCallRuntime(HValue* context, | 2374 HCallRuntime(HValue* context, |
2371 Handle<String> name, | 2375 Handle<String> name, |
2372 const Runtime::Function* c_function, | 2376 const Runtime::Function* c_function, |
2373 int argument_count) | 2377 int argument_count) |
(...skipping 4148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6522 virtual bool IsDeletable() const { return true; } | 6526 virtual bool IsDeletable() const { return true; } |
6523 }; | 6527 }; |
6524 | 6528 |
6525 | 6529 |
6526 #undef DECLARE_INSTRUCTION | 6530 #undef DECLARE_INSTRUCTION |
6527 #undef DECLARE_CONCRETE_INSTRUCTION | 6531 #undef DECLARE_CONCRETE_INSTRUCTION |
6528 | 6532 |
6529 } } // namespace v8::internal | 6533 } } // namespace v8::internal |
6530 | 6534 |
6531 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6535 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |