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

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

Issue 16801006: Allocate generator result objects before unwinding try handlers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Switch fallthrough for yield boxing Created 7 years, 6 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/full-codegen-arm.cc ('k') | src/full-codegen.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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void VisitDeclarations(ZoneList<Declaration*>* declarations); 403 void VisitDeclarations(ZoneList<Declaration*>* declarations);
404 void DeclareModules(Handle<FixedArray> descriptions); 404 void DeclareModules(Handle<FixedArray> descriptions);
405 void DeclareGlobals(Handle<FixedArray> pairs); 405 void DeclareGlobals(Handle<FixedArray> pairs);
406 int DeclareGlobalsFlags(); 406 int DeclareGlobalsFlags();
407 407
408 // Generate code to allocate all (including nested) modules and contexts. 408 // Generate code to allocate all (including nested) modules and contexts.
409 // Because of recursive linking and the presence of module alias declarations, 409 // Because of recursive linking and the presence of module alias declarations,
410 // this has to be a separate pass _before_ populating or executing any module. 410 // this has to be a separate pass _before_ populating or executing any module.
411 void AllocateModules(ZoneList<Declaration*>* declarations); 411 void AllocateModules(ZoneList<Declaration*>* declarations);
412 412
413 // Generator code to return a fresh iterator result object. The "value" 413 // Generate code to create an iterator result object. The "value" property is
414 // property is set to a value popped from the stack, and "done" is set 414 // set to a value popped from the stack, and "done" is set according to the
415 // according to the argument. 415 // argument. The result object is left in the result register.
416 void EmitReturnIteratorResult(bool done); 416 void EmitCreateIteratorResult(bool done);
417 417
418 // Try to perform a comparison as a fast inlined literal compare if 418 // Try to perform a comparison as a fast inlined literal compare if
419 // the operands allow it. Returns true if the compare operations 419 // the operands allow it. Returns true if the compare operations
420 // has been matched and all code generated; false otherwise. 420 // has been matched and all code generated; false otherwise.
421 bool TryLiteralCompare(CompareOperation* compare); 421 bool TryLiteralCompare(CompareOperation* compare);
422 422
423 // Platform-specific code for comparing the type of a value with 423 // Platform-specific code for comparing the type of a value with
424 // a given literal string. 424 // a given literal string.
425 void EmitLiteralCompareTypeof(Expression* expr, 425 void EmitLiteralCompareTypeof(Expression* expr,
426 Expression* sub_expr, 426 Expression* sub_expr,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Label* back_edge_target); 465 Label* back_edge_target);
466 // Record the OSR AST id corresponding to a back edge in the code. 466 // Record the OSR AST id corresponding to a back edge in the code.
467 void RecordBackEdge(BailoutId osr_ast_id); 467 void RecordBackEdge(BailoutId osr_ast_id);
468 // Emit a table of back edge ids, pcs and loop depths into the code stream. 468 // Emit a table of back edge ids, pcs and loop depths into the code stream.
469 // Return the offset of the start of the table. 469 // Return the offset of the start of the table.
470 unsigned EmitBackEdgeTable(); 470 unsigned EmitBackEdgeTable();
471 471
472 void EmitProfilingCounterDecrement(int delta); 472 void EmitProfilingCounterDecrement(int delta);
473 void EmitProfilingCounterReset(); 473 void EmitProfilingCounterReset();
474 474
475 // Emit code to pop values from the stack associated with nested statements
476 // like try/catch, try/finally, etc, running the finallies and unwinding the
477 // handlers as needed.
478 void EmitUnwindBeforeReturn();
479
475 // Platform-specific return sequence 480 // Platform-specific return sequence
476 void EmitReturnSequence(); 481 void EmitReturnSequence();
477 482
478 // Platform-specific code sequences for calls 483 // Platform-specific code sequences for calls
479 void EmitCallWithStub(Call* expr, CallFunctionFlags flags); 484 void EmitCallWithStub(Call* expr, CallFunctionFlags flags);
480 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode); 485 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode);
481 void EmitKeyedCallWithIC(Call* expr, Expression* key); 486 void EmitKeyedCallWithIC(Call* expr, Expression* key);
482 487
483 // Platform-specific code for inline runtime calls. 488 // Platform-specific code for inline runtime calls.
484 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id); 489 InlineFunctionGenerator FindInlineFunctionGenerator(Runtime::FunctionId id);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 } 878 }
874 879
875 private: 880 private:
876 Zone* zone_; 881 Zone* zone_;
877 }; 882 };
878 883
879 884
880 } } // namespace v8::internal 885 } } // namespace v8::internal
881 886
882 #endif // V8_FULL_CODEGEN_H_ 887 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698