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

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

Issue 566008: Incorporate the arguments to the code generator constructors and their (Closed)
Patch Set: Incorporate the arguments to the code generator constructors and their... Created 10 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
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 __ mov(ecx, FieldOperand(edx, JSObject::kPropertiesOffset)); 96 __ mov(ecx, FieldOperand(edx, JSObject::kPropertiesOffset));
97 } 97 }
98 // Perform the store. 98 // Perform the store.
99 __ mov(FieldOperand(ecx, offset), eax); 99 __ mov(FieldOperand(ecx, offset), eax);
100 // Preserve value from write barrier in case it's needed. 100 // Preserve value from write barrier in case it's needed.
101 __ mov(ebx, eax); 101 __ mov(ebx, eax);
102 __ RecordWrite(ecx, offset, ebx, edi); 102 __ RecordWrite(ecx, offset, ebx, edi);
103 } 103 }
104 104
105 105
106 void FastCodeGenerator::Generate(FunctionLiteral* fun, CompilationInfo* info) { 106 void FastCodeGenerator::Generate(CompilationInfo* info) {
107 ASSERT(function_ == NULL);
108 ASSERT(info_ == NULL); 107 ASSERT(info_ == NULL);
109 function_ = fun;
110 info_ = info; 108 info_ = info;
111 109
112 // Save the caller's frame pointer and set up our own. 110 // Save the caller's frame pointer and set up our own.
113 Comment prologue_cmnt(masm(), ";; Prologue"); 111 Comment prologue_cmnt(masm(), ";; Prologue");
114 __ push(ebp); 112 __ push(ebp);
115 __ mov(ebp, esp); 113 __ mov(ebp, esp);
116 __ push(esi); // Context. 114 __ push(esi); // Context.
117 __ push(edi); // Closure. 115 __ push(edi); // Closure.
118 // Note that we keep a live register reference to esi (context) at this 116 // Note that we keep a live register reference to esi (context) at this
119 // point. 117 // point.
120 118
121 // Receiver (this) is allocated to edx if there are this properties. 119 // Receiver (this) is allocated to edx if there are this properties.
122 if (has_this_properties()) EmitReceiverMapCheck(); 120 if (has_this_properties()) EmitReceiverMapCheck();
123 121
124 VisitStatements(fun->body()); 122 VisitStatements(function()->body());
125 123
126 Comment return_cmnt(masm(), ";; Return(<undefined>)"); 124 Comment return_cmnt(masm(), ";; Return(<undefined>)");
127 __ mov(eax, Factory::undefined_value()); 125 __ mov(eax, Factory::undefined_value());
128 126
129 Comment epilogue_cmnt(masm(), ";; Epilogue"); 127 Comment epilogue_cmnt(masm(), ";; Epilogue");
130 __ mov(esp, ebp); 128 __ mov(esp, ebp);
131 __ pop(ebp); 129 __ pop(ebp);
132 __ ret((fun->scope()->num_parameters() + 1) * kPointerSize); 130 __ ret((scope()->num_parameters() + 1) * kPointerSize);
133 131
134 __ bind(&bailout_); 132 __ bind(&bailout_);
135 } 133 }
136 134
137 135
138 #undef __ 136 #undef __
139 137
140 138
141 } } // namespace v8::internal 139 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698