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

Side by Side Diff: src/ast.h

Issue 9304001: Implement inlining of constructor calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed moar comments by Vyacheslav Egorov. Created 8 years, 9 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/arm/lithium-codegen-arm.cc ('k') | src/ast.cc » ('j') | 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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 1317
1318 class CallNew: public Expression { 1318 class CallNew: public Expression {
1319 public: 1319 public:
1320 CallNew(Isolate* isolate, 1320 CallNew(Isolate* isolate,
1321 Expression* expression, 1321 Expression* expression,
1322 ZoneList<Expression*>* arguments, 1322 ZoneList<Expression*>* arguments,
1323 int pos) 1323 int pos)
1324 : Expression(isolate), 1324 : Expression(isolate),
1325 expression_(expression), 1325 expression_(expression),
1326 arguments_(arguments), 1326 arguments_(arguments),
1327 pos_(pos) { } 1327 pos_(pos),
1328 is_monomorphic_(false),
1329 return_id_(GetNextId(isolate)) { }
1328 1330
1329 DECLARE_NODE_TYPE(CallNew) 1331 DECLARE_NODE_TYPE(CallNew)
1330 1332
1331 virtual bool IsInlineable() const; 1333 virtual bool IsInlineable() const;
1332 1334
1333 Expression* expression() const { return expression_; } 1335 Expression* expression() const { return expression_; }
1334 ZoneList<Expression*>* arguments() const { return arguments_; } 1336 ZoneList<Expression*>* arguments() const { return arguments_; }
1335 virtual int position() const { return pos_; } 1337 virtual int position() const { return pos_; }
1336 1338
1339 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1340 virtual bool IsMonomorphic() { return is_monomorphic_; }
1341 Handle<JSFunction> target() { return target_; }
1342
1343 // Bailout support.
1344 int ReturnId() const { return return_id_; }
1345
1337 private: 1346 private:
1338 Expression* expression_; 1347 Expression* expression_;
1339 ZoneList<Expression*>* arguments_; 1348 ZoneList<Expression*>* arguments_;
1340 int pos_; 1349 int pos_;
1350
1351 bool is_monomorphic_;
1352 Handle<JSFunction> target_;
1353
1354 int return_id_;
1341 }; 1355 };
1342 1356
1343 1357
1344 // The CallRuntime class does not represent any official JavaScript 1358 // The CallRuntime class does not represent any official JavaScript
1345 // language construct. Instead it is used to call a C or JS function 1359 // language construct. Instead it is used to call a C or JS function
1346 // with a set of arguments. This is used from the builtins that are 1360 // with a set of arguments. This is used from the builtins that are
1347 // implemented in JavaScript (see "v8natives.js"). 1361 // implemented in JavaScript (see "v8natives.js").
1348 class CallRuntime: public Expression { 1362 class CallRuntime: public Expression {
1349 public: 1363 public:
1350 CallRuntime(Isolate* isolate, 1364 CallRuntime(Isolate* isolate,
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 2217
2204 private: 2218 private:
2205 Isolate* isolate_; 2219 Isolate* isolate_;
2206 bool stack_overflow_; 2220 bool stack_overflow_;
2207 }; 2221 };
2208 2222
2209 2223
2210 } } // namespace v8::internal 2224 } } // namespace v8::internal
2211 2225
2212 #endif // V8_AST_H_ 2226 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698