| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 Node* BuildArgumentsObject(Variable* arguments); | 261 Node* BuildArgumentsObject(Variable* arguments); |
| 262 | 262 |
| 263 // Builder to create an array of rest parameters if used | 263 // Builder to create an array of rest parameters if used |
| 264 Node* BuildRestArgumentsArray(Variable* rest, int index); | 264 Node* BuildRestArgumentsArray(Variable* rest, int index); |
| 265 | 265 |
| 266 // Builder that assigns to the .this_function internal variable if needed. | 266 // Builder that assigns to the .this_function internal variable if needed. |
| 267 Node* BuildThisFunctionVar(Variable* this_function_var); | 267 Node* BuildThisFunctionVar(Variable* this_function_var); |
| 268 | 268 |
| 269 // Builders for variable load and assignment. | 269 // Builders for variable load and assignment. |
| 270 Node* BuildVariableAssignment(Variable* variable, Node* value, | 270 Node* BuildVariableAssignment(Variable* variable, Node* value, |
| 271 Token::Value op, BailoutId bailout_id, | 271 Token::Value op, |
| 272 const ResolvedFeedbackSlot& slot, |
| 273 BailoutId bailout_id, |
| 272 FrameStateBeforeAndAfter& states, | 274 FrameStateBeforeAndAfter& states, |
| 273 OutputFrameStateCombine framestate_combine = | 275 OutputFrameStateCombine framestate_combine = |
| 274 OutputFrameStateCombine::Ignore()); | 276 OutputFrameStateCombine::Ignore()); |
| 275 Node* BuildVariableDelete(Variable* variable, BailoutId bailout_id, | 277 Node* BuildVariableDelete(Variable* variable, BailoutId bailout_id, |
| 276 OutputFrameStateCombine framestate_combine); | 278 OutputFrameStateCombine framestate_combine); |
| 277 Node* BuildVariableLoad(Variable* variable, BailoutId bailout_id, | 279 Node* BuildVariableLoad(Variable* variable, BailoutId bailout_id, |
| 278 FrameStateBeforeAndAfter& states, | 280 FrameStateBeforeAndAfter& states, |
| 279 const ResolvedFeedbackSlot& feedback, | 281 const ResolvedFeedbackSlot& feedback, |
| 280 OutputFrameStateCombine framestate_combine, | 282 OutputFrameStateCombine framestate_combine, |
| 281 ContextualMode mode = CONTEXTUAL); | 283 ContextualMode mode = CONTEXTUAL); |
| 282 | 284 |
| 283 // Builders for property loads and stores. | 285 // Builders for property loads and stores. |
| 284 Node* BuildKeyedLoad(Node* receiver, Node* key, | 286 Node* BuildKeyedLoad(Node* receiver, Node* key, |
| 285 const ResolvedFeedbackSlot& feedback); | 287 const ResolvedFeedbackSlot& feedback); |
| 286 Node* BuildNamedLoad(Node* receiver, Handle<Name> name, | 288 Node* BuildNamedLoad(Node* receiver, Handle<Name> name, |
| 287 const ResolvedFeedbackSlot& feedback, | 289 const ResolvedFeedbackSlot& feedback, |
| 288 ContextualMode mode = NOT_CONTEXTUAL); | 290 ContextualMode mode = NOT_CONTEXTUAL); |
| 289 Node* BuildKeyedStore(Node* receiver, Node* key, Node* value, | 291 Node* BuildKeyedStore(Node* receiver, Node* key, Node* value, |
| 292 const ResolvedFeedbackSlot& feedback, |
| 290 TypeFeedbackId id); | 293 TypeFeedbackId id); |
| 291 Node* BuildNamedStore(Node* receiver, Handle<Name>, Node* value, | 294 Node* BuildNamedStore(Node* receiver, Handle<Name>, Node* value, |
| 295 const ResolvedFeedbackSlot& feedback, |
| 292 TypeFeedbackId id); | 296 TypeFeedbackId id); |
| 293 | 297 |
| 294 // Builders for super property loads and stores. | 298 // Builders for super property loads and stores. |
| 295 Node* BuildKeyedSuperStore(Node* receiver, Node* home_object, Node* key, | 299 Node* BuildKeyedSuperStore(Node* receiver, Node* home_object, Node* key, |
| 296 Node* value, TypeFeedbackId id); | 300 Node* value, TypeFeedbackId id); |
| 297 Node* BuildNamedSuperStore(Node* receiver, Node* home_object, | 301 Node* BuildNamedSuperStore(Node* receiver, Node* home_object, |
| 298 Handle<Name> name, Node* value, TypeFeedbackId id); | 302 Handle<Name> name, Node* value, TypeFeedbackId id); |
| 299 Node* BuildNamedSuperLoad(Node* receiver, Node* home_object, | 303 Node* BuildNamedSuperLoad(Node* receiver, Node* home_object, |
| 300 Handle<Name> name, | 304 Handle<Name> name, |
| 301 const ResolvedFeedbackSlot& feedback); | 305 const ResolvedFeedbackSlot& feedback); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 313 Node* BuildLoadExternal(ExternalReference ref, MachineType type); | 317 Node* BuildLoadExternal(ExternalReference ref, MachineType type); |
| 314 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); | 318 Node* BuildStoreExternal(ExternalReference ref, MachineType type, Node* val); |
| 315 | 319 |
| 316 // Builders for automatic type conversion. | 320 // Builders for automatic type conversion. |
| 317 Node* BuildToBoolean(Node* input); | 321 Node* BuildToBoolean(Node* input); |
| 318 Node* BuildToName(Node* input, BailoutId bailout_id); | 322 Node* BuildToName(Node* input, BailoutId bailout_id); |
| 319 Node* BuildToObject(Node* input, BailoutId bailout_id); | 323 Node* BuildToObject(Node* input, BailoutId bailout_id); |
| 320 | 324 |
| 321 // Builder for adding the [[HomeObject]] to a value if the value came from a | 325 // Builder for adding the [[HomeObject]] to a value if the value came from a |
| 322 // function literal and needs a home object. Do nothing otherwise. | 326 // function literal and needs a home object. Do nothing otherwise. |
| 323 Node* BuildSetHomeObject(Node* value, Node* home_object, Expression* expr); | 327 Node* BuildSetHomeObject(Node* value, Node* home_object, Expression* expr, |
| 328 const ResolvedFeedbackSlot& slot); |
| 324 | 329 |
| 325 // Builders for error reporting at runtime. | 330 // Builders for error reporting at runtime. |
| 326 Node* BuildThrowError(Node* exception, BailoutId bailout_id); | 331 Node* BuildThrowError(Node* exception, BailoutId bailout_id); |
| 327 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); | 332 Node* BuildThrowReferenceError(Variable* var, BailoutId bailout_id); |
| 328 Node* BuildThrowConstAssignError(BailoutId bailout_id); | 333 Node* BuildThrowConstAssignError(BailoutId bailout_id); |
| 329 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); | 334 Node* BuildThrowStaticPrototypeError(BailoutId bailout_id); |
| 330 | 335 |
| 331 // Builders for dynamic hole-checks at runtime. | 336 // Builders for dynamic hole-checks at runtime. |
| 332 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole); | 337 Node* BuildHoleCheckSilent(Node* value, Node* for_hole, Node* not_hole); |
| 333 Node* BuildHoleCheckThrow(Node* value, Variable* var, Node* not_hole, | 338 Node* BuildHoleCheckThrow(Node* value, Variable* var, Node* not_hole, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 void VisitTypeof(UnaryOperation* expr); | 383 void VisitTypeof(UnaryOperation* expr); |
| 379 void VisitNot(UnaryOperation* expr); | 384 void VisitNot(UnaryOperation* expr); |
| 380 | 385 |
| 381 // Dispatched from VisitBinaryOperation. | 386 // Dispatched from VisitBinaryOperation. |
| 382 void VisitComma(BinaryOperation* expr); | 387 void VisitComma(BinaryOperation* expr); |
| 383 void VisitLogicalExpression(BinaryOperation* expr); | 388 void VisitLogicalExpression(BinaryOperation* expr); |
| 384 void VisitArithmeticExpression(BinaryOperation* expr); | 389 void VisitArithmeticExpression(BinaryOperation* expr); |
| 385 | 390 |
| 386 // Dispatched from VisitForInStatement. | 391 // Dispatched from VisitForInStatement. |
| 387 void VisitForInAssignment(Expression* expr, Node* value, | 392 void VisitForInAssignment(Expression* expr, Node* value, |
| 393 const ResolvedFeedbackSlot& slot, |
| 388 BailoutId bailout_id); | 394 BailoutId bailout_id); |
| 389 | 395 |
| 390 // Dispatched from VisitClassLiteral. | 396 // Dispatched from VisitClassLiteral. |
| 391 void VisitClassLiteralContents(ClassLiteral* expr); | 397 void VisitClassLiteralContents(ClassLiteral* expr); |
| 392 | 398 |
| 393 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 399 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
| 394 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); | 400 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); |
| 395 }; | 401 }; |
| 396 | 402 |
| 397 | 403 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 | 538 |
| 533 // Prepare environment to be used as loop header. | 539 // Prepare environment to be used as loop header. |
| 534 void PrepareForLoop(BitVector* assigned, bool is_osr = false); | 540 void PrepareForLoop(BitVector* assigned, bool is_osr = false); |
| 535 }; | 541 }; |
| 536 | 542 |
| 537 } // namespace compiler | 543 } // namespace compiler |
| 538 } // namespace internal | 544 } // namespace internal |
| 539 } // namespace v8 | 545 } // namespace v8 |
| 540 | 546 |
| 541 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ | 547 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ |
| OLD | NEW |