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

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

Issue 6240012: Optimize calls to object literal properties that are initialized with a funct... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 int length_; 3004 int length_;
3005 Handle<FixedArray> constant_elements_; 3005 Handle<FixedArray> constant_elements_;
3006 }; 3006 };
3007 3007
3008 3008
3009 class HObjectLiteral: public HMaterializedLiteral { 3009 class HObjectLiteral: public HMaterializedLiteral {
3010 public: 3010 public:
3011 HObjectLiteral(Handle<FixedArray> constant_properties, 3011 HObjectLiteral(Handle<FixedArray> constant_properties,
3012 bool fast_elements, 3012 bool fast_elements,
3013 int literal_index, 3013 int literal_index,
3014 int depth) 3014 int depth,
3015 bool has_function)
3015 : HMaterializedLiteral(literal_index, depth), 3016 : HMaterializedLiteral(literal_index, depth),
3016 constant_properties_(constant_properties), 3017 constant_properties_(constant_properties),
3017 fast_elements_(fast_elements) {} 3018 fast_elements_(fast_elements),
3019 has_function_(has_function) {}
3018 3020
3019 Handle<FixedArray> constant_properties() const { 3021 Handle<FixedArray> constant_properties() const {
3020 return constant_properties_; 3022 return constant_properties_;
3021 } 3023 }
3022 bool fast_elements() const { return fast_elements_; } 3024 bool fast_elements() const { return fast_elements_; }
3025 bool has_function() const { return has_function_; }
3023 3026
3024 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal") 3027 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal")
3025 3028
3026 private: 3029 private:
3027 Handle<FixedArray> constant_properties_; 3030 Handle<FixedArray> constant_properties_;
3028 bool fast_elements_; 3031 bool fast_elements_;
3032 bool has_function_;
3029 }; 3033 };
3030 3034
3031 3035
3032 class HRegExpLiteral: public HMaterializedLiteral { 3036 class HRegExpLiteral: public HMaterializedLiteral {
3033 public: 3037 public:
3034 HRegExpLiteral(Handle<String> pattern, 3038 HRegExpLiteral(Handle<String> pattern,
3035 Handle<String> flags, 3039 Handle<String> flags,
3036 int literal_index) 3040 int literal_index)
3037 : HMaterializedLiteral(literal_index, 0), 3041 : HMaterializedLiteral(literal_index, 0),
3038 pattern_(pattern), 3042 pattern_(pattern),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 HValue* object() const { return left(); } 3108 HValue* object() const { return left(); }
3105 HValue* key() const { return right(); } 3109 HValue* key() const { return right(); }
3106 }; 3110 };
3107 3111
3108 #undef DECLARE_INSTRUCTION 3112 #undef DECLARE_INSTRUCTION
3109 #undef DECLARE_CONCRETE_INSTRUCTION 3113 #undef DECLARE_CONCRETE_INSTRUCTION
3110 3114
3111 } } // namespace v8::internal 3115 } } // namespace v8::internal
3112 3116
3113 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3117 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698