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

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

Issue 360011: Obey the flag --lazy in the toplevel code generator.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/x64/codegen-x64.h ('k') | no next file » | 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 10 matching lines...) Expand all
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "codegen-inl.h" 30 #include "codegen-inl.h"
31 #include "compiler.h"
31 #include "debug.h" 32 #include "debug.h"
32 #include "fast-codegen.h" 33 #include "fast-codegen.h"
33 #include "parser.h" 34 #include "parser.h"
34 35
35 namespace v8 { 36 namespace v8 {
36 namespace internal { 37 namespace internal {
37 38
38 #define __ ACCESS_MASM(masm_) 39 #define __ ACCESS_MASM(masm_)
39 40
40 // Generate code for a JS function. On entry to the function the receiver 41 // Generate code for a JS function. On entry to the function the receiver
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 319 }
319 #endif 320 #endif
320 } 321 }
321 } 322 }
322 323
323 324
324 void FastCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { 325 void FastCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
325 Comment cmnt(masm_, "[ FunctionLiteral"); 326 Comment cmnt(masm_, "[ FunctionLiteral");
326 327
327 // Build the function boilerplate and instantiate it. 328 // Build the function boilerplate and instantiate it.
328 Handle<JSFunction> boilerplate = BuildBoilerplate(expr); 329 Handle<JSFunction> boilerplate =
330 Compiler::BuildBoilerplate(expr, script_, this);
329 if (HasStackOverflow()) return; 331 if (HasStackOverflow()) return;
330 332
331 ASSERT(boilerplate->IsBoilerplate()); 333 ASSERT(boilerplate->IsBoilerplate());
332 334
333 // Create a new closure. 335 // Create a new closure.
334 __ push(rsi); 336 __ push(rsi);
335 __ Push(boilerplate); 337 __ Push(boilerplate);
336 __ CallRuntime(Runtime::kNewClosure, 2); 338 __ CallRuntime(Runtime::kNewClosure, 2);
337 Move(expr->context(), rax); 339 Move(expr->context(), rax);
338 } 340 }
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 true_label_ = saved_true; 1300 true_label_ = saved_true;
1299 false_label_ = saved_false; 1301 false_label_ = saved_false;
1300 // Convert current context to test context: End post-test code. 1302 // Convert current context to test context: End post-test code.
1301 } 1303 }
1302 1304
1303 1305
1304 #undef __ 1306 #undef __
1305 1307
1306 1308
1307 } } // namespace v8::internal 1309 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698