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

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

Issue 9187005: Enable optimization of top-level code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: fixed problem with eval code, addressed comments Created 8 years, 10 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
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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 2683
2684 2684
2685 void LCodeGen::DoOuterContext(LOuterContext* instr) { 2685 void LCodeGen::DoOuterContext(LOuterContext* instr) {
2686 Register context = ToRegister(instr->context()); 2686 Register context = ToRegister(instr->context());
2687 Register result = ToRegister(instr->result()); 2687 Register result = ToRegister(instr->result());
2688 __ mov(result, 2688 __ mov(result,
2689 Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2689 Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2690 } 2690 }
2691 2691
2692 2692
2693 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
2694 ASSERT(ToRegister(instr->InputAt(0)).is(esi));
2695 __ push(esi); // The context is the first argument.
2696 __ push(Immediate(instr->hydrogen()->pairs()));
2697 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags())));
2698 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
2699 }
2700
2701
2693 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { 2702 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
2694 Register context = ToRegister(instr->context()); 2703 Register context = ToRegister(instr->context());
2695 Register result = ToRegister(instr->result()); 2704 Register result = ToRegister(instr->result());
2696 __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX))); 2705 __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX)));
2697 } 2706 }
2698 2707
2699 2708
2700 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { 2709 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
2701 Register global = ToRegister(instr->global()); 2710 Register global = ToRegister(instr->global());
2702 Register result = ToRegister(instr->result()); 2711 Register result = ToRegister(instr->result());
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
4680 this, pointers, Safepoint::kLazyDeopt); 4689 this, pointers, Safepoint::kLazyDeopt);
4681 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4690 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4682 } 4691 }
4683 4692
4684 4693
4685 #undef __ 4694 #undef __
4686 4695
4687 } } // namespace v8::internal 4696 } } // namespace v8::internal
4688 4697
4689 #endif // V8_TARGET_ARCH_IA32 4698 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/compiler.cc ('K') | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698