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

Side by Side Diff: src/ast.h

Issue 6263001: Expose receiver check type in call type feedback. (Closed)
Patch Set: Created 9 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
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/type-info.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 }; 1261 };
1262 1262
1263 1263
1264 class Call: public Expression { 1264 class Call: public Expression {
1265 public: 1265 public:
1266 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos) 1266 Call(Expression* expression, ZoneList<Expression*>* arguments, int pos)
1267 : expression_(expression), 1267 : expression_(expression),
1268 arguments_(arguments), 1268 arguments_(arguments),
1269 pos_(pos), 1269 pos_(pos),
1270 is_monomorphic_(false), 1270 is_monomorphic_(false),
1271 check_type_(RECEIVER_MAP_CHECK),
1271 receiver_types_(NULL), 1272 receiver_types_(NULL),
1272 return_id_(GetNextId()) { 1273 return_id_(GetNextId()) {
1273 } 1274 }
1274 1275
1275 DECLARE_NODE_TYPE(Call) 1276 DECLARE_NODE_TYPE(Call)
1276 1277
1277 virtual bool IsInlineable() const; 1278 virtual bool IsInlineable() const;
1278 1279
1279 Expression* expression() const { return expression_; } 1280 Expression* expression() const { return expression_; }
1280 ZoneList<Expression*>* arguments() const { return arguments_; } 1281 ZoneList<Expression*>* arguments() const { return arguments_; }
1281 int position() { return pos_; } 1282 int position() { return pos_; }
1282 1283
1283 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 1284 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1284 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; } 1285 virtual ZoneMapList* GetReceiverTypes() { return receiver_types_; }
1285 virtual bool IsMonomorphic() { return is_monomorphic_; } 1286 virtual bool IsMonomorphic() { return is_monomorphic_; }
1287 CheckType check_type() const { return check_type_; }
1286 Handle<JSFunction> target() { return target_; } 1288 Handle<JSFunction> target() { return target_; }
1287 Handle<JSObject> holder() { return holder_; } 1289 Handle<JSObject> holder() { return holder_; }
1288 Handle<JSGlobalPropertyCell> cell() { return cell_; } 1290 Handle<JSGlobalPropertyCell> cell() { return cell_; }
1289 1291
1290 bool ComputeTarget(Handle<Map> type, Handle<String> name); 1292 bool ComputeTarget(Handle<Map> type, Handle<String> name);
1291 bool ComputeGlobalTarget(Handle<GlobalObject> global, Handle<String> name); 1293 bool ComputeGlobalTarget(Handle<GlobalObject> global, Handle<String> name);
1292 1294
1293 // Bailout support. 1295 // Bailout support.
1294 int ReturnId() const { return return_id_; } 1296 int ReturnId() const { return return_id_; }
1295 1297
1296 static Call* sentinel() { return &sentinel_; } 1298 static Call* sentinel() { return &sentinel_; }
1297 1299
1298 #ifdef DEBUG 1300 #ifdef DEBUG
1299 // Used to assert that the FullCodeGenerator records the return site. 1301 // Used to assert that the FullCodeGenerator records the return site.
1300 bool return_is_recorded_; 1302 bool return_is_recorded_;
1301 #endif 1303 #endif
1302 1304
1303 private: 1305 private:
1304 Expression* expression_; 1306 Expression* expression_;
1305 ZoneList<Expression*>* arguments_; 1307 ZoneList<Expression*>* arguments_;
1306 int pos_; 1308 int pos_;
1307 1309
1308 bool is_monomorphic_; 1310 bool is_monomorphic_;
1311 CheckType check_type_;
1309 ZoneMapList* receiver_types_; 1312 ZoneMapList* receiver_types_;
1310 Handle<JSFunction> target_; 1313 Handle<JSFunction> target_;
1311 Handle<JSObject> holder_; 1314 Handle<JSObject> holder_;
1312 Handle<JSGlobalPropertyCell> cell_; 1315 Handle<JSGlobalPropertyCell> cell_;
1313 1316
1314 int return_id_; 1317 int return_id_;
1315 1318
1316 static Call sentinel_; 1319 static Call sentinel_;
1317 }; 1320 };
1318 1321
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 AST_NODE_LIST(DEF_VISIT) 2167 AST_NODE_LIST(DEF_VISIT)
2165 #undef DEF_VISIT 2168 #undef DEF_VISIT
2166 2169
2167 private: 2170 private:
2168 bool stack_overflow_; 2171 bool stack_overflow_;
2169 }; 2172 };
2170 2173
2171 } } // namespace v8::internal 2174 } } // namespace v8::internal
2172 2175
2173 #endif // V8_AST_H_ 2176 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698