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

Side by Side Diff: src/x64/lithium-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5458 } 5458 }
5459 } 5459 }
5460 5460
5461 5461
5462 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) { 5462 void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
5463 // Use the fast case closure allocation code that allocates in new 5463 // Use the fast case closure allocation code that allocates in new
5464 // space for nested functions that don't need literals cloning. 5464 // space for nested functions that don't need literals cloning.
5465 Handle<SharedFunctionInfo> shared_info = instr->shared_info(); 5465 Handle<SharedFunctionInfo> shared_info = instr->shared_info();
5466 bool pretenure = instr->hydrogen()->pretenure(); 5466 bool pretenure = instr->hydrogen()->pretenure();
5467 if (!pretenure && shared_info->num_literals() == 0) { 5467 if (!pretenure && shared_info->num_literals() == 0) {
5468 FastNewClosureStub stub(shared_info->language_mode()); 5468 FastNewClosureStub stub(shared_info->language_mode(),
5469 shared_info->is_generator());
5469 __ Push(shared_info); 5470 __ Push(shared_info);
5470 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5471 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5471 } else { 5472 } else {
5472 __ push(rsi); 5473 __ push(rsi);
5473 __ Push(shared_info); 5474 __ Push(shared_info);
5474 __ PushRoot(pretenure ? 5475 __ PushRoot(pretenure ?
5475 Heap::kTrueValueRootIndex : 5476 Heap::kTrueValueRootIndex :
5476 Heap::kFalseValueRootIndex); 5477 Heap::kFalseValueRootIndex);
5477 CallRuntime(Runtime::kNewClosure, 3, instr); 5478 CallRuntime(Runtime::kNewClosure, 3, instr);
5478 } 5479 }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
5847 FixedArray::kHeaderSize - kPointerSize)); 5848 FixedArray::kHeaderSize - kPointerSize));
5848 __ bind(&done); 5849 __ bind(&done);
5849 } 5850 }
5850 5851
5851 5852
5852 #undef __ 5853 #undef __
5853 5854
5854 } } // namespace v8::internal 5855 } } // namespace v8::internal
5855 5856
5856 #endif // V8_TARGET_ARCH_X64 5857 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/generator.js ('K') | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698