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

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

Issue 13192004: arrange to create prototypes for generators (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Explicitly add constructor properties in generator.js 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 5912 matching lines...) Expand 10 before | Expand all | Expand 10 after
5923 } 5923 }
5924 5924
5925 5925
5926 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5926 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5927 ASSERT(ToRegister(instr->context()).is(esi)); 5927 ASSERT(ToRegister(instr->context()).is(esi));
5928 // Use the fast case closure allocation code that allocates in new 5928 // Use the fast case closure allocation code that allocates in new
5929 // space for nested functions that don't need literals cloning. 5929 // space for nested functions that don't need literals cloning.
5930 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 5930 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
5931 bool pretenure = instr->hydrogen()->pretenure(); 5931 bool pretenure = instr->hydrogen()->pretenure();
5932 if (!pretenure && shared_info->num_literals() == 0) { 5932 if (!pretenure && shared_info->num_literals() == 0) {
5933 FastNewClosureStub stub(shared_info->language_mode()); 5933 FastNewClosureStub stub(shared_info->language_mode(),
5934 shared_info->is_generator());
5934 __ push(Immediate(shared_info)); 5935 __ push(Immediate(shared_info));
5935 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5936 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5936 } else { 5937 } else {
5937 __ push(esi); 5938 __ push(esi);
5938 __ push(Immediate(shared_info)); 5939 __ push(Immediate(shared_info));
5939 __ push(Immediate(pretenure 5940 __ push(Immediate(pretenure
5940 ? factory()->true_value() 5941 ? factory()->true_value()
5941 : factory()->false_value())); 5942 : factory()->false_value()));
5942 CallRuntime(Runtime::kNewClosure, 3, instr); 5943 CallRuntime(Runtime::kNewClosure, 3, instr);
5943 } 5944 }
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
6299 FixedArray::kHeaderSize - kPointerSize)); 6300 FixedArray::kHeaderSize - kPointerSize));
6300 __ bind(&done); 6301 __ bind(&done);
6301 } 6302 }
6302 6303
6303 6304
6304 #undef __ 6305 #undef __
6305 6306
6306 } } // namespace v8::internal 6307 } } // namespace v8::internal
6307 6308
6308 #endif // V8_TARGET_ARCH_IA32 6309 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/generator.js ('K') | « src/ia32/full-codegen-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698