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

Side by Side Diff: src/arm/lithium-codegen-arm.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 2855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 2866
2867 2867
2868 void LCodeGen::DoOuterContext(LOuterContext* instr) { 2868 void LCodeGen::DoOuterContext(LOuterContext* instr) {
2869 Register context = ToRegister(instr->context()); 2869 Register context = ToRegister(instr->context());
2870 Register result = ToRegister(instr->result()); 2870 Register result = ToRegister(instr->result());
2871 __ ldr(result, 2871 __ ldr(result,
2872 MemOperand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2872 MemOperand(context, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2873 } 2873 }
2874 2874
2875 2875
2876 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
2877 __ push(cp); // The context is the first argument.
2878 __ LoadHeapObject(scratch0(), instr->hydrogen()->pairs());
2879 __ push(scratch0());
2880 __ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags())));
2881 __ push(scratch0());
2882 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
2883 }
2884
2885
2876 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { 2886 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
2877 Register result = ToRegister(instr->result()); 2887 Register result = ToRegister(instr->result());
2878 __ ldr(result, ContextOperand(cp, Context::GLOBAL_INDEX)); 2888 __ ldr(result, ContextOperand(cp, Context::GLOBAL_INDEX));
2879 } 2889 }
2880 2890
2881 2891
2882 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { 2892 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
2883 Register global = ToRegister(instr->global()); 2893 Register global = ToRegister(instr->global());
2884 Register result = ToRegister(instr->result()); 2894 Register result = ToRegister(instr->result());
2885 __ ldr(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset)); 2895 __ ldr(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset));
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
4797 ASSERT(osr_pc_offset_ == -1); 4807 ASSERT(osr_pc_offset_ == -1);
4798 osr_pc_offset_ = masm()->pc_offset(); 4808 osr_pc_offset_ = masm()->pc_offset();
4799 } 4809 }
4800 4810
4801 4811
4802 4812
4803 4813
4804 #undef __ 4814 #undef __
4805 4815
4806 } } // namespace v8::internal 4816 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/ast.h » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698