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

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

Issue 264067: Initial port of top-level code generator to ARM. For the constant... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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
« no previous file with comments | « src/fast-codegen.h ('k') | tools/gyp/v8.gyp » ('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 26 matching lines...) Expand all
37 37
38 // Generate code for a JS function. On entry to the function the receiver 38 // Generate code for a JS function. On entry to the function the receiver
39 // and arguments have been pushed on the stack left to right, with the 39 // and arguments have been pushed on the stack left to right, with the
40 // return address on top of them. The actual argument count matches the 40 // return address on top of them. The actual argument count matches the
41 // formal parameter count expected by the function. 41 // formal parameter count expected by the function.
42 // 42 //
43 // The live registers are: 43 // The live registers are:
44 // o edi: the JS function object being called (ie, ourselves) 44 // o edi: the JS function object being called (ie, ourselves)
45 // o esi: our context 45 // o esi: our context
46 // o ebp: our caller's frame pointer 46 // o ebp: our caller's frame pointer
47 // o esp: stack pointer (pointing to return address)
47 // 48 //
48 // The function builds a JS frame. Please see JavaScriptFrameConstants in 49 // The function builds a JS frame. Please see JavaScriptFrameConstants in
49 // frames-ia32.h for its layout. 50 // frames-ia32.h for its layout.
50 void FastCodeGenerator::Generate(FunctionLiteral* fun) { 51 void FastCodeGenerator::Generate(FunctionLiteral* fun) {
51 function_ = fun; 52 function_ = fun;
52 53
53 __ push(ebp); // Caller's frame pointer. 54 __ push(ebp); // Caller's frame pointer.
54 __ mov(ebp, esp); 55 __ mov(ebp, esp);
55 __ push(esi); // Callee's context. 56 __ push(esi); // Callee's context.
56 __ push(edi); // Callee's JS Function. 57 __ push(edi); // Callee's JS Function.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Visit(expr->value()); 131 Visit(expr->value());
131 132
132 Variable* var = expr->target()->AsVariableProxy()->AsVariable(); 133 Variable* var = expr->target()->AsVariableProxy()->AsVariable();
133 ASSERT(var != NULL && var->slot() != NULL); 134 ASSERT(var != NULL && var->slot() != NULL);
134 __ mov(eax, Operand(esp, 0)); 135 __ mov(eax, Operand(esp, 0));
135 __ mov(Operand(ebp, SlotOffset(var->slot())), eax); 136 __ mov(Operand(ebp, SlotOffset(var->slot())), eax);
136 } 137 }
137 138
138 139
139 } } // namespace v8::internal 140 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698