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 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 void SetUpScope(Scope* scope); | 2180 void SetUpScope(Scope* scope); |
2181 virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE; | 2181 virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE; |
2182 | 2182 |
2183 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE; | 2183 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE; |
2184 AST_NODE_LIST(DECLARE_VISIT) | 2184 AST_NODE_LIST(DECLARE_VISIT) |
2185 #undef DECLARE_VISIT | 2185 #undef DECLARE_VISIT |
2186 | 2186 |
2187 Type* ToType(Handle<Map> map) { return IC::MapToType<Type>(map, zone()); } | 2187 Type* ToType(Handle<Map> map) { return IC::MapToType<Type>(map, zone()); } |
2188 | 2188 |
2189 private: | 2189 private: |
| 2190 enum PropertyAccessType { LOAD, STORE }; |
| 2191 |
2190 // Helpers for flow graph construction. | 2192 // Helpers for flow graph construction. |
2191 enum GlobalPropertyAccess { | 2193 enum GlobalPropertyAccess { |
2192 kUseCell, | 2194 kUseCell, |
2193 kUseGeneric | 2195 kUseGeneric |
2194 }; | 2196 }; |
2195 GlobalPropertyAccess LookupGlobalProperty(Variable* var, | 2197 GlobalPropertyAccess LookupGlobalProperty(Variable* var, |
2196 LookupResult* lookup, | 2198 LookupResult* lookup, |
2197 bool is_store); | 2199 bool is_store); |
2198 | 2200 |
2199 void EnsureArgumentsArePushedForAccess(); | 2201 void EnsureArgumentsArePushedForAccess(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 void TraceInline(Handle<JSFunction> target, | 2246 void TraceInline(Handle<JSFunction> target, |
2245 Handle<JSFunction> caller, | 2247 Handle<JSFunction> caller, |
2246 const char* failure_reason); | 2248 const char* failure_reason); |
2247 | 2249 |
2248 void HandleGlobalVariableAssignment(Variable* var, | 2250 void HandleGlobalVariableAssignment(Variable* var, |
2249 HValue* value, | 2251 HValue* value, |
2250 BailoutId ast_id); | 2252 BailoutId ast_id); |
2251 | 2253 |
2252 void HandlePropertyAssignment(Assignment* expr); | 2254 void HandlePropertyAssignment(Assignment* expr); |
2253 void HandleCompoundAssignment(Assignment* expr); | 2255 void HandleCompoundAssignment(Assignment* expr); |
2254 void HandlePolymorphicLoadNamedField(BailoutId ast_id, | 2256 void HandlePolymorphicNamedFieldAccess(PropertyAccessType access_type, |
2255 BailoutId return_id, | 2257 BailoutId ast_id, |
2256 HValue* object, | 2258 BailoutId return_id, |
2257 SmallMapList* types, | 2259 HValue* object, |
2258 Handle<String> name); | 2260 HValue* value, |
| 2261 SmallMapList* types, |
| 2262 Handle<String> name); |
2259 | 2263 |
2260 void VisitTypedArrayInitialize(CallRuntime* expr); | 2264 void VisitTypedArrayInitialize(CallRuntime* expr); |
2261 | 2265 |
2262 bool IsCallNewArrayInlineable(CallNew* expr); | 2266 bool IsCallNewArrayInlineable(CallNew* expr); |
2263 void BuildInlinedCallNewArray(CallNew* expr); | 2267 void BuildInlinedCallNewArray(CallNew* expr); |
2264 | 2268 |
2265 void VisitDataViewInitialize(CallRuntime* expr); | 2269 void VisitDataViewInitialize(CallRuntime* expr); |
2266 | 2270 |
2267 enum PropertyAccessType { LOAD, STORE }; | |
2268 class PropertyAccessInfo { | 2271 class PropertyAccessInfo { |
2269 public: | 2272 public: |
2270 PropertyAccessInfo(HOptimizedGraphBuilder* builder, | 2273 PropertyAccessInfo(HOptimizedGraphBuilder* builder, |
2271 PropertyAccessType access_type, | 2274 PropertyAccessType access_type, |
2272 Type* type, | 2275 Type* type, |
2273 Handle<String> name) | 2276 Handle<String> name) |
2274 : lookup_(builder->isolate()), | 2277 : lookup_(builder->isolate()), |
2275 builder_(builder), | 2278 builder_(builder), |
2276 access_type_(access_type), | 2279 access_type_(access_type), |
2277 type_(type), | 2280 type_(type), |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 BailoutId return_id, | 2386 BailoutId return_id, |
2384 bool can_inline_accessor = true); | 2387 bool can_inline_accessor = true); |
2385 | 2388 |
2386 HInstruction* BuildStoreMonomorphic(PropertyAccessInfo* info, | 2389 HInstruction* BuildStoreMonomorphic(PropertyAccessInfo* info, |
2387 HValue* checked_object, | 2390 HValue* checked_object, |
2388 HValue* value, | 2391 HValue* value, |
2389 BailoutId ast_id, | 2392 BailoutId ast_id, |
2390 BailoutId return_id, | 2393 BailoutId return_id, |
2391 bool can_inline_accessor = true); | 2394 bool can_inline_accessor = true); |
2392 | 2395 |
2393 void HandlePolymorphicStoreNamedField(BailoutId assignment_id, | |
2394 BailoutId return_id, | |
2395 HValue* object, | |
2396 HValue* value, | |
2397 SmallMapList* types, | |
2398 Handle<String> name); | |
2399 void HandlePolymorphicCallNamed(Call* expr, | 2396 void HandlePolymorphicCallNamed(Call* expr, |
2400 HValue* receiver, | 2397 HValue* receiver, |
2401 SmallMapList* types, | 2398 SmallMapList* types, |
2402 Handle<String> name); | 2399 Handle<String> name); |
2403 void HandleLiteralCompareTypeof(CompareOperation* expr, | 2400 void HandleLiteralCompareTypeof(CompareOperation* expr, |
2404 Expression* sub_expr, | 2401 Expression* sub_expr, |
2405 Handle<String> check); | 2402 Handle<String> check); |
2406 void HandleLiteralCompareNil(CompareOperation* expr, | 2403 void HandleLiteralCompareNil(CompareOperation* expr, |
2407 Expression* sub_expr, | 2404 Expression* sub_expr, |
2408 NilValue nil); | 2405 NilValue nil); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2724 } | 2721 } |
2725 | 2722 |
2726 private: | 2723 private: |
2727 HGraphBuilder* builder_; | 2724 HGraphBuilder* builder_; |
2728 }; | 2725 }; |
2729 | 2726 |
2730 | 2727 |
2731 } } // namespace v8::internal | 2728 } } // namespace v8::internal |
2732 | 2729 |
2733 #endif // V8_HYDROGEN_H_ | 2730 #endif // V8_HYDROGEN_H_ |
OLD | NEW |