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

Side by Side Diff: src/full-codegen.cc

Issue 14066016: Generators can resume (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Use Abort() instead of int3() Created 7 years, 8 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 | « src/full-codegen.h ('k') | src/generator.js » ('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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) { 916 void FullCodeGenerator::EmitInlineRuntimeCall(CallRuntime* expr) {
917 const Runtime::Function* function = expr->function(); 917 const Runtime::Function* function = expr->function();
918 ASSERT(function != NULL); 918 ASSERT(function != NULL);
919 ASSERT(function->intrinsic_type == Runtime::INLINE); 919 ASSERT(function->intrinsic_type == Runtime::INLINE);
920 InlineFunctionGenerator generator = 920 InlineFunctionGenerator generator =
921 FindInlineFunctionGenerator(function->function_id); 921 FindInlineFunctionGenerator(function->function_id);
922 ((*this).*(generator))(expr); 922 ((*this).*(generator))(expr);
923 } 923 }
924 924
925 925
926 void FullCodeGenerator::EmitGeneratorSend(CallRuntime* expr) {
927 ZoneList<Expression*>* args = expr->arguments();
928 ASSERT(args->length() == 2);
929 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::SEND);
930 }
931
932
933 void FullCodeGenerator::EmitGeneratorThrow(CallRuntime* expr) {
934 ZoneList<Expression*>* args = expr->arguments();
935 ASSERT(args->length() == 2);
936 EmitGeneratorResume(args->at(0), args->at(1), JSGeneratorObject::THROW);
937 }
938
939
926 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) { 940 void FullCodeGenerator::VisitBinaryOperation(BinaryOperation* expr) {
927 switch (expr->op()) { 941 switch (expr->op()) {
928 case Token::COMMA: 942 case Token::COMMA:
929 return VisitComma(expr); 943 return VisitComma(expr);
930 case Token::OR: 944 case Token::OR:
931 case Token::AND: 945 case Token::AND:
932 return VisitLogicalExpression(expr); 946 return VisitLogicalExpression(expr);
933 default: 947 default:
934 return VisitArithmeticExpression(expr); 948 return VisitArithmeticExpression(expr);
935 } 949 }
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 } 1600 }
1587 1601
1588 return false; 1602 return false;
1589 } 1603 }
1590 1604
1591 1605
1592 #undef __ 1606 #undef __
1593 1607
1594 1608
1595 } } // namespace v8::internal 1609 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698