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

Side by Side Diff: src/full-codegen.cc

Issue 4654002: Move common static helpers from codegen to the macro-assembler files. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/codegen-ia32.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return false; 294 return false;
295 } 295 }
296 296
297 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 297 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
298 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); 298 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
299 info->SetCode(code); // may be an empty handle. 299 info->SetCode(code); // may be an empty handle.
300 return !code.is_null(); 300 return !code.is_null();
301 } 301 }
302 302
303 303
304 MemOperand FullCodeGenerator::ContextOperand(Register context, int index) {
305 return CodeGenerator::ContextOperand(context, index);
306 }
307
308
309 int FullCodeGenerator::SlotOffset(Slot* slot) { 304 int FullCodeGenerator::SlotOffset(Slot* slot) {
310 ASSERT(slot != NULL); 305 ASSERT(slot != NULL);
311 // Offset is negative because higher indexes are at lower addresses. 306 // Offset is negative because higher indexes are at lower addresses.
312 int offset = -slot->index() * kPointerSize; 307 int offset = -slot->index() * kPointerSize;
313 // Adjust by a (parameter or local) base offset. 308 // Adjust by a (parameter or local) base offset.
314 switch (slot->type()) { 309 switch (slot->type()) {
315 case Slot::PARAMETER: 310 case Slot::PARAMETER:
316 offset += (scope()->num_parameters() + 1) * kPointerSize; 311 offset += (scope()->num_parameters() + 1) * kPointerSize;
317 break; 312 break;
318 case Slot::LOCAL: 313 case Slot::LOCAL:
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 __ Drop(stack_depth); 1218 __ Drop(stack_depth);
1224 __ PopTryHandler(); 1219 __ PopTryHandler();
1225 return 0; 1220 return 0;
1226 } 1221 }
1227 1222
1228 1223
1229 #undef __ 1224 #undef __
1230 1225
1231 1226
1232 } } // namespace v8::internal 1227 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698