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

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

Issue 146083: X64 implementation: Start compiling native functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.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 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 context); 199 context);
200 200
201 bool pending_exceptions; 201 bool pending_exceptions;
202 Handle<Object> result = 202 Handle<Object> result =
203 Execution::Call(test_function, 203 Execution::Call(test_function,
204 Handle<Object>::cast(test_function), 204 Handle<Object>::cast(test_function),
205 0, 205 0,
206 NULL, 206 NULL,
207 &pending_exceptions); 207 &pending_exceptions);
208 // Function compiles and runs, but returns a JSFunction object. 208 // Function compiles and runs, but returns a JSFunction object.
209 CHECK(result->IsSmi()); 209 #ifdef DEBUG
210 CHECK_EQ(47, Smi::cast(*result)->value()); 210 PrintF("Result of test function: ");
211 result->Print();
212 #endif
211 } 213 }
212 214
213 215
214 void CodeGenerator::GenCode(FunctionLiteral* function) { 216 void CodeGenerator::GenCode(FunctionLiteral* function) {
215 // Record the position for debugging purposes. 217 // Record the position for debugging purposes.
216 CodeForFunctionPosition(function); 218 CodeForFunctionPosition(function);
217 ZoneList<Statement*>* body = function->body(); 219 ZoneList<Statement*>* body = function->body();
218 220
219 // Initialize state. 221 // Initialize state.
220 ASSERT(scope_ == NULL); 222 ASSERT(scope_ == NULL);
(...skipping 4195 matching lines...) Expand 10 before | Expand all | Expand 10 after
4416 break; 4418 break;
4417 default: 4419 default:
4418 UNREACHABLE(); 4420 UNREACHABLE();
4419 } 4421 }
4420 } 4422 }
4421 4423
4422 4424
4423 #undef __ 4425 #undef __
4424 4426
4425 } } // namespace v8::internal 4427 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698