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

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

Issue 13192004: arrange to create prototypes for generators (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Generators JS runtime to separate file, to avoid overhead when no --harmony-generators 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
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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 // Use the fast case closure allocation code that allocates in new 1206 // Use the fast case closure allocation code that allocates in new
1207 // space for nested functions that don't need literals cloning. If 1207 // space for nested functions that don't need literals cloning. If
1208 // we're running with the --always-opt or the --prepare-always-opt 1208 // we're running with the --always-opt or the --prepare-always-opt
1209 // flag, we need to use the runtime function so that the new function 1209 // flag, we need to use the runtime function so that the new function
1210 // we are creating here gets a chance to have its code optimized and 1210 // we are creating here gets a chance to have its code optimized and
1211 // doesn't just get a copy of the existing unoptimized code. 1211 // doesn't just get a copy of the existing unoptimized code.
1212 if (!FLAG_always_opt && 1212 if (!FLAG_always_opt &&
1213 !FLAG_prepare_always_opt && 1213 !FLAG_prepare_always_opt &&
1214 !pretenure && 1214 !pretenure &&
1215 scope()->is_function_scope() && 1215 scope()->is_function_scope() &&
1216 !info->is_generator() &&
1216 info->num_literals() == 0) { 1217 info->num_literals() == 0) {
1217 FastNewClosureStub stub(info->language_mode()); 1218 FastNewClosureStub stub(info->language_mode());
1218 __ push(Immediate(info)); 1219 __ push(Immediate(info));
1219 __ CallStub(&stub); 1220 __ CallStub(&stub);
1220 } else { 1221 } else {
1221 __ push(esi); 1222 __ push(esi);
1222 __ push(Immediate(info)); 1223 __ push(Immediate(info));
1223 __ push(Immediate(pretenure 1224 __ push(Immediate(pretenure
1224 ? isolate()->factory()->true_value() 1225 ? isolate()->factory()->true_value()
1225 : isolate()->factory()->false_value())); 1226 : isolate()->factory()->false_value()));
(...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after
4550 *stack_depth = 0; 4551 *stack_depth = 0;
4551 *context_length = 0; 4552 *context_length = 0;
4552 return previous_; 4553 return previous_;
4553 } 4554 }
4554 4555
4555 #undef __ 4556 #undef __
4556 4557
4557 } } // namespace v8::internal 4558 } } // namespace v8::internal
4558 4559
4559 #endif // V8_TARGET_ARCH_IA32 4560 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698